ebs.setJourneyContext
(FintechOS Studio 21.1.1 and later)
Sets a context name for the digital journey.
This allows form driven flows that are shared between multiple digital journeys to identify the digital journey that initiated the flow.
Once set, the digital journey context cannot be modified in subsequent flow steps, unless cleared using ebs.cleanJourneyContext.
Also see ebs.getJourneyContext.
Syntax
Copy
function ebs.setJourneyContext(digitalJourneyName: string): Promise<any>;
| Parameter | Type | Description |
|---|---|---|
digitalJourneyName
|
string | Name of the digital journey. IMPORTANT! When using ebs.setJourneyContext in conjunction with flow control rules that are evaluated only for specific digital journeys, make sure this parameter matches the exact name of the digital journey. |
Response
Returns a promise object, allowing you to associate handlers in case of success or failure.
Examples
In this example:
- In the After Events section of the originating form driven flow step, we set the context as belonging to the newCustomer digital journey.Copy
ebs.setJourneyContext('newCustomer') - On the final step of the shared flow, we display a message if the shared flow was initiated from the newCustomer digital journey.Copy
if (ebs.getJourneyContext().DigitalJourneyName == 'newCustomer'){
ebs.showMessage('Thank you. We will now proceed with your registration.')
}
For more details about reading the digital journey context, see ebs.getJourneyContext.