Description of Workflow Designer activities
Activities allow you to control the flow’s operation.
All activities have a 'description' field that is used to indicate a brief comment on the behavior of the activity.
This field is optional.
Activities
SendMessage
With this activity we interact with the client, it allows us to send a message after each time the client writes.
This field can work in 2 ways:
Send a simple message
message
You write the message that you want to send, when the activity is executed it will send the text of this field.
Message with variables
In messages it is also possible to include variables using ${variable}
This will cause the message to replace the variable with the value that it previously acquired.
Send options
message
To send a menu of options, in this field each line must begin with a number and a dash.(Example: 1- or 1 -)
In Webchat, the customer is presented with a menu in which they can select options with one click.
On other channels, it looks like a normal message.
IsOnTime
This action allows evaluating an answer and activating one route or another depending on the schedule that is entered.
schedule
The format of the schedule must be:
mon,tue,wed,thu,fri,sat,sun;09:00-18:00
Example:
The customer writes to the bot and selects to speak with an agent.
After reading the response, they can decide to send it to one campaign or another depending on the schedule.
Evaluate
It allows evaluating an answer, and based on it, deciding one way or another, the evaluate can be chained one after the other in case we have multiple options and different actions are carried out for each one.
Blank space
This is where you enter the Js code to evaluate options.
ReadMessage
With this option, the flow reads the answer sent by the client to save it in the variable, and like this, use it in other activities.
variable
Name of the variable that has the answer.timeout
Waiting time in minutes to continue the flow, if this time is exceeded the content of the variable is: "".
ReadFileMessage
This option is similar to the previous one, only it is used to save an image after requesting it, and thus, it will successfully reach the agent.
variable
Name of the variable that has the file.timeout
Waiting time in minutes to continue the flow, if this time is exceeded the content of the variable is: "".
Procedure
This activity allows running the JavaScript code.
Blank space
This is where you enter the Js code.
ExecWebService
Allows running the web service.
variable
Name that owns the variable that contains the WS response.method
Method that the WS uses, these can be: Get, Post, Put and Delete.url
Address in which the WS is located.body
WS body content.headers
All the headers that the WS carries, they are indicated header: content.content-type
The type of content that is sent in the WS.
ExecQueryJSON
Here we can make queries to the database. Executes the entered query and returns, in the variable, the response in the form of JSON.
variable
Name that will have the variable that contains the result of the query.blank space
Here the SQL query is written.
Disposition
It allows to carry out a disposition of the interaction with the flow, in this way it is possible to follow the flows traveled by the client.
level1
Disposition level 1.level2
Disposition level 2.level3
Disposition level 3.comment
Comments of the disposition.extra
Extra content for the disposition.
TransferBot
With this option, we can transfer the interaction from a bot to a campaign on the same channel as the bot.
Destination
We must indicate the exact name of the campaign to which you want to transfer.
Agent Name of the agent to whom the interaction is to be transferred. If the agent is empty, it transfers directly to the campaign queue.
AgentTimeout Time in seconds that the interaction will ring on the agent. If agentTimeout is set to 0, the interaction will wait for the agent. If it is greater than zero and agentTimeout is achieved, the interaction will go directly to the campaign queue.
When transferring from a bot to a particular agent, the interaction will ring on the agent until the time specified in AgentTimeout is reached.
If the agent does not answer the interaction, it will be passed to the campaign queue and distributed among the rest of the agents according to the campaign strategy.
LogOp
Allows you to print the content of a variable in the IntegraServer.
log
Enter the variable you want to print with the format $ {variable}
FinishInteraction
This action must be at the end of each flow since it tells the bot that it has finished its journey and closes the interaction with the customer.
This activity does not have configuration fields since its only function is to finish the interaction.
SetClientName
This activity takes the content of a variable and assigns it to the interaction's customer name, and in turn, assigns it to the bot's CLIENT_NAME global variable.
name
Name of the variable to be used as CLIENT_NAME.
Example:
In a message the client is asked to enter his name, followed by a ReadMessage that allows taking his response within a variable, that variable is entered in SetClientName, then in the flow, if we send a message with the global variable CLIENT_NAME, the Value of the variable in SetClientName.
When the interaction reaches an agent, the client's name will be visible with the value of the variable entered in SetClientName.
SendAttachment
Through this activity it is possible to send files to the client.
url
The files are uploaded in the folder etc / IntegraServer / web / attachments and it is indicated what type they are:image
audio
video
application/pdf
SendEmail
Allows sending emails.
template
Name of the email template that you want to use.variables
Within the template we can have variables to replace ${example}, in this field we must indicate all the variables of the template to replace and the value they will have in the following format: example:value
GoToFunction
This activity allows you to nest both bots and bots functions.
Suppose you have a bot named B and a function bot named BF and B has the GoToFunction activity and in the name field it has name = "BF" assigned.
When executing the GoToFunction activity, bot B execution stops and BF begins executing. After BF finishes executing, it will return to B to continue executing the following activities.
It is in this way that it is possible to nest several bots or bots functions to an initial bot.
name
Field containing the name of the bot or bot function to which control will be passed once this activity is executed.
FuzzySearch
The answer is stored in the first parameter, the second variable is a string, and the third variable is an array of words. In the response, a JSON is returned that is ordered by the highest match of words, and for each match, a score is returned that indicates the percentage of match.
WaitBot
Pause a bot until the Resume activity is executed from a Webhook or channel provider.
ExecCommand
Execute the command entered and leave the result in the variable.
SetData
SetData receives the GUID of an interaction, and sets that interaction data and the global variable VARIABLES of the bot, which is stored in the "data" field.
ExecQuery
Here we can make queries to the database.
variable
Name that will have the variable that contains the result of the query.blank space
This is where the SQL query is written.
MessageResult
To inform the system that the SMS was sent correctly or with error, the MessageResult application must be used, it requires two parameters:
result
Result of what was sent (can be any value).id
Unique ID of the message if applicable (this ID is normally returned in the provider's API call).
ReceiveNewMessage
The webhook can run many different applications, from executing a query, a call to a webservice, to injecting an incoming SMS / WhatsApp into the system.
message
Message, if applicable.attachment
Attachment URL.from
Number sending the message.did
Number to which the message is sent, it has to match the DID of the campaign to enter the campaign.id
Unique ID of the message.clientName
Name of the user sending the message.
direction
Direction where you will send the message. If no data is entered in this field, the message will be received as incoming. Valid options are O (for outgoing message) and I (for incoming message).
referenceMessageId
ID of the message that is being replied to.
MessageStatus
This activity allows updating the status of WhatsApp messages, two parameters must be sent to it:
id
Unique ID of the message (this ID is the same as the one sent in MessageResult).status
The states to update can be:sent
,delivered
,read
,error
,invalid_session
einvalid_number
.
BlacklistResult
Activity that responds with the action to be executed.
Possible answers are: Call, Do not call, Respool Alternative.
Resume
Activity that receives a GUID of an interaction and unpacks the bot of that interaction, which previously executed the Wait.
ParseXMLJSON
It receives an XML as a parameter and leaves, in the defined variable of the "variable" field, the XML that was passed as a parameter parsed to JSON.
EmitWebchatEvent
Only available for webchat interactions. It sends an event to the site where is inserted the webchat. The data parameter will be accessed when the event is received. The data could be JSON or simple text and JS code can be executed with ${}
.
More info Webchatclient API | Subscribing to events
InteractionStats
enterQueue
{
"campaign": "Campaign",
"guid": "guid",
"clientId": "+59899098987"
}
startInteraction
{
"agent": "agent"
"campaign": "Campaign",
"guid": "guid",
"clientId": "+59899098987"
}
connectAgent
{
"agent": "agent"
"guid": "guid"
}
transferred
transferredToAgent
abandon
finished
setDisposition
setData