Blog

Run Workflow step in a Conversational Assistant

  • 11 May 2023
  • 0 replies
  • 43 views

Userlevel 4
Badge +4

Sometimes Business rules in Kustomer can’t catch all first inbound interactions because Business rules don’t run while a Conversational Assistant is running. So when a chat is opened any business rules that trigger on first inbound interaction will not trigger. Business rules run after the conversational assistant finishes executing all their associated rules and by then the Initial-in message is already on the conversation. So we can use a Run Workflow interaction in our Dialog from the conversational assistant.

 

Scenario: adding a note triggered off first inbound interaction conditions

In our scenario we’ll place a note on a conversation based on some customer attributes we evaluate and the event will trigger on the first inbound interaction, the initial-in message. And since this won’t catch chats, we’ll use the Run Workflow step to do the job for the chat channel!

 

How to add the Run Workflow step to your conversational assistant

The Run Workflow object is only available in the “Assistant starts from here” section, not the “Dialog continues to” section

vKlVOSwHuLS9zl8ATvBR0Lz0SlvYWsOXK9rrhIgvBZqERMsrABkJ051wNDXFlAvlWT_t9zm7ePoez-OdXOg-sdg0QyfJBtE0wREBqzM_q6FYMEHgYE3YSPfCQOAOafmuskvnfCLoUb2oOoXhsGOI_aA

By clicking on the the Add Interaction link in the Assistant starts from here section provides the opportunity to select Run Workflow

BWDn6Vjy_XyE3Rx1PseEwPUSP7gxJovulxLbe3y0wjmgLlP7F5wQUCdp6EFHVWnOiBpifGQz_7w7SBFbMWtauYXs5TSicPa0cIt2mTa0n1wt_7f_iQSNUi3SC-UbdOHZc5lhYetpNvlkVI46N-f6ZwU

 

If you click in the Dialog continues to section you will not see the Run workflow option

ruJixLGbo92gg55mzrN9y6wwdv_B2I616Faf8Xvzf3vXQbrnvfzn2EH7eMOT_2LskbDdujJ29HDNpPZGgbPnutKPLVW9aa0_1M_NunWU4MA7L0Z52RbcUFbAvuAvcK-WXysbQ3l3X6jQEXt0H0rDoSY

The placement of the Run workflow step is vitally important based on what your scenario calls for. In our scenario we need to check the customer's company affiliation to see if a note needs to be added for special instructions in dealing with a specific company and their employees. So we have to place our Run workflow step after we’ve collected the appropriate information to identify the customer. We’ll use email as the identifier for this scenario. We’ll also need to pass the conversation ID to the workflow so we know what conversation to which we want to add the note. Your specific requirements will guide you to where to place your Run workflow step.

 

Build the workflow

Now that you know where you want to place your workflow in your conversational assistant dialog flow and you’ve determined what kind of information the workflow needs to process, we need to build the workflow and because we need to pass parameters, we’re going to use a callable workflow! Before we can add the Run workflow object, we’ll need a callable workflow created so that it’s available in the drop-down in the Run workflow object and it’s a good idea to create the callable workflow with the appropriate input parameters. For our scenario we’ve decided we need a callable workflow that receives an email and conversation id.

hIo1nytpfI_NA7EOVui-IS-zYOH3DYBEvihRGh4e0GsapznMBZMlXJEwqI7GKYdJpNwgQptORrf3o8MP7mc9mZdf9RUTWRYFKFafhTf8omQ2n687x_aCOCkA1xF7OWWz9KccoGc-aKwqKdvGV3fDGw8

 

We’ll also have to send a response after the workflow has completed, our output parameter(s).

GHV3wcyHh5mGqycAbriBs92cV3Uzaw6oLWpBgCrRmUzHJKcd0opWtYw42A8zdZihUB9bIaFBwOSAi5xWIwTvTUqPPobz1dx9j3Y_qiHGAaCXbbAeLfeVlovgrQgTffA4r165hteC8Pi2HjO48-jBVhM

 

We’ll use the input parameter to look up the customer. Then we’ll look up their company and check the condition - is this the right company and if so, add the note!

VI4xGdBI2zOt3hgvLMLqpGmE4YbfljX5kjtjRnAUB9gORzRvKxffqJUeKxzhINPd1VKlCJRDWgupGwrMo-w3OVq0EvxKhz2td85LmRWrpbZSmCeP490_yx55G7lBprp6yl6Jfm8cb4SK7nnovJ8tOyw

 

Once we have the callable workflow in place we need to save it to make it available in the Conversational Assistant.

 

Select your workflow in the Run workflow object and fill in your parameters

You can now add your Run workflow object to your Conversational Assistant in the appropriate dialog. And now that we have our callable workflow saved, it’ll be available to us in our drop-down.

vx7r7aiUN6Tav9msRCkaeiAZiCXomkWFW4oeJEkATICLhKPW6GsPt7DRRLcI_ztKrQ725q4KMeq_VnGJAT94Hx4vDmgEznmgomPoh2FPSka0aWbqXB-6B1TRFO1bWvlP5JzTfThyDXXiRMH3hVlrVvo

 

Once you’ve selected the callable workflow you’ve created for this CA, the corresponding input and output parameters will be made available for you to fill out.

M8gDAZWAqw_Uu5JHgwZRPDn7QsMBqIYsDe5-TlH_hEGyN9LcBm79Q7p72OKf8gn4FpsruG9XvMsiP6KHayiPH94eI3bMeygggUYTd-F1b-QJQ7BHaCaCmOYVIjdUnHqpZ29xcd-Xhh883orEBuCEPPI

 

You can see the Input parameters are the ones that your callable workflow is expecting, in our scenario we see we need to provide Email and Conversation Id. To fill in these parameters you can use dynamic text to send values into your callable workflow. In our scenario we need the customer’s email address and the conversation id, using dynamic text.

CLfcZp02hk_COC7ncfMpF4HEJg72Itrwu5VCkwrot_If53qZjYVwD8ptBYnKq2qJdfOsOX73qZeIZ884FIB-3ymO3KVmXZhGi7ALqsTg82C4GYfMx_0mYxY1-TsIfWyng_bu8v4qxTbVIc5a5QpEv5k

eS5foyp-xiMdOrOotx0lUM3LzUSBLQ7krLuJ5-Alqxskrlgz6HVrRec9GirdmyzxrnQVeupxSOH5sJESY1-5XtrE3UI5Mic_lPcP86yIjv0szht1xb8cOwIGollHQ1im8n0RVde87Dl-BHAhbU5x_ec

And it will fill in and send the appropriate values to your workflow

PZmkP0nAOQYi4Kn1ZmSsYNgGDRB7cuP-mIffOidpt1gwdu2nhvbiN3BiD0vcWnSIzBtWe6_oV6uFp6uFyOP9e08Mn6Ol3Yu8-ynCMcy-18JJoVqqHshnsqpQo95q1O9ZWRYMyZCoBdMoGKLFGWCoCvI

 

The output parameters are a little different, no dynamic text here. For the output parameter we need to pick a destination in a Klass object for our response. You can create any attribute necessary on Customer or Conversation klasses and use them as your response destination. Select the klass you want and add the attribute that will store the response.

bbqOQoXEsoxdJ72E0on0ChEwzAJfg2pU5NzOBRfQC4q8MBf9tyCn_srQG3CdN7ZtF68Pidu8sIzlx2RKXkUfxv7j72dG7Y1HfB0BFu6QQsEVmoscXSVR3cgQ1xNxamCRnBbR58pQc9ejLHF1h8xnR-w

 

The last thing to account for in the Run workflow object is the action taken if the workflow encounters an error. This will be different from a workflow response which will only happen on a successful execution of the callable workflow. If the callable workflow has an error, you need to redirect the dialog so the conversational assistant can continue. It’s always a good idea to send this part of the flow to a Transfer to an agent step to ensure your customer’s get help!

rRLRlGAQttI2mKHBL3XMziJ1GzXHwIJXqUr5OPmn-iBfDoXMLDnYAdp-3URt0Zsg0Bz95DEzS_k2XmDaLmqvi3D3E18UATQXxyzU3wnlH4i663MqzHVIUNkepUxNh9MFLNC4KjHHfjmUXBjmNOV6CoY

 

And this should allow you to catch those first inbound interactions on the chat channel when the business rules don’t trigger and take the actions you need!


0 replies

Be the first to reply!

Reply