Configuring Identity Flows

Objective

After completing this lesson, you will be able to configure personalized user interactions using the Identity Flow Builder's components and publishing mechanisms.

Identity Flow

Identity Flow Builder

The Identity Flow Builder is a web-based tool that allows business teams design and automate how their site interacts with users — such as when to show a screen, trigger an event, or apply a rule — all without writing code. These automated sequences are called "Identity Flows".

Take the example of a sports newsletter. When a user interacts with a site, the Identity Flow automatically determines whether and how to engage them with a newsletter prompt. Rather than every user seeing the same experience, the flow applies a set of rules behind the scenes — checking conditions, tracking how many times a user has been approached, and considering timing — to decide the right action at the right moment. The result is a personalized, controlled interaction that feels seamless to the user but is fully configurable by the business team.

Identity Flow Builder interface showing a sports newsletter flow with Condition, Counter, and Screen-Set components.

Components of Identity Flow

Let’s discuss the components of Identity Flow.

  • Condition
  • Time Period
  • Counter
  • Event
  • Screen-set

We'll look at each component in detail.

Condition

A Boolean JavaScript expression that controls the flow of the Identity Flow. The Condition action can use the fields in your schema. An example of a Condition's boolean Javascript expression:

Code Snippet
123
account.profile.gender != null && accounts.profile.age >= 21 && !account.subscriptions.subName.email.isSubscribed
Time Period

The Time Period action is a time frame control in the Identity Flow; it allows you to control when an Identity Flow runs.

There are three execute choices: until, during, and from for the Time Period's time frame.

Counter

A Counter tracks the number of times a specific point in the Identity Flow has been reached for a given user. Once the count hits a defined threshold, the flow branches accordingly — for example, stopping a newsletter prompt from being shown more than three times.

Event

An Identity Flow triggers an event when an Event component is encountered in an Identity Flow.

Screen-Set

Screen-Set is a set of screens that you have predefined. The Identity Flow Screen-Set action invokes the specified screen during the Identity Flow.

Diagram showing Identity Flow components and their functions: Boolean JavaScript expression, time frame control, limit execution times, invoke specified screen, and trigger an event.

Publishing and Invoking an Identity Flow

After creating and editing an Identity Flow, you can test the flow, save it as a draft, or publish it.

After publishing the Identity Flow, it will be invoked by your CIAM application through the SAP Customer Data Cloud Web SDK. Here’s a summary of the published states and their behaviors.

Draft

What it is: A saved but non‑live version of the flow (either a brand‑new flow or a previously published flow that was explicitly "Unpublished").

Behavior: Not invoked by your CIAM application via the Web SDK; safe for editing and testing.

Published

What it is: The active, live version of the flow after you select "Publish" or "Revert (to publish)" a prior version.

Behavior: This version is invoked by your CIAM application through the SAP Customer Data Cloud Web SDK.

Draft with prior version published

What it is: You are editing a flow that already has a published version; your edits are saved as a new draft while the previous version remains published.

Behavior: The currently published (prior) version continues to be invoked by the Web SDK until you publish the new draft; your in‑progress edits are not live.

In short: Draft is non‑live, Published is the live version invoked by the Web SDK, and Draft with prior version published means you’re working on changes while the existing published version continues to run in production.

Diagram illustrating the publishing states of an Identity Flow: Draft, Published, and Draft with the prior version Published, alongside a UI snippet showing the flow status and code.

The following example demonstrates how to use the SAP Customer Data Cloud JavaScript Flow API to define and execute a custom "favorite_team" flow with event handlers for specific conditions (e.g., underage, no_favorite_team), plus completion and error handling.

To see how it works, copy and paste the code snippet into your CIAM application using the SAP Customer Data Cloud Web SDK.

Code Snippet
123456789101112131415
const flow = gigya.flow("favorite_team") .on("underage", (eventData) => { /*...your logic here...*/ }) .on("no_favorite_team", (eventData) => { /*...your logic here...*/ }) .complete(() => { /*...your logic here...*/ }) .error((errorData) => { /*...your logic here...*/ }); /*start executing the flow*/ flow.execute();

Creating Identity Flows Using SAP Customer Data Cloud Flow Builder

This video demonstrates how to use SAP Customer Data Cloud's Flow Builder to create an Identity Flow that checks whether a customer's country field is populated. Depending on the result, it either prompts the user to update their profile or triggers a welcome event.

Summary

  • Identity Flow Builder is a no-code, web-based tool within SAP Customer Data Cloud that enables business teams to design and automate personalized user interactions (called Identity Flows) — such as conditionally displaying screens, triggering events, or applying rules.
  • Five core components make up an Identity Flow: Condition (Boolean logic to branch the flow), Time Period (controls when a flow runs), Counter (limits how many times a user encounters a step), Event (triggers an action at a specific point), and Screen-Set (invokes a predefined screen).
  • Publishing states determine whether a flow is live: a Draft is non-live and safe to edit; a Published flow is the active version invoked via the SAP Customer Data Cloud Web SDK; and Draft with prior version published allows editing while the previous published version continues running in production.
  • Invoking a flow is done programmatically through the SAP Customer Data Cloud JavaScript Web SDK using the gigya.flow() API, which supports named event handlers, completion callbacks, and error handling.