How to implement abandoned cart
An abandoned cart email is an automated email that is sent to those users who, for some reason, did not complete their purchase in an ecommerce.
Its objective is to get the customer to go back and finish the purchase that he left pending. It is usually made up of attractive titles and texts, images of the product that was pending purchase along with a button or call to action to resume the purchase process. It is also recommended to offer the customer some benefit if he completes the purchase that he left abandoned.
With Icomm you can design this type of message and automate abandoned cart campaigns to increase conversions on your site.
To create an abandoned cart campaign, it will first be necessary to define what type of newsletter you want to send to your contacts and perform an integration via API. Then, together with the Customer Success team, the pieces will be created and the sending of emails will be automated.
To carry out the integration via API, request the corresponding documentation from our Customer Success team: success@icommkt.com
The first step will be to decide what type of newsletter you want to send to customers who abandon a purchase before completing it.
Generic
This type of email will consist of a single image and a button or call to action to resume the pending purchase. That is, it will not show the details of the abandoned products, nor the images or prices.
Custom
This option shows the detail of the complete cart. That is, the number of products with photos, prices and buttons that allow you to resume the purchase. We recommend showing up to 3 products.
Create the design of the email that you want to send to customers who abandon a purchase. Then, you must send the newsletter in JPG format to the Icomm Customer Success team to define what information will need to be requested via API integration and to map the fields on the platform.
It is important to take into account that it will be essential to have some data from the API integration for the creation of an abandoned cart. Here are some examples: (Fields marked in bold are required)
email
quantity of products
abandon_date (dd/mm/yyyy)
url_carrito (leads to custom cart)
name
last name
url_product_image1
url_product_image2
url_product_image3
product_name1
product_name2
product_name3
All fields containing links must begin with a URL.
This step can be done with the assistance of the Icomm CS team. Here the regular profile will be created where the API integration data will be saved and the virtual profiles that will segment customers according to the number of products they leave abandoned in the cart. Then a test will be carried out to verify the correct configuration of the email that will be sent to customers who leave their purchases pending.
News design on the platform
Now you must create the three newsletters in the Platform Editor for those people who have abandoned 1, 2 or 3 products respectively. It is important to note that everything, including the images of the products, will be called as fields from the integration via API. You can ask the CS team for assistance to perform this step.
Image in HTML
It is also possible to make the newsletter in HTML format:
To invoke the image, click on "Source", delete the code that brings us and paste the one that we share below.
The fields that are in bold must be EXACTLY the same as those in the base.
Virtual profile creation
Three virtual profiles must be created to segment customers based on the number of abandoned products as follows:
Use the fields fecha_abandono > Apply function > Exact date = 1 and cant_productos = 1/2/3 (according to the profile)
The last step for the creation of the abandoned cart is the automation of the shipments.
Three shipping configurations must be made:
The first configuration will contain the newsletter for the abandonment of 1 product and will be directed to the virtual profile of the users who abandoned 1 product.
The second configuration will contain the newsletter for the abandonment of 2 products and will be directed to the virtual profile of the users who abandoned 2 products.
The third configuration will contain the newsletter for the abandonment of 3 products and will be directed to the virtual profile of the users who abandoned 3 products.
Tip: You can make a first configuration and then copy it by modifying profile and newsletter
Important: you must enable the Shipping with repetition option in the third tab of the Shipping settings, indicating the shipping frequency you want.
The steps for implementing the abandoned cart in VTEX are described below.
Enter the Dynamic Storage at: https://{*Account**}.ds.vtexcrm.com.br/* and then the tab *Data Entities.*
On the CL Entity (Client), click on edit
Once in the CL entity field detail screen, access the Automatic Fields tab and click on New Calculated Field.
Complete the new calculated field with the following data
to. Name: rclastsessiondate_ddmmyyyy
b. Display Name: Session Data in DD/MM/YYYY format
c. Type: Varchar 10
Press on the configuration wheel to the right of the field that you will register
Complete the text of the formula with the following code
Select Insert or Update in the Recalculate at field:
Click on the Validate button, and you will get a window like the following to confirm that the data to be calculated is correct. There you must upload a date with the required format YYYY-MM-DD
Press OK and you will get the success message.
(Ignore Syntax Error message)
Record
In the list of Data Entities, we must publish the changes made. To do this, we simply press the save button to the left of the name of the Customer data entity (CL).
Enter Dynamic Storage at: https://{Account}.ds.vtexcrm.com.br/ and then the Triggers tab.
Click on Add New / Add New
Complete the basic data fields of the trigger
to. Name: Abandoned Cart
b. Data Entity: (Select) Customer
c. Status: Enabled / Enabled
In the Rule tab, complete with the following data
to. Trigger Rule: The value of an attribute was altered
b. Field: Last session
c. We configure the following Additional Filters by pressing 4 times on *Add Filter*
In the If Positive tab, complete the action to perform.
to. Action: Send an HTTP request
b. Request dates:
Yo. URL: https://api.icommarketing.com/Contacts/SaveContact.Json/
ii. Method: POST
iii. Headers:
Name: Authorization
Value: [API_KEY]
iv. Content as JSON: (Pre-get the ProfileKey and replace in code)
Important: Replace the [API_KEY] and [ProfileKey] with the values obtained from the client instance.
The most frequent problem is that when implementing the previous steps, a couple of hours pass, and yet no records are entered into the abandoned cart profile. Review the following points to verify the configuration made.
to. Verify that the APIKEY corresponding to the client instance has been entered. (Point 5.b.iii within step 2 “Trigger Creation”)
b. Verify the JSON of the request entered in point 5.b.iv within step 2 “Creation of the Trigger”
Yo. Is the ProfileKey entered correct?
ii. Do the fields listed within each “Key” of the “CustomFields” attribute exist within the linked profile? The image below shows an example of a typical setup.
In this case, the profile must have the fields:
email (generic, must always exist)
name
last name
cart_url
date_abandoned
The date of abandonment of the cart is not entered in the profile with the format DD/MM/YYYY.
Verify the JSON of the request entered in point 5.b.iv within step 2 "Creation of the Trigger" and check the "Value" corresponding to the "Key": ”abandonment_date”. The name of the dynamic field created in step 1 of this tutorial should appear there as Value. As suggested by default, it should look like this.
Its objective is to get the customer to go back and finish the purchase that he left pending. It is usually made up of attractive titles and texts, images of the product that was pending purchase along with a button or call to action to resume the purchase process. It is also recommended to offer the customer some benefit if he completes the purchase that he left abandoned.
With Icomm you can design this type of message and automate abandoned cart campaigns to increase conversions on your site.
How to create an abandoned cart email
To create an abandoned cart campaign, it will first be necessary to define what type of newsletter you want to send to your contacts and perform an integration via API. Then, together with the Customer Success team, the pieces will be created and the sending of emails will be automated.
To carry out the integration via API, request the corresponding documentation from our Customer Success team: success@icommkt.com
Step by Step
1. What type of newsletter do you want to implement?
The first step will be to decide what type of newsletter you want to send to customers who abandon a purchase before completing it.
Generic
This type of email will consist of a single image and a button or call to action to resume the pending purchase. That is, it will not show the details of the abandoned products, nor the images or prices.
Custom
This option shows the detail of the complete cart. That is, the number of products with photos, prices and buttons that allow you to resume the purchase. We recommend showing up to 3 products.
2. Design and data
Create the design of the email that you want to send to customers who abandon a purchase. Then, you must send the newsletter in JPG format to the Icomm Customer Success team to define what information will need to be requested via API integration and to map the fields on the platform.
It is important to take into account that it will be essential to have some data from the API integration for the creation of an abandoned cart. Here are some examples: (Fields marked in bold are required)
quantity of products
abandon_date (dd/mm/yyyy)
url_carrito (leads to custom cart)
name
last name
url_product_image1
url_product_image2
url_product_image3
product_name1
product_name2
product_name3
All fields containing links must begin with a URL.
3. Profiling and testing
This step can be done with the assistance of the Icomm CS team. Here the regular profile will be created where the API integration data will be saved and the virtual profiles that will segment customers according to the number of products they leave abandoned in the cart. Then a test will be carried out to verify the correct configuration of the email that will be sent to customers who leave their purchases pending.
News design on the platform
Now you must create the three newsletters in the Platform Editor for those people who have abandoned 1, 2 or 3 products respectively. It is important to note that everything, including the images of the products, will be called as fields from the integration via API. You can ask the CS team for assistance to perform this step.
Image in HTML
It is also possible to make the newsletter in HTML format:
<p style="margin-top: 0px; margin-bottom: 0px;"color:#ffffff;"><a href="<***url_carrito***>" style="border: solid 0px;" target="_blank"><img alt="." src="<***url_img_1***>" style="display: block;width:195px;" /></a></p>
To invoke the image, click on "Source", delete the code that brings us and paste the one that we share below.
The fields that are in bold must be EXACTLY the same as those in the base.
Virtual profile creation
Three virtual profiles must be created to segment customers based on the number of abandoned products as follows:
Use the fields fecha_abandono > Apply function > Exact date = 1 and cant_productos = 1/2/3 (according to the profile)
4. Automated Send Settings
The last step for the creation of the abandoned cart is the automation of the shipments.
Three shipping configurations must be made:
The first configuration will contain the newsletter for the abandonment of 1 product and will be directed to the virtual profile of the users who abandoned 1 product.
The second configuration will contain the newsletter for the abandonment of 2 products and will be directed to the virtual profile of the users who abandoned 2 products.
The third configuration will contain the newsletter for the abandonment of 3 products and will be directed to the virtual profile of the users who abandoned 3 products.
Tip: You can make a first configuration and then copy it by modifying profile and newsletter
Important: you must enable the Shipping with repetition option in the third tab of the Shipping settings, indicating the shipping frequency you want.
How to implement Abandoned Cart in Vtex
The steps for implementing the abandoned cart in VTEX are described below.
Create Calculated Field
Enter the Dynamic Storage at: https://{*Account**}.ds.vtexcrm.com.br/* and then the tab *Data Entities.*
On the CL Entity (Client), click on edit
Once in the CL entity field detail screen, access the Automatic Fields tab and click on New Calculated Field.
Complete the new calculated field with the following data
to. Name: rclastsessiondate_ddmmyyyy
b. Display Name: Session Data in DD/MM/YYYY format
c. Type: Varchar 10
Press on the configuration wheel to the right of the field that you will register
Complete the text of the formula with the following code
if( {!rclastsessiondate} != null && {!rclastsessiondate}.HasValue)
{
return {!rclastsessiondate}.Value.ToString("dd/MM/yyyy");
}
return null;
Select Insert or Update in the Recalculate at field:
Click on the Validate button, and you will get a window like the following to confirm that the data to be calculated is correct. There you must upload a date with the required format YYYY-MM-DD
Press OK and you will get the success message.
(Ignore Syntax Error message)
Record
In the list of Data Entities, we must publish the changes made. To do this, we simply press the save button to the left of the name of the Customer data entity (CL).
Trigger Creation
Enter Dynamic Storage at: https://{Account}.ds.vtexcrm.com.br/ and then the Triggers tab.
Click on Add New / Add New
Complete the basic data fields of the trigger
to. Name: Abandoned Cart
b. Data Entity: (Select) Customer
c. Status: Enabled / Enabled
In the Rule tab, complete with the following data
to. Trigger Rule: The value of an attribute was altered
b. Field: Last session
c. We configure the following Additional Filters by pressing 4 times on *Add Filter*
In the If Positive tab, complete the action to perform.
to. Action: Send an HTTP request
b. Request dates:
Yo. URL: https://api.icommarketing.com/Contacts/SaveContact.Json/
ii. Method: POST
iii. Headers:
Name: Authorization
Value: [API_KEY]
iv. Content as JSON: (Pre-get the ProfileKey and replace in code)
{
"ProfileKey":"[ProfileKey]",
"Contact":{
"Email":"{!email}",
"Custom Fields":[
{
"Key":"name",
"Value":"{!firstName}"
},
{
"Key":"lastname",
"Value":"{!lastName}"
},
{
"Key":"cart_url",
"Value":"{!rclastcart}"
},
{
"Key":"abandon_date",
"Value":"{!rclastsessiondate_ddmmyyyy}"
}
]
}
}
Important: Replace the [API_KEY] and [ProfileKey] with the values obtained from the client instance.
Frequent Problems
The most frequent problem is that when implementing the previous steps, a couple of hours pass, and yet no records are entered into the abandoned cart profile. Review the following points to verify the configuration made.
to. Verify that the APIKEY corresponding to the client instance has been entered. (Point 5.b.iii within step 2 “Trigger Creation”)
b. Verify the JSON of the request entered in point 5.b.iv within step 2 “Creation of the Trigger”
Yo. Is the ProfileKey entered correct?
ii. Do the fields listed within each “Key” of the “CustomFields” attribute exist within the linked profile? The image below shows an example of a typical setup.
In this case, the profile must have the fields:
email (generic, must always exist)
name
last name
cart_url
date_abandoned
The date of abandonment of the cart is not entered in the profile with the format DD/MM/YYYY.
Verify the JSON of the request entered in point 5.b.iv within step 2 "Creation of the Trigger" and check the "Value" corresponding to the "Key": ”abandonment_date”. The name of the dynamic field created in step 1 of this tutorial should appear there as Value. As suggested by default, it should look like this.
Updated on: 11/28/2023
Thank you!