No update in ACS when collecting PII information
This article describes how to resolve the Adobe Campaign Standard issue where the application subscriber table is not updated with information configured in the PII postback rule, after having implemented push notifications using react native SDK.
Description description
Environment
Adobe Campaign Standard
Issue/Symptoms
You may have implemented push notifications using react native SDK which is common for iOS and Android. You may also be able to successfully create and received a push notification from Adobe Campaign Standard
https://developer.adobe.com/client-sdks/documentation/mobile-core/api-reference/
However, the application subscriber table is not updated with the information that has been configured in the PII postback rule.
For this we have implemented the code ACPCore.collectPii({"myPii": "data"})
- In launch, we have setup the rule ‘Mobile Core - Collect PII’ as postback
- URL is configured as ‘https://{%%camp-server%%}/rest/head/mobileAppV5/{%%pkey%%}/subscriptions/{%%mcid%%}’
- post body is:
{
"marketingCloudId": "{%%mcid%%}",
"cusCustomerNumber": "{%contextdata.customerNumber%}"
}
- field on the app subscribed record is called
cusCustomerNumber
- code being executed is
ACPCore.collectPii({"cusCustomerNumber": "data"})
Resolution resolution
There were two issues observed which were resolved.
1 - The map being sent is contextdata
that we have configured, so the SDK is trying to find a data filed called customerNumber
but there is none because it has been set to cusCustomerNumber.
Instead change ACPCore.collectPii({"cus.CustomerNumber": "data"})
to ACPCore.collectPii({"customerNumber": "data"})
Also, ensure that your part in his code, as well as the highlighted text above, should match with his code as well. Below is what we had for this customer.
setTimeout(() => { ACPCore.collectPii({"customerNumber": "data"}); console.log('collectPii'); }, 2000);
2 - Upon changing this, we were still not able to see the data being stored in the in-app subscription table. Therefore, data capture was done through the Charles tool. You may notice the following issue:
{ "marketingCloudId": "0000000000000000", "cus.CustomerNumber": "data"}
RST-360011 An error has occurred - please get in touch with your administrator.
‘cusCustomerNumber
’ property is not valid for the ‘nms:appSubscriptionRcp:appSubscriptionRcpDetail
’ resource.
When looking at the database for this table, we see the following columns.
Table “public.nmsappsubscriptionrcp”
Column | Type | Collation | Nullable | Default
-----------------------------±-------------------------±----------±---------±--------
iappsubscriptionrcpid | integer | | not null | 0
icreatedbyid | integer | | not null | 0
idisabled | smallint | | not null | 0
imobileappid | integer | | not null | 0
imodifiedbyid | integer | | not null | 0
ipushplatform | smallint | | not null | 0
sdevicebrand | character varying(128) | | |
sdeviceid | character varying(128) | | |
sdevicemanufacturer | character varying(128) | | |
sdevicemodel | character varying(128) | | |
sdevicename | character varying(128) | | |
smarketingcloudid | character varying(256) | | |
ssystemlanguage | character varying(128) | | |
ssystemname | character varying(128) | | |
ssystemversion | character varying(128) | | |
suserkey | character varying(128) | | |
tscreated | timestamp with time zone | | |
tsdisabled | timestamp with time zone | | |
tslastmodified | timestamp with time zone | | |
tsregistration | timestamp with time zone | | |
scuscuscustomernumber | character varying(127) | | |
scusfirstname | character varying(127) | | |
scuslastname | character varying(127) | | |
What it now looks like is a field mismatch. Change the post body code in launch as below and publish the changes and request to test, which should resolve the issue.
{
"marketingCloudId": "{%%mcid%%}",
"cusCus.CustomerNumber": "{%contextdata.customerNumber%}"
}