Abandoned cart is VTEX's functionality that sends emails to customers to remind them to checkout on a cart that has been assembled but not completed.
The abandoned cart configuration can be performed in two different ways, according to the store's operating environment:
- Legacy CMS Portal: through various modules of the VTEX platform (CMS, Master Data and Message Center) and also on your host server.
- VTEX IO: through the installation of the “Abandoned Cart” app, configuration of the email template in the Message Center, and the Trigger in the Master Data.
Configuration for Legacy CMS Portal stores
This section presents the following topics for configuring the abandoned cart functionality in VTEX Legacy stores:
- Configuring email template in CMS
- Configuring email template in Message Center
- SPF release
- Configuring trigger
Configuring email template in CMS
You can create your own custom email template or use the default template option for abandoned cart. To create a custom template, follow these steps:
- In the VTEX Admin, go to Storefront > Layout, or type Layout in the search bar at the top of the page.
- Under CMS > HTML Templates, click on the
new template
icon. - Add a name in the Template Name field.
- Fill in the Template XHTML field with the template codes.
- Click on
Save Template
.
We recommend that template customization should be performed by professionals with experience in the CMS module, and preferably, who have already configured other page and shelf templates.
To use a standard template option, follow the steps below:
- In the VTEX Admin, go to Storefront > Layout, or type Layout in the search bar at the top of the page.
- Under CMS > HTML Templates, click on the
CEM-Abandoned-Cart
icon. - Check the information of the template codes present in the Template XHTML field.
Configuring email template in Message Center
Once the new email template has been created or the data from the default template has been used, access the Message Center to configure the email template. Follow the steps below:
- In the VTEX Admin, go to Store Settings > Email Templates > Templates, or type Templates in the search bar at the top of the page.
- Click on the
New Template
button. - Click on New Template and type the same name used in the created or default email template in the CMS (Legacy stores).
- Select Enable Email Sending? and Use Default Sender.
- Fill in the Email Title field as desired.
- Fill in the Recipient (To) with {{email}}.
- In Html, enter the created or default email template information.
- Click on
Save
.
The JSON Data field must not be filled or its data used in the email template. It only contains information to allow a preview of the format in which the data will be viewed in the email.
SPF Release
The SPF release is essential to avoid problems with email deliverability and must be performed according to this article on SPF configuration.
As a good practice for configuring DNS for a generic domain (not mandatory), follow the example below:
Learn more at Setting up DNS pointing to VTEX.
Configuring trigger
In this step, you must create a trigger in Master Data, which involves completing some values to determine the trigger and defining some filters:
- Checkout: The trigger will be enabled if the checkout is not completed and is different from null, i.e., if the customer does not place the order.
- Cart: Refers to the last products the customer added to the shopping cart. The trigger will be enabled if the value is different from null.
- Last cart: Records the date and time the cart was created. The trigger will be enabled if the value is different from null.
- Receives newsletter?: Ensures compliance with the rights of data subjects, since only customers subscribed to the newsletter will receive abandoned cart emails. Subscription to your store's newsletter can be managed at checkout or in the My Account section of your store. The trigger will be enabled if the value is true.
For the trigger to be successfully activated, the filters must be completed following the instructions below:
-
In the VTEX Admin, go to Store Settings > Storefront > Master Data.
-
In Master Data, click Applications > Advanced Settings > Data structure.
-
Click the Trigger tab.
-
Click the
Add New
button. -
Complete the following fields:
- Name: Enter the trigger name.
- Data Entity: Select the Customer entity.
- Status: Check the Enabled option.
-
On the Rules tab, select An attribute value is changed.
-
Under Field, select Last session.
-
Click
Add Filter
five times to display the filter fields. Select them and complete the information as shown below:- Checkout - Different from - Completed - and
- Checkout – Is not null – and
- Cart - Is not null - and
- Last cart - Is not null - and
- Receives newsletter? - Equal to - true
-
Click the Schedule tab and select whether the email should be sent as soon as possible, on a specific date or on a dynamic date.
-
Click the If Positive tab.
-
Complete the fields following the instructions below:
- Action: Select Send an email.
- **Recipient: Enter your email as a test, and click
Add Static Email
. - Email body format: Select HTML.
- Sender's name: Enter your store name as you want it to be displayed as the email sender.
- Reply to: Enter the email address to which the customer can reply.
- Content type: Select URL content.
- Subject: Enter the subject of the email.
- URL: Enter your store's address, including the folders where the layout of the abandoned cart was configured, followed by the cart tag
{!carttag_SCORE}
. Example:storename.com.br/CEM/Abandoned-Cart?refs={!carttag_SCORE}
. - In Add utm_source to all links with this value: Enter CEM to facilitate the identification of purchases made via abandoned cart.
- Overwrite utm_source: Check this option.
-
Click
Save
. -
Create a cart and close the page to test the trigger.
A page session expires in 30 minutes. Only after this time does Master Data start counting the time scheduled for the Abandoned Cart trigger. Therefore, the time until the email arrives corresponds to the session time (30 minutes) plus the time scheduled in the trigger.
- Once you have received the abandoned cart message in your email, in the Recipient field (step 12), select the CL:Email option and click
Add Dynamic Email
. - Click
Save
.
Configuration for VTEX IO stores
To configure the abandoned cart functionality in VTEX IO stores, follow these steps:
- Install the app Abandoned Cart Service in your store.
- Configure the email template in Message Center. JSON specifications are available at Message Center Information.
- Perform the SPF release.
- Configure the trigger the same way as in Legado stores up to Step 10. From Step 11 (If positive tab), follow the instructions available at Trigger configuration information.
Frequently Asked Questions (FAQ)
My trigger settings are correct, but the test email address is not receiving emails. What must be checked?
To ensure the correct trigger flow, check two details:
- Is the template URL working?
To ensure that the URL is working, test it directly in the browser. Replace the {!carttag_SCORE}
value with the ID of a SKU that is active and available on the website. If the URL returns an error, triggers will not work correctly.
- Is the Request Capture (RC) working properly?
To check whether the RC is working, update the website homepage by monitoring requests through the browser's developer tool (using the F12 key in Chrome, for example). Find the rc.js request and check if it is returning the content. If the return is empty, please contact VTEX Support.
Is the data captured by RC updating the records in Master Data?
To check this, go to your store's website and add a product to the shopping cart. Click on complete purchase, enter your email and confirm. Close the browser at any moment of checkout — from filling in your personal data to selecting the payment method. Wait 30 minutes, go to the Master Data module, check whether the email used appears as a new record and if the fields “Last browsing data” were updated.
If you already have a record in the store, go to the website and log in, add a product to the shopping cart, and close the browser. Wait 30 minutes, go to the Master Data module, and check whether the fields Last browsing data were updated.
Can I have more than one abandonment cart template?
You can have as many email addresses as you want; you just need to inform all URLs and the frequency for each of them.
Can I give you a discount via email? How can I do that?
Yes, you can offer a discount to customers who return to the store through this email. To do so, you must create a discount coupon to be emailed to the client or a promotion using UTM directly in the template.
How can I get a report on the purchases recovered using this feature?
You will be able to monitor the recovery of these sales through your Analytics tool.
Are there any prerequisites to configure this feature in my store?
To configure the abandoned cart feature, your store must be in a production environment to update the Master Data fields. This feature is not available for development environments.