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.

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 Snippet123account.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.

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.

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.
123456789101112131415const 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.