Passing Data from Next Best Action to Flow
When a user clicks on the Accept button in a Next Best Action recommendation, the associated Flow will be invoked. NBA attempts to provide the Flow with the original context record ID (such as the Case ID of the Case Record Page where the user clicked the Accept button) and the ID of the recommendation that was selected.
These can be used by the flow for a variety of useful purposes. For example, if the Recommendations have a custom field called “Category”, you might want your flow to check and do different things based on the category of the accepted proposition.
In order to utilize these values in a flow, the flow has to define input variables to “catch” the incoming data. Do that as follows:
1) create a new variable of type Text in Flow
Name it either recommendationId or contextRecordId (Note the difference from the normal pattern of creating variables in flow called ‘recordId’)
Set Data Type to Text, and set Input/Output Type to Available for input
Once you’ve created this variable, you can use it in a Get Records to fetch the full recommendation and access its fields