Closed mathieulabbb closed 9 months ago
Not sure what customKeys
in Android does, my goal was to ensure both iOS and Android return the same inbox message value and customKeys
was always blank if I remember correctly.
From my tests with Marketing Cloud, custom keys configured in my inbox messages are in customKeys
not in custom
(tested only in Android). custom
is always blank
So I think I was testing with sending a message like this:
POST {{SFMC Rest Endpoint}}/push/v1/messageContact/{{messageID}}/send
{
"deviceTokens": [
"** some token **"
],
"override": true,
"title": "test - device token35",
"subtitle": "subtitle goes here",
"customKeys": {
"keyA": "keyA_value",
"keyB": "keyB_value"
},
"customPayload": {
"customA": "customA_value",
"customB": "customB_value"
}
}
And now I'm not sure which one was the one that I actually ended up using, customPayload
or customKeys
, but I think it was customPayload
, in order to have the values appear in iOS and Android. What are you using on your end?
I did my tests from the cloud marketing GUI and not by API call.
I will try to reproduce the API call you mention to check the return in the application.
I think both fields need to be taken into account. customKeys
is populated for messages created by the HMI, custom
can be populated by creating messages via API. In all cases the 2 fields can be filled in and should therefore be returned in the InboxMessage object
What is HMI?
How does this work on iOS though where there is only a single field?
HMI = GUI --> Salesforce Marketing Web Application, used by business user to create and send messages (sorry for the bad translation)
I can't test on iOS for now, I'll try to find informations about that (on documentation or with our business contact from Salesforce)
Addressed in #33. Please open a separate PR if there are any issues.
Hi,
In PR https://github.com/allboatsrise/expo-marketingcloudsdk/pull/16, "customKeys" was removed and replaced by "custom" in InboxMessage type.
The two fields exists in Marketing Cloud javadoc https://salesforce-marketingcloud.github.io/MarketingCloudSDK-Android/javadocs/MarketingCloudSdk/8.0/com.salesforce.marketingcloud.messages.inbox/-inbox-message/index.html so I think the two fields are necessary for Android
In Appledocs I don't find customKeys property