How to trigger a journey via API

Overview

Sometimes you may want to trigger a journey in Ortto when a specific action occurs in an external app. While Ortto doesn't have a dedicated API trigger, different methods are available to trigger a journey via API. This article will guide you through these options.

Supported options

The following options are supported for triggering journeys via API:


Using custom activities

You can trigger a journey in Ortto whenever a specific custom activity is logged.

EX: Let’s say you want to trigger a journey when a contact is moved to the follow-up stage in your CRM pipeline.

Follow these steps to set up the journey trigger for this action:

  1. Create the Moved to follow-up custom activity (this name is just an example).
    1. Learn more about creating a new activity.
  2. Once the activity is created in Ortto, you can use it as entry criteria for any journey. In this example, we want to trigger the journey as soon as the activity occurs, so we we'll use the condition: Moved to follow-up occurs.
Triggering a journey when a specific custom activity is logged.

Once the journey is configured, simply trigger the custom activity on your side when the desired action occurs and the contact will enter the journey. Custom activities can be triggered from the backend, frontend, or through a middleware tool like Zapier.

TIP: If you want this journey to trigger more than once for the same contact (each time the custom activity is logged), set the option People can be in journey to Only once, and enter multiple times.


Using tags

You can add tags via API to trigger a journey in Ortto as soon as the tag is added to a contact. Follow the steps below to do this:

  1. Add the tag to the journey's entry criteria. To trigger the journey as soon as the tag is added, select the Tag added occurs condition followed by a where clause specifying the tag.
    Triggering a journey when a specific tag is added.
  2. Add the tag to the relevant contact(s) via API. Learn more about tagging people.

All set! As soon as the tag is added via API, the contact will match the entry criteria and enter the journey.

TIP: If you want this journey to trigger more than once for the same contact (each time the tag is added), make the following changes:

  1. Set the option People can be in journey to Only once, and enter multiple times.

2. Use a Remove tag shape to remove the tag from the contact after processing the journey. This allows the tag to be re-added later, triggering the journey again.

Using a Remove tag shape to remove the tag from the contact.


Using custom fields

You can update a custom field via API and configure the journey to trigger each time the field is updated to a specific value. Follow these steps to set it up:

  1. Create the custom field.
    1. Learn more about creating custom fields.
  2. Track the custom field to create an activity associated with it. You can then use this activity in the journey.
    1. Learn more about tracking a custom field.
    Tracking a custom field.
    3. After tracking the custom field, a new activity will be available for selection in the journey's entry criteria. For example, if your custom field is named Send follow up email, the activity to use in the entry criteria will be: Custom: Send follow up email changed occurs.
    You can add a Where clause to trigger the journey only when the custom field is changed to a specific value. In this example, the custom field is a boolean, so the only options are is true or is false. For other field types, you can specify specific values.
Triggering a journey when a custom field is changed to a specific value.

TIP: If you want this journey to trigger more than once for the same contact (each time the field is updated), set the option People can be in journey to Only once, and enter multiple times.