# Wait for an event or tag

**URL:** <https://forum.mautic.org/t/wait-for-an-event-or-tag/29659>\
**Category:** Product Support\
**Created:** [October 15, 2023, 7:56am UTC](https://forum.mautic.org/t/wait-for-an-event-or-tag/29659 "2023-10-15T07:56:37Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohammadali\_m](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mohammadali_m/32/10684_2.png) [@mohammadali\_m](https://forum.mautic.org/u/mohammadali_m)\
**Post date:** [October 15, 2023, 7:56am UTC](https://forum.mautic.org/t/wait-for-an-event-or-tag/29659/1 "2023-10-15T07:56:37Z")

</div>

Hello everyone.  
I want to send abandoned cart emails to users who add items to their cart but don’t complete the purchase within 30 minutes.

I need help setting up a campaign that waits for a “purchase” event and sends an email encouraging the user to complete their purchase if the event isn’t received within 30 minutes.  
Can anyone point me to documentation or provide guidance on the best way to configure this type of automated abandoned cart email campaign? Any help is appreciated.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [October 15, 2023, 12:47pm UTC](https://forum.mautic.org/t/wait-for-an-event-or-tag/29659/2 "2023-10-15T12:47:40Z")

</div>

Hi, sure, this is possible.  
Before I can give you the next steps:

- how do you push in the purchase event into Mautic? API?
- how do you push in the ‘cart abandonement’ event? API? Do you have a date value on when the abandonment happened?  
Joey

---

<div class="post-metadata">

**Author:** ![oscar2612](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/oscar2612/32/6583_2.png) [@oscar2612](https://forum.mautic.org/u/oscar2612)\
**Post date:** [October 15, 2023, 1:14pm UTC](https://forum.mautic.org/t/wait-for-an-event-or-tag/29659/3 "2023-10-15T13:14:59Z")

</div>

Hi Joeyk.

Pending your response. It is something that I am interested in seeing how it would be done.

Thanks for your contributions

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [October 15, 2023, 1:26pm UTC](https://forum.mautic.org/t/wait-for-an-event-or-tag/29659/4 "2023-10-15T13:26:16Z")

</div>

Like I said, depends how the relevant data is transmitted to Mautic.

---

<div class="post-metadata">

**Author:** ![mohammadali\_m](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mohammadali_m/32/10684_2.png) [@mohammadali\_m](https://forum.mautic.org/u/mohammadali_m)\
**Post date:** [October 15, 2023, 2:55pm UTC](https://forum.mautic.org/t/wait-for-an-event-or-tag/29659/5 "2023-10-15T14:55:51Z")

</div>

Hi Joeyk. Thanks for your response.  
I use the API for pushing events.  
For cart abandonment, I do not have any scenario yet. For customers that have Webengage service, it is straightforward. I create a journey when a user adds something to their cart and waits for the purchase event and after a certain amount of time, the system sends an email. If you could explain me how to do it with Mautic I would really appreciate it.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [October 16, 2023, 5:33am UTC](https://forum.mautic.org/t/wait-for-an-event-or-tag/29659/6 "2023-10-16T05:33:32Z")

</div>

Hi, I looked at webengage, and I’m not sure what data is submitted to Mautic.  
Does it have an API integration with Mautic?

---

<div class="post-metadata">

**Author:** ![mohammadali\_m](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mohammadali_m/32/10684_2.png) [@mohammadali\_m](https://forum.mautic.org/u/mohammadali_m)\
**Post date:** [October 16, 2023, 5:45am UTC](https://forum.mautic.org/t/wait-for-an-event-or-tag/29659/7 "2023-10-16T05:45:02Z")

</div>

No. It doesn’t. I was just talking about my past experience.  
The “cart abandonment” scenario in my mind is like this:  
user adds a product to their cart and an event is sent to Mautic. Mautic waits for 30 minutes and if the purchase event doesn’t fire a reminder email is sent to the user and asks him to complete his purchase.  
Is this scenario possible in Mautic or I should choose a different approach?

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [October 16, 2023, 6:18am UTC](https://forum.mautic.org/t/wait-for-an-event-or-tag/29659/8 "2023-10-16T06:18:53Z")

</div>

You can create 2 custom fields:

1. Last Cart Update
2. Last Successful purchase

When someone adds something to the cart, you make an API call to Mautic and push this information.  
When a payment is successful, you can add the timestamp to the Last Successful purchase.

For starting an Abandoned cart campaign running for 2 days, you can create the following segment:

“Last Cart Update” is less, then -30 minutes  
AND  
"Last Cart Update is more then -2 days  
AND  
“Last Successful Purchase” is empty

Make sure you set the “Last Successful Purchase” as Empty once you finished with the campaign.

Once the contact lands in the segment, emails can go out during your campaign.  
Once they purchase they will disqualify for the segment and the campaign is over.

---

<div class="post-metadata">

**Author:** ![mohammadali\_m](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mohammadali_m/32/10684_2.png) [@mohammadali\_m](https://forum.mautic.org/u/mohammadali_m)\
**Post date:** [October 16, 2023, 6:27am UTC](https://forum.mautic.org/t/wait-for-an-event-or-tag/29659/9 "2023-10-16T06:27:03Z")

</div>

Thanks. You are a genius.  
I’m delighted right now.
