Create a Decision Split for a Single Journey
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.
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.
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. Let’s follow along as she builds the other components of her journey.
In this module, we assume you are a Marketing Cloud admin with the proper permissions to create journeys and SQL activities. If you’re not an admin for Marketing Cloud, 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 isn't available in the Trailhead Playground.
Create a Query Activity for Automation Studio
Isabelle navigates to Automation Studio in Marketing Cloud and creates a new query activity for this campaign. Follow along as she creates this activity.
- In Automation Studio, click Activities.
- Click Create Activity.
- Select SQL Query.
- Isabelle adds the name, external key, and description to the query activity.
- 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.
- Isabelle also adds a field that contains the unique tracking alias for the dynamic link in the first email message.
- 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’
- Isabelle clicks Validate Syntax to make sure her SQL is constructed correctly.
- She chooses the Email Clicks data extension that holds the results of the query activity.
- She sets the activity’s data action to Overwrite.
- 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.
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.
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.