To implement segmentation by attributes, include code to reference attributes in the app. Set any attributes you save with the SDK to your Marketing Cloud contact record in advance so that the Marketing Cloud can connect the values sent by the SDK to the correct contact fields.

NOTE: The SDK will send changes to Attributes to the Marketing Cloud with a REST call one minute after the first change to any Marketing Cloud data. If the REST call fails (no network for example), then it will retry in one minute intervals until the app is suspended. If the send is unsuccessful before the app is suspended, the data will be sent the next time the app is opened. It will take up to 5 minutes for this value to be recorded in the Contact record once the REST call is made by the SDK.”

Set, Get, and Clear Attributes

NOTE: Neither the key nor the value may be null or an empty string. Also, leading and/or trailing whitespace will be trimmed from the input.

NOTE: clearAttributes() ONLY clears the attribute from the SDK and does not communicate this change to the Marketing Cloud Servers. If you wish to clear a value stored in the Marketing Cloud please call addAttributes() with an empty string as the value.

Reserved Word Restrictions

The JB4A SDK ignores calls to modify values associated with the following attributes, as these attributes represent reserved internal attributes: