No update in ACS when collecting PII information

Description

Background - 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://aep-sdks.gitbook.io/docs/using-mobile-extensions/mobile-core/mobile-core-api-reference#collect-pii

Issue - The application subscriber table is not updated with the information 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

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 cause it has been set to cusCustomerNumber so instead change ACPCore.collectPii({“cus.CustomerNumber”: “data”}) to ACPCore.collectPii({“customerNumber”: “data”})

Also, ensure you the 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 data being stored in-app subscription table, so data capture through the Charles tool was done, and 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 requested to test and as a result issue should be resolved.

{

“marketingCloudId”: “{%%mcid%%}”,

cusCus.CustomerNumber”: “{%contextdata.customerNumber%}”

}

On this page