Engagement Cloud for Magento 2/Magento or Shopify connector user?
If so, abandoned cart functionality is configured and implemented differently - and the information below will not apply. Please instead read the Engagement Cloud for Magento 2/Magento or Shopify connector articles.
In the abandoned cart questionnaire, there is one question regarding the link URL:
Is it possible to access an abandoned cart from a single URL?
We require this so that your customers can return directly to their shopping cart by clicking a link on the abandoned cart email that they receive from us.
To guide you, this article helps you to understand how this can potentially be achieved.
A user will add several items to their cart. They may then abandon their cart. Some time later (say, 20 minutes) we will send them an email saying something along the lines of, "You have abandoned your cart. Want to continue?"
In clicking to continue they will click a link in that email.
Ideally, that link will take them back to your website, and the items they previously added to their cart will still be there, ready for them to purchase.
It's important to note here that your customer may not pick up that email on the same device that they originally created the cart on. For example, if they created the cart on their home PC, and then left the house, they could then receive the email on their mobile.
You will need to generate that link, and supply it as part of the JSON that you send to us.
That link has to be a single URL that will return the user to their cart, as outlined above.
The challenge is that many sites do not have a way to link back to a cart that hasn't been fulfilled.
Here are a few scenarios that may fit how your site works.
Scenario 1: Carts are stored in a database on the server
This is the best possible scenario. Usually, if this is the case, the cart in your own database will have an ID. Using this method, it should be possible/easy to construct some URL that takes a user straight back to their cart. For example:
Scenario 2: Carts are stored in browser cookies or local storage
Often an unfinished cart is not actually stored in a database, but is simply stored in a user's browser (either in cookies, or local storage).
In this case, their cart will often be present when they return to your site providing they are using the same device/browser. For example, if the link read:
They may navigate straight back to their partially completed cart, if it were stored in this way. The problem here is that we can't tell they are using the same device.
A possible solution is to encode the cart onto a URL, and then rebuild that cart when they revisit your site. For example:
That would add product ID 123 (quantity x 2), ID 345 (quantity x1), etc.
Obviously, it would be up to your site's developer to introduce this mechanism, then they can build such a link as part of the code that generates the JSON.
Scenario 3: Cart is stored in the database, but tied to a given user ID
In this scenario, the cart may be stored against a user who has logged into your website. This means that we cannot simply recover the cart using a cart's ID (as per the first scenario), but require the user to log in.
So here, simply linking to the login page would be the best option:
To make things even better, it may be possible to navigate directly to the cart page after the user has logged in:
As an added benefit, if a user is using a machine that they have previously logged in on, then the above would probably navigate the user directly to the cart page, without even requesting that the user logs in.
Scenario 4: Single item purchases
If none of the above are possible, but the customer is purchasing a single item (a holiday, for example, would typically be a single purchase), then simply linking back to that item may be the most sensible thing to do:
That way, they link straight back to a page which allows them to click 'purchase' right away without having to search for their chosen item again.