Process command (HitL)
Overview
If the primary purpose of the Enable HitL Step is to pass information about the Flow execution to the HitL back-end service, where it is processed and broadcasted to agents in the form of HitL conversation messages, the Process command (HitL) Step's main task is to receive commands issued by the agent from the Agent UI, thus enabling a human to become an actor and not just an observer. The commands agents can give from the Agent UI range from sending a text message and holding a phone call to a custom-made command of your design.
For the sake of convenience, the Process command (HitL) Step has two sets of common commands that the Agent UI supports: Text message commands and Voice commands. You can find the settings for these sets under the Common commands section of the Step. Feel free to enable any or both of these sets. By default, only Text message commands are enabled as the most widely used set.
Apart from the common commands, the Process command (HitL) Step allows setting up any number of custom commands available in the HitL conversation. As part of that, you can choose process command parameters and their availability to agents (through the Rule tags) and even restrict their availability in the Agent UI (you can create commands to be executed only from inside the Flow).
Each command (common or custom) described in the Process command (HitL) Step has its Step exit for its logic implemented under the respective exit using available Steps. All incoming command parameters are available from the Process command (HitL) Merge field under the command name field, so it's crucial to keep its type set to Thread (a default for the Process command (HitL) Step).
The Process command (HitL) Step works tightly in conjunction with Enable HitL, so the only position in the Flow where you can place the Process command (HitL) Step is under the commands exit of the Enable HitL Step. Think of it as extending Enable HitL with additional capabilities.
Common commands
As stated previously, Process command (HitL) has two sets of common commands bult-in and available for use without the need of setting up every single command separately. The two sets are the Text message commands and the Voice commands. Any or both sets could be enabled at a time, to do that switch on the Text message commands and/or Voice commands switch respectfully. Text message commands are enabled by default.
Text message commands
There are three common Text message commands available out of the box: send_message, start_chat, and stop_chat.
send_message is the command that the Agent UI issues when an agent hits the Send button in the chatbox of the conversation they claimed in the Agent UI Timeline. The command parameters contain the text of the message, an array of media links (if attached by the agent), and the userId of the agent sending the message. Most commonly, a Send Message Step of the respective channel toolkit the conversation is happening on is used.
start_chat and stop_chat commands are designed to provide a way to set up continuous inbound message delivery to the Agent UI to create a seamless chat-like experience for the user. Both of these commands are not available from the Agent UI for the agent to issue manually. Instead, use the Execute HitL command Step to give a start_chat command when continuous message interception and delivery should start and the stop_chat command when there's no longer a need for continuous message interception and delivery (when, for example, a direct agent-to-user communication is no longer required). Currently, the Step library contains four separate Steps (each for its respective channel) to enable the continuous inbound message interception and delivery. These Steps are: Intercept Incoming Messages (RWC), Intercept Facebook Messages (HitL), Intercept SMS/MMS Messages (HitL), and Intercept WhatsApp Messages (HitL). Only one text channel currently requires a separate Step to disable the continuous inbound message interception and delivery mode - RWC. Use Stop Intercepting Incoming Messages (RWC) under the stop_chat leg of the Process command (HitL) Step when creating RWC-based HitL Flows.
Note
You can use Flow Starters from the Library to simplify the process of creating text-based HitL Flows. Starters for all four text channels supported by HitL out of the box (SMS, RWC, Facebook, and WhatsApp) are available in both Inbound and Outbound versions (except RWC). We regularly update all with new features, like the support for text formatiing, as they come out.
Additionally, the Text message commands section of the Step allows setting up text formatting and message templates for the conversaion.
To enable text formatting, in the Step's Common commands --> Text formatting section, turn on the Enable text formatting toggle, then choose the Output format from the list of three options: Markdown, HTML, or Delta, depending on your channel. For RWC solutions, use HTML. For WhatsApp and Facebook Messenger, use Markdown.
To allow agents to use predefined message templates in the conversation, you must first set them up. Do this through the Message templates section of HitL Settings. Once the message templates are set up in the Step's Common commands --> Message templates & Autosuggest section, turn on the Enable message templates toggle, then select the template categories you want to make available to choose messages from in the current conversation from the Message template categories list.
Voice commands
There are four groups of commands built into Process command (HitL) that tie into the Agent UI Call control popup functions. These are: call_agent/remove_agent, transfer, hold/unhold, and add_3rdparty/remove_3rdparty. The call_agent/remove_agent commands form the basic set you cannot delete. However, you can remove the rest of the commands as needed using the Transfer command, Hold/Unhold commands, and Add/Remove 3rd party number commands, respectively.
The call_agent command is intended for inside-of-the-Flow to dial and add a specific agent to the conference. Therefore, this command is not available directly from the Agent UI. The remove_agent command is issued from the Agent UI when the agent clicks the Hangup button in the list of conference members in the Call control popup. The command parameters contain agentId - the user ID of an agent to remove from the conference and userId - the user ID of an agent issuing the hangup command.
The transfer command is issued from the Agent UI when an agent adds another agent to the list of conference members in the Call control popup. The command parameters contain agentId - the user ID of an agent to add to the conference and userId - user ID of an agent issuing the command.
The hold and unhold commands are issued from the Agent UI when an agent clicks the Hold button in the Call control popup. There is only one parameter in both commands - the userId of an agent issuing the command.
The add_3rdparty command is issued from the Agent UI when an agent adds a member to the list of conference members in the Call control popup using a form number. The command parameters contain the number to dial to add a member to the conference and the userId of the agent issuing the command. The remove_3rdparty command is issued from the Agent UI when an agent clicks the Hangup button next to a 3rd party member in the list of conference members in the Call control popup. The command parameters contain the number to remove from the conference and userId of the agent issuing the hangup command.
Note
The implementation of each of these commands can be very complex. To get an easier start, use the Simple HitL Flow installer from the Library.
Custom commands
If, for any reason, you need your agents to perform operations that are not covered by any of the custom commands you have the ability to introduce a number of custom commands that will be available from a menu in the chatbox of the active conversation in the Timeline. The list of custom commands is available in the Custom commands section of the Step. To add a command, click the + Add new command button and then:
- Specify its name in the Command name field (the command name should be unique per Process command (HitL) Step).
- Add any number of command parameters (none is also an option).
- Change the additional setting in the Advanced command settings section if you want your command to: be unavailable from the chatbox commands menu in the Agen UI, be available even for the conversations that are not claimed or claimed by other agents, be resricted to specific groups of agents, or be processed in the "foreground" thread.
Command prameters
Your custom command might have any number of parameters that agents should specify before issuing them. Each parameter should have a unique name and a type. The Step currently supports two types of parameters: Text and Select. Adding a Text parameter results in Agent UI rendering a text input field that the agent is asked to fill in before issuing a command. Select presents the agent with a choice from a drop-down list. There are two ways to specify the Select options list:
- You can either choose to list all the options available for selection manually. For that, choose Options List in the Parameter source dropdown and fill in the Parameter options list.
- Or use a built-in Agents list to choose from. For that, use Agents List in the Parameter source dropdown. When selecting this option, you have the ability to restrict (or filter) the list of agents to choose from in the Agent list filter settings section. You can choose to restrict the list to agents in a specific Status or Rule group or use Rule tags to narrow down the list further.
Advanced command settings
In the Advanced command settings section of the command, you can:
- Make the command unavailable from the chatbox commands menu in the Agen UI. To do that, turn off the Available as a command in Agent UI toggle (on by default).
- Make the command available to agents in conversations that are not claimed or claimed by other agents. To do that, turn on the Available in unclaimed conversations toggle (off by default). A "listen in" command that allows agent supervisors to join an ongoing call to monitor the conversation is a good example of the Available in unclaimed conversations command.
- Allow only specific agents to use the command. To do that, specify Rule tags in the Rule tags drop-down list to restrict the command usage to only the agents in the groups that are allowed to see entities tagged with those tags.
- Make the command process in the "foreground" thread. To do that, turn on the Process in the foreground thread toggle (off by default). Each command is executed in a separate thread in the Flow to allow for parallel execution of several of them at a time. By default, all commands are executed in the "background" threads, which means that the Flow does not wait for those threads to conclude (reach their end Steps) to close the session. In case the successful conclusion of the command execution logic is crucial for the stability of the solution, make the command execute in the foreground.