I'm currently building a clienteling app that integrated the Mobile Push SDK on both iOS and Android and encountered some issue on switching the account.

I found that when I login to user A, and set contact key to A, the Inbox Messages will be send to this device. However, I logout user A and switch to a user B, I should set the contact key to B. But seems the inbox messages are associated with the Device instead of Contact, I can still see the inbox messages that were sent to contact A previously.

My question is, how should we deal with this situation, to prevent from seeing the previous inbox messages if the contact key has been changed?


First, as of 2018-11-16 neither the SDK nor the Marketing Cloud supports the use-case you describe. Please open a Voice of Customer (VoC) request through your account manager. The more of these requests that exist the more likely it is the feature will be implemented.

Now, we do have people who have successfully implemented your use-case. It requires that you send the ContactKey (or similar unique identifier) along with your inbox message in a "Custom Key". Then you would implement your inbox message adapter such that you inspect your custom key to determine whether or not your message should be included in the message list.

UPDATE 20190108 -- Apparently, I have misspoken. This was our understood solution from the SDK's perspective until such time that the messages could be filtered at the system level for a given contact, but we are mistaken. You are correct in your comment that messages are rendered at the time that they are downloaded. There is work underway to allow for the use-case you describe.

  • Hi Bill, we tried this before as well. But soon we realised it won't solve the issue. As the inbox messages are re-rendered (not cached) at time of request from the SDK, the custom key is not fixed and will be updated every time the contact key has been switched. – Parker Liu Jan 8 at 4:11

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.