Skip to main content

Create a Decision Split for a Single Journey

Learning Objectives

After completing this unit, you’ll be able to:

  • Create an SQL Query activity.
  • Develop the journey decision splits, goals, and entry settings.
  • Create journey paths based on AMPscript links in an email.

Meet Isabelle

Isabelle smiling.

Isabelle Givens is the digital marketing manager for Northern Trail Outfitters. She wants to invite VIP customers to an exclusive event. Her next campaign uses a single journey to deliver two invitation emails (though she might add more, if needed). These email messages use AMPscript in the links and URLs, and she’s given each link a unique tracking alias for the personalized VIP offer included.

Add a tracking alias to an email message link

If her contacts click the registration link in the first email, she doesn’t want to send any future invites to those contacts. Since she’s using AMPscript in the links, she knows she can’t use a standard engagement split to drive her journey. Instead, she needs to create a custom decision split. But first, Isabelle creates her email messages and the Email Clicks data extension in Marketing Cloud Engagement. Let’s follow along as she builds the other components of her journey.

In this module, we assume you are a Marketing Cloud Engagement admin with the proper permissions to create journeys and SQL activities. If you’re not an admin for Marketing Cloud Engagement, that’s OK. Read along to learn how your admin would take the steps in a production org. Don't try to follow these steps in your Trailhead Playground. Marketing Cloud Engagement isn't available in the Trailhead Playground.

Create a Query Activity for Automation Studio

Isabelle navigates to Automation Studio in Marketing Cloud Engagement and creates a new query activity for this campaign. Follow along as she creates this activity.

  1. In Automation Studio, click Activities.
  2. Click Create Activity.
  3. Select SQL Query.
  4. Isabelle adds the name, external key, and description to the query activity.
  5. Isabelle adds a field for the Email ID of the first message to the data extension. This field provides the EmailID for the SQL statement that identifies the email message itself.
  6. Isabelle also adds a field that contains the unique tracking alias for the dynamic link in the first email message.
  7. Isabelle writes this SQL syntax for the query activity.
    SELECT c.SubscriberKey, c.EventDate as [ClickDate], c.LinkName as [Link]
    FROM [_Click] c with (nolock)
    join [_Job] j with (nolock)
    On j.JobID = c.JobID
    WHERE j.EmailID in (‘238311’)
    and c.LinkName = ‘Event Registration’
  8. Isabelle clicks Validate Syntax to make sure her SQL is constructed correctly.
  9. She chooses the Email Clicks data extension that holds the results of the query activity.
  10. She sets the activity’s data action to Overwrite.
  11. Finally, Isabelle saves the activity and puts it in an automation. She schedules the automation to run no more than 4 times per day for the duration of the campaign.

After Isabelle completes the automation, she moves on to creating the journey. In the journey path, Isabelle puts in the first email message and follows it with a decision split. She sets the decision split so that contacts who clicked the email will take a path without the reminder email. To be specific, the criteria includes all contacts from the Email Clicks data extension where the field is not null (in other words, all contacts in the data extension). Those contacts do not receive any more email messages. The other path takes the remainder of the contacts and sends them the second email message.

Note

Isabelle could also use a goal instead of a decision split. She could make contacts who clicked the link in the email message achieve the goal and have them exit the journey.

Decision split criteria considering whether the SubscriberKey is not null.

Finally, Isabelle sets the Contact Entry setting on the journey to No re-entry to make sure contacts that exit the journey won’t be put back in. This setting prevents those who already received an invitation from receiving another version.

Another Path

This solution works for Isabelle’s initial effort on a single journey, but she also wants to expand this solution to handle multiple journeys. In the next module, she’s going to add some complexity that scales to handle her expanding needs.

Resources

Keep learning for
free!
Sign up for an account to continue.
What’s in it for you?
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities