Wait Until API Event

Journey Builder

Journey Builder is a marketing automation tool, that let you take individuals send them into the marketing automation flow based on those individual actions you can send Messages (Email/SMS/Push), update data in Sales/Service cloud and also you can extend using custom activities.

Wait Until Event Activity

It will allow an external event to trigger an action mid-journey to provide contacts a real-time experience. This is a brand-new activity that launched in April 2021 and makes it simple for marketers to send follow-up emails in real-time. This is a different kind of wait activity. Previously, the wait activity had just one path, but now it has two.

If an api event is called and a condition is met (if any), the subscriber will automatically be moved to the top path and the next action in the flow will be called.

If the wait timer runs out, the subscriber will automatically be directed to the path below, where the next action in the flow will be called.
This activity can be used in all of the entry source (Api, DE, Cloud page, Salesforce Data).

Before moving on to the next action in a journey, configure the Wait Until API Event activity to hold contacts until an event occurs, such as a purchase or loan application. You can also design personalised experiences for contacts who don't complete the required activity within a certain amount of time.

Wait Until Event

Configure a Wait Until Event Activity
Follow these steps to configure a Wait Until API Event activity in Journey Builder

  1. Drag the Wait Until API Event activity onto the canvas.
  2. Click to open the wait activity.
  3. Select an API event or create one.
  4. Click the Filter Criteria tab and set the filter criteria.
  5. Click Done.
  6. Click the Maximum Wait Duration tab and set the maximum number of hours or days contacts are held in this activity before taking the no-event path.
  7. Click Summary and review your settings.
  8. Click Done.
  9. click here for more information

This wait activity can be triggered by an API call; this event will work in the same way as an API entry source, with the exception that when this event is triggered, it will advance the user to the next flow from where they were previously held.
By customising this activity, you can utilise it to do actions based on the click activity.

The examples below show how I used the Wait Until Event Activity.
I used DE as an entry source for this Journey, as well as three email activities and one wait until event activity.

  • When the subscriber enters the journey, the first email will be sent.
  • When the wait until event occurs call is made, the second email will be sent.
  • Those who do not take the requested action within the allotted timeframe will receive a third email.
Wait Until Event

In the example above, three records were entered into the journey, one of which took action while the others waiting.
The sample code for calling the Wait Until Event activity is shown below.

Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
POST /interaction/v1/events
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN
{
"ContactKey": "contact key",
"EventDefinitionKey": "EventDefinitionKey",
"Data": {
"Email": "emailAddress",
"Field-2": "value",
.
.
"Field-n":"value"
}
}