Skip to main content
Répondez à notre enquête sur la communauté de dix minutes. L'enquête est ouverte jusqu'au 19 juillet. Cliquez ici pour participer.

Durée estimée

Thèmes

Demander à la communauté

Create Branching with Decision Elements

Learning Objectives

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

  • Describe how branching logic works in a flow.
  • Describe the characteristics of a decision element.
  • Configure a decision element.

How Branching Works in Flow

In the previous unit, you built a Super Kicks campaign flow with all contacts entering the campaign. Now it's time to make sure each contact receives the right message. High spenders get early access, new customers get a product recommendation, and everyone else gets the standard launch message. That’s branching logic in action. Instead of one linear journey, the flow splits into multiple paths, each with its own content and actions.

In Marketing Cloud Next, you implement branching logic using the Decision element. When a flow reaches a Decision element, it evaluates the contact against criteria you define. Based on the result, each contact follows a specific outcome path.

A key rule to remember is that flows evaluate outcomes in order, and the first match wins. The flow checks Outcome 1. If a contact qualifies, evaluation stops. If not, the flow checks Outcome 2, then Outcome 3, and so on. If a contact doesn't match any defined outcome, they follow the default outcome, which acts as a catch-all.

Because of this behavior, order matters. Place your most specific or most restrictive criteria first, and leave the broadest path as the default.

Decision Element Structure

A Decision element has three key parts.

A Decision element in Flow Builder.

Decision Label

The label is the name shown on the canvas. Give it a clear, descriptive name.

Outcomes

Outcomes are the possible paths a contact can take. Create one outcome for each distinct branch, plus a default. For example, in the Cloud Kicks example, the outcomes include high-value customers, recent customers, and a default outcome. Each outcome creates a separate connector on the canvas, and you build the rest of the journey from there.

Outcome Conditions

Conditions define the criteria for each outcome, except the default. Each condition has three parts.

  • The Resource field is where you select what the flow should evaluate. In campaign flows, you select attributes from the data graph. The Resource menu contains a structured list of data graph objects.
  • The Operator defines how the attribute is compared. Common operators include Equals, Does Not Equal, Greater Than, Is Null, and more.
  • The Value is the label you're testing. This can be a typed entry (like a number or a text string) or a reference to another field.

Any contact who does not match the defined outcome conditions automatically follows the default outcome. It ensures that no one gets stuck without a route forward.

Now that you understand how Decision elements split a flow based on customer data, apply this structure to the Cloud Kicks campaign. You need to follow along with the steps outlined next in order to complete the challenge at the end of this unit.

Decision Element Configuration

To set up decision branching, you work directly in Flow Builder. Before adding the decision logic, create a formula resource that calculates whether a contact was created in the last 30 days. The Decision element references this resource when evaluating the recency condition.

  1. In the Super Kicks Launch campaign record, select Open Flow.
  2. On the Flow canvas, select Toggle Toolbox.
  3. Select New Resource.
  4. Specify these details.
    • Resource Type: Formula
    • API Name: DaysSinceCreated
    • Data Type: Date
    • In the Formula window: Today()-30
    • Select Check Syntax
  5. Select Done.
    The New Resource window where you create resources required for the flow.

Select a Data Graph for the Flow

Each flow uses its own data graph, separate from the org default, so it accesses only the data it needs. The org default determines which data populates your messages for personalization. The flow data graph determines which data the flow can evaluate and use for decisioning. Connect a data graph directly to the flow to make those fields available in the Decision element.

  1. In the Super Kicks Launch campaign record, select Open Flow.
  2. On the Flow canvas, select View properties.
  3. In the Data Graph field select Marketing.
  4. Select Done.

The Edit version properties window where you select the data graph for the flow.

Add the Decision Element for High Value Customers

  1. In the Super Kicks Launch campaign record, select Open Flow.
  2. Below the Start element, select Add Element .
  3. Search for and select Decision.
  4. Enter Label: Customer Groups. API Name: Auto-populates with Customer_Groups.
  5. In the Outcome Details section, add the following details.
    • Outcome Label: High Spending Customers
    • Resource: Select Related Objects | Unified Link Individual MKT | Individual | Account | Annual Revenue Amount
    • Function: Count
    • Operator: Greater Than or Equal
    • Value: 1
    • Where: All Conditions are Met
    • Resource: Annual Revenue Amount
    • Operator: Greater Than
    • Value: 5000

The Decision Element configuration for high spending customers.

Add the Decision Element for Recent Customers

  1. In the Outcome Order section, select New Outcome.
  2. In the Outcome Details section, add the following details for :
    • Outcome Label: Recent Customers
    • Resource: Select Related Objects | Unified Link Individual MKT | Individual | Account | Created Date
    • Function: Count
    • Operator: Greater Than or Equal
    • Value: 1
    • Where: All Conditions are Met
    • Resource: Created Date
    • Operator: Equals
    • Value: DaysSinceCreated
  3. Select Close to save your changes.

The Decision element where you define the outcomes details and conditions.

You've set up the three decision splits. Next, you add an email message to each path.

Add Email Messages

For each decision outcome, add a Send Email Message element and select the email for that path.

  1. Select Add Element following the High Spending Customers decision outcome.
  2. Select Send Email Message.
  3. Specify these details.
    • Label: Early Access Email
    • Choose Select Email.
    • Select Super Kicks Early Access, then select Add.
    • In the Select Communication Subscription section, select Marketing.
  4. Select Close to save your changes.

The Send Email Message action where you select the email to send.

  1. Repeat the steps to add email to the Recent Customers and Default Outcome paths.

Path

Label

Select Email

Recent Customers

Product Recommendation Email

Super Kicks Product Recommendation

Default Outcome

Default Email

Super Kicks Launch

Note that the Blank Email template automatically adds a Send Email Message element to the flow. Because your flow already includes Send Email Message elements for each decision outcome, delete the default element before saving and activating the flow.

  1. On the default Send Email Message Action element, select Actions, and select Delete.
  2. Save the flow and select Activate and then Activate.

The flow with the decision outcomes and email for each path.

When you activate the flow, the campaign is essentially live and already running. The contacts who qualify enter the journey based on the flow's trigger.

In this unit, you built the logic that gives each contact a personalized experience. You configured Decision elements to split the flow into three paths and assigned an email message to each one. Now that you’ve completed the steps in this unit, you’re ready to check the challenge to move on to the next unit.

In the next unit, you explore how to use path experiments to test and optimize your campaign.

Resources

Partagez vos commentaires sur Trailhead dans l'aide Salesforce.

Nous aimerions connaître votre expérience avec Trailhead. Vous pouvez désormais accéder au nouveau formulaire de commentaires à tout moment depuis le site d'aide Salesforce.

En savoir plus Continuer à partager vos commentaires