Postscript integrates with Retention.com, allowing you to share information between the two solutions. With our integration, you can:
- Pass a custom Viewed Product event or Add to Cart event tied to an email address to Postscript.
- Send a subscriber who has an opted-in email address and phone number a cart recovery SMS automation such as Product Viewed or Add to Cart.
In this article, we'll provide you with the correct Retention.com script to add to your store, guide you through how to set up the integration, then walk you through how to create cart recovery automations.
Before We Begin
Before we begin, it's important to make sure your account is set up to properly integrate Postscript and Retention.com. Please review the following items before attempting to configure the integration.
- Our integration is compatible with Retention.com's Reclaim product and will not work properly if you are using Retention.com's Grow product.
- Please contact your Retention.com representative to enable this feature in your Retention.com account before attempting to configure the integration.
- Before creating your automations, be sure to contact your Client Success Manager at Retention.com and request a Test Event.
- Finally, you must have the most recent version of Retention.com's script on your website. You can find your script in your account under Code Script, then View Script.
- For each automation, you must add the appropriate Add to Cart script or Viewed Product script to your site. This is covered below.
Adding Retention.com Script to Your Site
Add to Cart Script
Inside of your site builder, add Retention.com's Add to Cart script to fire when someone clicks to add an item to their cart:
geq.addToCart(item);
Next, edit the snippet.
Generic code for buttons defined by a button ID:
<script type="text/javascript">
document.getElementById("AddToCart").addEventListener('click',function (){
geq.addToCart(item)
});</script>
Generic code for button defined by a class notation:
<script type="text/javascript">
var item_classnames = document.getElementsByClassName("AddToCart");
for (var i = 0; i < item_classnames.length; i++) {
item_classnames[i].addEventListener('click', function () {
geq.addToCart(item);
});
}
</script>
Product Viewed Script
Inside of your site builder, add Retention.com's Viewed Product script to fire when someone views a product:
<script>geq.event('Viewed Product Reclaim', item);</script>
If you do not have an existing Viewed Product tracking script, add this to your theme:
<script type="text/javascript"> var item = { Name: {{ product.title|json }}, ProductID: {{ product.id|json }}, ImageURL: "https:{{ product.featured_image.src|img_url:'grande' }}", URL: "{{ shop.secure_url }}{{ product.url }}", Brand: {{ product.vendor|json }}, Price: {{ product.price|money|json }}, CompareAtPrice: {{ product.compare_at_price_max|money|json }} }; geq.event('Viewed Product Reclaim', item); </script>
Once you've added the appropriate script to your website theme, we can configure the integration by creating a Private API key in Postscript, then adding that key to your Retention.com account.
Create a Postscript API Key
- Select your Shop Name in the side menu of your Postscript dashboard, then select API.
- Select Create Security Key Pair on the right side of the page, then confirm your action by selecting Yes.
- Add a label to your API key so you can track where this API key is being used.
- Select Show in the Private Key column to reveal your API key. Copy this key or write it down—you'll need to enter it in Retention.com later.
Configure Postscript in Retention.com
1. From your Retention.com account, select Integrations on the left-side navigation panel. Then select the Available Integration tab in the upper right.
2. Find and select Postscript, then paste the private API key you generated earlier in this article.
3. Select the Update Credentials button.
4. To activate the integration, select the Enable toggle bar, then select the Finish button.
Create an Add to Cart Automation
1. Before building your automation, be sure to contact your Client Success Manager at Retention.com and request a Test Event.
2. From your Postscript dashboard, select Messaging. Then select Automations.
3. Select the Create Automation button in the upper-right corner, then choose Create Automation Flow.
4. Select the Use an automation template option, then select the Continue button.
5. From the available templates, select Browse Abandonment - Product Added to Cart. Then select the Create flow button.
6. Under Automation Properties, select the dropdown below Add a subscriber when and choose Retention.com - Add_To_Cart_Reclaim.
7. To ensure your subscribers don't receive duplicate Product Added to Cart automations, we'll add additional filters to remove any subscribers who are actively in your existing Product Added to Cart automation. To do this, select the dropdown under Include a subscriber only if and configure the following parameters: Currently in Automation Flow does not include. Then choose your existing Product Added to Cart automation.
8. Optional: Add additional filters such as limited subscriber entry and a cancellation trigger. We recommend removing a subscriber from this automation when the event Order Created occurs.
9. Save your automation by selecting the Save button in the bottom-right of the property editor.
10. Add actions to your flow by dragging and dropping the Send Message icon, Delay icon, or A/B Split icon into your flow.
11. When you add a message to your flow, you can select the overlapping tags icon in the bottom-right corner of the message editor to add merge tags. Below are example Trigger Event Properties from the test event. You will need to modify the node to add the Trigger Event Properties that you're passing through with our event (Note: If you're using our custom Shopify integration app, the below merge tags will be the Trigger Event Properties).
12. Once you're ready to send your flow, select Schedule or Activate in the top-right corner of the page. You have two options when sending a flow:
- Activate immediately: This option will immediately begin the flow allowing subscribers to enter the automation based on the selected properties.
- Activate at a scheduled time and date: Choose when you'd like the flow to begin allowing subscribers to enter.
Create a Product Viewed Automation
1. Before building your automation, be sure to contact your Client Success Manager at Retention.com and request a Test Event.
2. From your Postscript dashboard, select Messaging. Then select Automations.
3. Select the Create Automation button in the upper-right corner, then choose Create Automation Flow.
4. Select the Use an automation template option, then select the Continue button.
5. From the available templates, select Browse Abandonment - Subscriber Viewed Product. Then select the Create flow button.
6. Under Automation Properties, select the dropdown below Add a subscriber when and choose Retention.com - Viewed_Product_Reclaim.
7. To ensure your subscribers don't receive duplicate Subscriber Viewed Product automations, we'll add additional filters to remove any subscribers who are actively in your existing Subscriber Viewed Product automation. To do this, select the dropdown under Include a subscriber only if and configure the following parameters: Currently in Automation Flow does not include. Then choose your existing Browse Abandonment - Subscriber Viewed Product automation.
8. Optional: Add additional filters such as limited subscriber entry and a cancellation trigger. We recommend removing a subscriber from this automation when either Order Created or Checkout Started occurs.
9. Save your automation by selecting the Save button in the bottom-right of the property editor.
10. Add actions to your flow by dragging and dropping the Send Message icon, Delay icon, or A/B Split icon into your flow.
11. When you add a message to your flow, you can select the overlapping tags icon in the bottom-right corner of the message editor to add merge tags. Below are example Trigger Event Properties from the test event. You will need to modify the node to add the Trigger Event Properties that you're passing through with our event (Note: If you're using our custom Shopify integration app, the below merge tags will be the Trigger Event Properties).
12. Once you're ready to send your flow, select Schedule or Activate in the top-right corner of the page. You have two options when sending a flow:
- Activate immediately: This option will immediately begin the flow allowing subscribers to enter the automation based on the selected properties.
- Activate at a scheduled time and date: Choose when you'd like the flow to begin allowing subscribers to enter.
Compliance Requirements
Carriers enforce policies for abandoned shopping carts and abandoned checkout flows to ensure that their end consumers receive a consistent experience.
All automations related to abandoned shopping carts and abandoned checkouts should:
- Be limited to only one message
- Send the message within 48 hours of the trigger event
This is an industry-wide regulation; these policies are not driven by Postscript and they affect every SMS platform. Carriers require non-compliant senders to be blocked from sending messages to subscribers.
Get Support
Have questions? Please feel free to reach out to our wonderful Support team at support@postscript.io or via live chat. You can also submit a support request here!
Need ongoing channel strategy guidance? Please fill out this form and we'll connect you to one of our certified partners.