# Set up Global Actions (RWC)

Use this step to process static and text global actions. The step might be added at any place of a flow tree. Once the step executed, global actions will be available for end-user.

Logic of a global action can be overriden by adding a few steps Setup Global Actions (RWC) on a flow tree (main flow or subflow) with the same name. Not overriden actions will still be available in a main flow and subflows.

# Set up static global action

In order to handle a global action, it name must be specified. It can be done via click to + Add custom action. This action will add additional leg to this step, so when end-user clicks to global action button, the flow will be re-routed by the respective leg.

Static actions preview

Static action prevew in chat

# Set up text global action

Allows to process text actions from manual reply.

TIP

Note, if you do not have manual user reply options in your chat user will not be able to trigger this type of global actions.

In order to handle text action from user you have to click + Add custom action button and specify comamnd name (which also be leg name on step) and specify regex pattern for the action. One action can be processed both as static and text action and as a separate one.

Turn on toggle Stop main thread when you need to send RWC messages to chat once global action is triggered. This turned on option will ensure, that incoming messages in chat will only be from global action thread and won't create conflicts with messages from main thread. If you want to execute other logic when global action is triggered, or send events to other channel (to send email or to make a call), you can turn off this toggle, thereby main thread will not be stopped.

Text actions preview

WARNING

If option Stop main thread is turned off and global action thread will send messages to chat, the proper order of messages will not be guaranteed.

With setup as on example, when end-user sends text message that meets regual expression, the flow will be re-routed with Set up Global Actions (RWC) step by a specific leg. In our case regular expression will check for /agent message.

Text actions preview

TIP

Information about how to write regular expression (regex) you can find by clicking on help button right after Flags dropdown.

# Returning to main thread

Triggering a global action (static or text), flow re-routes with Set up Global Actions (RWC) step and creates new thread. After logic of global action leg is executed, end-user needs to be returned to main chat thread. In order to do this, Return to Main Thread (RWC) step should be added at the end of global action leg logic. The step will re-route flow back to the point where end-user left off the main conversation. Otherwise, the conversation will be ended.

# Conversation

Specifies conversation where message will be sent. There are two options how conversation can be set:

  • Manual
  • Automatic

# Manual

In order to manually specify conversation you have to turn off the Inherit context from previous step switch in Conversation collapsible group. You will have two dropdowns where bot with RWC flows can be selected such as conversation name, that lists the merge field names of available Wait for Chat (RWC) steps in bot flows.

Manual conversation mode

WARNING

When using manual mode, beware that if you want to move or clone flow to another bot/account you would need to re-set proper bot and conversation values for each step as bot ID and conversation ID will be different.

This behavior will not occur when using automatic mode.

# Automatic

Automatic mode allows step to inherit conversation from previous step. In order to switch step to automatic conversation mode. turn on Inherit context from previous step switch in Conversation collapsible group.

Automatic conversation mode

When there is no previous RWC step that current step can reference from, conversation will be inherited from Wait for Chat (RWC) step.

WARNING

The feature to Inherit context from previous step if available only in RWC tookit form v4.3.x.

Be careful when mixing different conversations in a flow: if one step has manual conversation mode and sends message to different conversation, a next step with inherited contest will also send message to that conversation.

# Merge field settings

The output data of the step will be stored under the name provided in merge field name. It includes the unique identifier of the action listener and names of added legs.

Last Updated: 8/1/2023, 7:32:10 PM