Before moving to this next step, be sure to set up the transactional message profile fields. The third step to setting up your transactional messaging campaign is to create your messages. Create your transactional message and add your profile field group tags to the transactional message by following the below steps.
1. Navigate from the home menu to Authoring.
2. Then Transactional Messages.
3. Click Create Message.
4. Navigate to the Personalization Control Panel.
5. Select the Personalization Fields that are applicable for your transactional campaign.
6. Copy and Paste these tags into your message wherever you want to add the attribute.
BUILDING YOUR MESSAGE
For this example, we will add the applicable fields to our already designed email.
1. Locate the field you will be inserting the tag for.
2. Select your Personalization Tag.
3. Copy and Paste your tag into the designated area of code.
To display the cart items, create a CartItems profile field in the existing profile field group. Instead of a text field, create a Contact Content Block (CCB). This allows for the information from each customer's cart to be dynamically generated as their orders are placed.
- NOTE: A data type of Contact Content Block (CCB) allows you to pass data, including HTML, to populate a section of an email. For example, passing the product layout HTML to display a customer's ordered items.
Populate this area of code for every item in the cart. In this example, there is only one item in our cart.
- Locate your cart contents in the HTML.
- Replace the order contents with the CCB tag.
This will populate that information for the items in the order.
CREATING A PRODUCT LAYOUT USING INDIVIDUAL PERSONALIZATION TAGS
In the above sections, we walked through setting up the product layout using a block of HTML, referred to as a CCB. Using a CCB allows the customer's information to be populated in the HTML with a personalization tag, and reiterated for every item that is in a customer's order.
However, you can also pass this information to Listrak using individual personalization tags. The data attributes that are being used need to match the applicable profile fields. For example: SKU1, SKU2, imageurl1, imageurl2.
After you have the applicable personalization tags set up, you can use Dynamic Content to filter on the profile fields to show the product design layout in the transactional message. Add the applicable dynamic content to the HTML email, then apply filters to add the profile fields to the email. Learn more about setting up Dynamic Content with HTML here.
The filters for the Dynamic Content would verify that a value is being passed for the SKU profile fields. For example, the product would check for SKU1. If SKU1 is empty, then it checks for SKU2 to populate, populating for the applicable item. If the value is empty, it wouldn't appear in the message.
The remaining personalization fields that were created in the previous article are going to be included in the below section. Simply copy and paste the fields into the appropriate areas.
After you have populated the designated tags, your email will appear as shown below:
Congratulations, your message has been created!
Next, be sure to set up authentication before sending a Transactional Email REST API call.