Skip to main content

Uniphore Customer Portal

Using Service Flow Custom Types

A Service Flow uses the built-in ServiceFlow Custom Type variable to share its execution status with its calling Flow.

At runtime, you can use the status passed to this Custom Type (e.g., OffersFlowState in the example below) as well as other active Session or User Variables.

Service Flow Variables Usage Example

The following Intent Flow example uses the Concurrent Flow step Check Premium Offers, which calls the Service Sub-Flow Get Available Offers.

Whenever you create a Concurrent Flow step, you assign a ServiceFlow Custom Type that will store its execution status:

ConcurrentFlowUseCase1-AssignServiceFlowCustomType_220620.png

Whenever you create a Wait Point step, you select the ServiceFlow Custom Type that will monitor Concurrent Flow execution status:

ConcurrentFlowUseCase1-WaitPointStepVariables_220620.png

As shown above, you can use variables in the Output Variables Mapping section to pass required runtime data to the Flow after the Wait Point is reached.

For example, if the status field in OffersFlowState is set to COMPLETED, the Intent Flow continues and the value of the Session Variable CurrentDealsPremium is passed back to the calling Flow.

The complete example Flow looks like this:

ConcurrentFlowUseCase1_220620.png

Our example Service Sub-Flow runs an Integration Point element to fetch all offers that are available for Premium customers from an external database. The Integration Point stores the returned list of offers to a Session Variable called CurrentDealsPremium.

When the calling Intent Flow reaches the Wait Point step Get Offer Results, the Wait Point checks the OffersFlowState Custom Type variable to determine the status of the Check Premium Offers step. If execution is completed, the CurrentDealsPremium list can be displayed to the user.

Additional steps or elements may be added to handle other potential statuses of OffersFlowState.

Note

When using Concurrent Flows, the assigned Service Flow Custom Type values remain available as long as the calling Flow is running. When the calling Flow finishes, all Flow variables are reset.