Uncategorized

SFMC – SetObjectProperty & Custom Profile Attribute

Friends in the SFMC, I’d like to share some knowledge/findings from the SFMC platform that I came across while working on one of the use case using one of the most well-liked functions in SFMC that is primarily used in CloudPages, which is called “API Object Functions” under this “SetObjectProperty”. The SetObjectProperty() function is mostly used to set the properties to add to or update the Subscriber object through CloudPages based on various business logics.

Additionally, we’ll discuss nuances of Custom Profile Attributes and how SFMC updates them. Before that let’s go through the use case which I was implementing and got into trouble with the SetObjectProperty and Custom Profile Attribute issue.

USE CASE :

Suppose a use case where your source of truth for Data is Salesforce CRM and the CRM is connected with SFMC through a Standard connector. There would be B2B and B2C Contact records present in CRM and they are being identified through records type, which distinguish them from each other in CRM and based on that their layout is being displayed.

So this data is being pushed in SFMC through an standard SFMC connector. Each business unit is being connected to a same CRM but while syncing based on additional logic only those record type data is being synced on a particular BUs sync DE. So segregation of records is done at Sync DE level

GOAL TO ACHIEVE IN SFMC

  1. Segmenting / Segregating the records in SFMC based on Record Type.
  2. B2B and B2C records should not be accessed in each other BUs All Subscriber List.
  3. Populating the RecordType for each new Subscribers when email is sent out from SFMC.
  4. Handling CloudPage Error issues while achieving/implementing the above goals.

Prepwork to achieve above goals!!!

Now, we want to segregate or want to separate the records (based on record types) at All subscriber list level, which means B2B child BU records should not be visible on B2C child BUs All Subscriber list and vice versa. For this we need to have below configs done in SFMC.

  1. Custom Profile Attribute at Parent Business Unit level. In our case “RecordType” (Data type – Text). Also it’s a good practice to keep the default value for this. Also create two other values i.e “B2B” and ” B2C” value which we want to populate.

Note : Keep the RecordType values as same like CRM to keep uniformity.

2. Business Unit Filters at Parent Business Unit level using the above custom profile attribute created above i.e. “RecordType”. Create one for each Business unit i.e B2B and B2C.

3. How this above custom profile attribute will get updated for new subscribers (not present on All subscriber lists of child BU nor on Parent BU), we will talk in detail with solution in our next upcoming article!, but let’s see which ways through it gets updated in this article!!!

FINDINGS :

  1. If your Child Business Unit is set up as with this unsubscribe settings “Subscribers will be unsubscribed from this business unit only”
  2. Additionally, the SetObjectProperty() function is present on your CloudPages for Preference Center Pages / Subscription Center Pages which allows you to make update on Subscriber Objects, for example, by changing the Status field from Active to Unsubscribed.
  3. Even, Parent Business unit is using a filter on Business units to distinguish/segment records related to different business units, example custom Attribute “Record Type” and it’s default value would be as “Default” (default value could be anything)

If you all the above scenarios falls under the same use case, then SetObjectProperty() function would break in your CloudPages, which will result in internal server error 500. Also nuances of Custom Profile Attribute update while email send.

NUANCES OF CUSTOM PROFILE ATTRIBUTE

  • Custom Attribute Update :-
  1. Even if you have the same name attribute in your Sendable Data Extension, the values for Custom Attributes on Subscriber Object will not be updated, leaving the field value on Subscriber Object blank.
  2. The value would not populate when you sent the emails using User Initiated Sends or Manual Send through SFMC, despite the fact that you had selected the default value for the Custom Attribute.
  3. Custom Attribute’s default value would be populated only when Emails are being sent through Journey Builder (not document in Salesforce docs). Based on documentation, imports or the creation of new Subscribers in the UI or via smart capture will update profile attributes, please find the reference link for the same.

FACTS AND REASON WHY THE CLOUDPAGE WILL BREAK!!

  • SetObjectProperty() function
  1. When the BU option is set to “Subscribers will be unsubscribed from this business unit only,” if a subscriber unsubscribes using the CloudPage (using the SetObjectProperty() function) of a Child BU, the user will be unsubscribed from the appropriate Child BU rather than the Parent BU. However, this would work perfectly in below use case.

a. For Existing Subscribers for whom “RecordType” may be populated while importing them, considering Business unit filter is applied based on record type.

2. However, in the scenario for “New Subscribers”, when email is sent (through Journey Builder), they are first located/sit in Parent BU where Custom Attribute will be populated to as default value until and unless any automation or script will run and changes the custom profile attribute to correct record type to display those records in respective child BU keeping in mind that Business Unit filter is applied.

“Since SetObjectProperty() function will attempt to change the status of the subscriber on Child BU when in reality they are sitting on Parent BU, as in the scenario of the new subscriber above, if any of these subscribers try to unsubscribe themselves as soon as email is being sent, they will see internal server error 500 on the cloudpage, which will cause CloudPage to crash and internal server error to appear.”

CloudPage Break issue could be handled by below solutions,

  1. By setting the Business Unit (BU) setting to “Subscribers will be unsubscribed from all Business Units in the Enterprise”. This will only occur in the scenario where as per business requirement your subscriber should not be part of 2 child BUs, that is, if your subscriber falls under the B2B, B2C, or region-specific categories.
  2. An automation consisting of a script that updates the record type on Parent BU would execute every hour right after the email is sent through Journey Builder, and that activity would run four times in a single hour (15 mins of each interval). In order for the proper record type to be updated for every message received from Journey Builder.
  3. Please let me know if you have any other ideas for how to update the custom Profile attribute for new subscribers in real time!!!. 🙂

LikeComment

Leave a Reply

Your email address will not be published. Required fields are marked *