Abandoned cart flow : Magento 2 checkout reclaim URL send me to 404 error

  • 4 January 2022
  • 2 replies

Badge +2

In our abandoned cart workflow, I’m using {{ organization.url }}reclaim/checkout/cart?quote_id={{ event.QuoteID }} as the button link. When clicked, I’m getting a 404 error code page. We use Magento 2 for our website, so wondering why the Magento 2 dynamic cart rebuild link isn’t working.


Best answer by breeatnorthern 5 January 2022, 15:58

View original

2 replies

Badge +4

Hi @ngriffith!

In your Klaviyo account settings, check your organization URL. If the URL contains a slash at the end, it may be causing a double slash in the cart rebuild URL and is therefore rendering a 404.

Try the following, which includes an additional little piece of information within the variable that tells Klaviyo to remove the slash out of your URL when creating a customer’s rebuild cart link. You’ll notice it includes “|trim_slash” after the organization.url variable.

{{ organization.url|trim_slash }}/reclaim/checkout/cart?quote_id={{ event.Extra.QuoteID }}

Hope this solves it for you!

Userlevel 7
Badge +60

Hello @ngriffith,

Welcome to the Klaviyo Community!

From the URL you’ve shared, it looks like the 404 page may be caused by a syntax error as you’re missing a } at the end of your URL. I would suggest using the following URL and see if that helped alleviate the issue: {{ organization.url|trim_slash }}/reclaim/checkout/cart?quote_id={{ event.Extra.QuoteID }}

From my experience, if you’re still being returned to a 404 page, this may indicate an error between your Magento and Klaviyo integration. To resolve this, I recommend checking in your backend to ensure the two softwares are connected appropriately. You can also reach out to our Klaviyo Support Team to further see if there are any integration issues apparent within your Klaviyo account. 

One more additional note to keep in mind is that when previewing the email, the cart page you are brought to may be empty. This is an expected behavior if the user you were previewing the email as has since completed their purchase as I explained in the following Community post: 

I hope this helps!