- LoyaltyID: The LoyaltyId field should be configured as a text field with 60 characters.
Before you start creating the AC programs, make sure you create the LoyaltyId field in Emarsys contact database. You can do that under Management > Field Editor > Create Field.
Automation Center programs
You need to create 2 Automation Center programs. The job of these program is to fill in the LoyaltyID field. These programs take the
external_id and hash it and set the LoyaltyID field.
Go to Automation > Automation Programs > Create Program > Audience Focused Journey.
In all programs, you need to use the Set Value node to set the LoyaltyID:
Before we start, we need to know what is the
external_id used in your account. Go to Smart Insight Settings > Contact Fields > Unique Identifier.
In the Set Value node, under function, select: Hash Value
Use Custom Hash - Loyalty Integration as the Hash algorithm.
Field to hash: Use the "Unique Identifier" field as shown in the Smart Insights Settings.
Field to set: LoyaltyID
- The first program will set the LoyaltyID in the case when a contact is created in the Emarsys DB or when the
Program Name: Loyalty change LoyaltyID - DO NOT DELETE
Participation: Contacts can enter the program immediately after entering
- The first entry node is a Data Change Node on the Unique Identifier field
- The second entry node is a New Contact Node. This makes sure that for every new contact that enters Emarsys, we already calculate his LoyaltyID.
- Then we have a quick filter to check if the "Unique Identifier" field is not empty
- The last step is to fill in the LoyaltyID by hashing the Unique Identifier, as seen earlier.
- The second program is a recurring program that should run every day and make sure that the LoyaltyID is set for all contacts. This is a backup program for the first program in case the first program missed a contact at contact creation time.
Program Name: Loyalty set empty LoyaltyID - DO NOT DELETE
Participation: Contacts can enter the program immediately after exiting
Prerequisite: Create a contact Segment, for example "LoyaltyID is empty - DO NOT DELETE", which will find all contacts where the LoyaltyID field is empty.
Every day, the program checks if there are contacts where the LoyaltyID field is empty. If this is the case, we check that the field of the Unique Identifier is not empty for the given contact, and then we call the Set Value Node to hash the Unique Identifier.