Hey community, hope you’re all doing well! 
We’re putting together a process for reversing canceled orders, and I need to send the customer a cart link with the items from their previous purchase (the one they canceled).
Is there a way to generate this link automatically?
So far, we’ve been manually creating cart links via URL in the following format: https://www.loja.com.br/checkout/cart/add?sku=3507&qty=1&seller=1&sc=1 . However, the process is scaling up and we need to automate this part.
Ideally, we’d like to be able to generate a table or a .txt file with this info.
Cheers!
Hey Vitor (@Vfbohn), how’s it going?
Were you unable to get it working with any variation of the trigger configuration for abandoned carts using the rclastcart field from the CL entity (which stores the user’s last cart data)?
If it didn’t work for your case, I’d recommend setting up an Order Hook to send the IDs of canceled orders to a middleware to handle the desired processing.
But I’d first try to exhaust all the possibilities with the trigger configuration…
Cheers!
@Vfbohn all good?
My suggestion would be the one from @andremiani — I’d lean more towards Orderhook because you’ll be able to monitor it to use the Canceled status and then build the URL.
With this middleware (backend) you could save the built URLs in a spreadsheet in Master Data and use them to send emails to customers later.
Cheers,
Estevão.
Thanks for the response, Andre and Estevão!
I talked with the team about the solution you presented and at the moment we weren’t able to move forward with it due to the need for somewhat more complex configurations (for non-developers).
As a solution, I created a GPT where I import the canceled orders spreadsheet from VTEX and it already provides the links.
I instructed it to follow this tutorial: Como montar a URL do carrinho
I added instructions on where to find the information I need (columns AH and AI of the file exported from VTEX) and from there it’s just a matter of uploading the file in a chat where it generates a new file with 2 columns.
Column A - order number
Column B - Cart link
Since the process of reversing canceled orders is manual and we have closer contact with the customer, this solution will serve us better.
Thanks for the suggestions and best of luck to all of us! 