Due to the Marketing cloud will stop support GCM push messaging i updated the ExactTarget SDK version 4.5.0 to Marketing cloud SDK version 6.0.2. in Cloud marketing updating documentation file (link here) it state that

Clear Attributes – Instead of ETPush.getInstance().removeAttribute(""), use MarketingCloudSdk.getInstance().getRegistrationManager().edit().clearAttributes("").commit()

But the logic is not the same between this two methods due to the change in registration event. I will try to describe the scenario : I want to update just Contact Key from the editor without sending the all of the other attributes. In the version 4.5.0 i could use the removeAttribute() method to prevent from an attribue from being sent (see below from 4.5 javadoc)

Note: this method removes the attribute from future sends. It does not change the actual value, nor does it remove it from the SFMC Contact model. It simply means that the last value for this attribute will no longer be sent.

How can i prevent in the new SDK version (6.0.2) sending all the registration attributes while changing for example the only the ContactKey by calling MarketingCloudSdk.getInstance().getRegistrationManager().edit().setContactKey("key).commit;


1 Answer 1


There are a couple of things in your question that need answers:

  1. The has always sent all device registration data. There has never been a way to send 1 thing and not another. So, setting Contact Key will result in the entire device registration being sent, to include because you called them out, Attributes. This behavior has not changed. Ever (as of 20181220).

  2. Your understanding of removeAttribute() is faulty based on bad Javadoc if your note is truly a cut & paste. First, there is no way to "remove" (or "add") an Attribute from the SDK. The names of the methods were updated to better reflect the actions of "set" and "clear" as Attributes must be pre-existing for the contact on the server side and the SDK simply updates their values. Second, the Note field you provided is not accurate. Removing an Attribute in older versions of the SDK results in the transmission of the Attribute Key with an empty String as its Value which clears the value in the server's contact.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.