Activities allow you to control the flow’s operation.
Info |
---|
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.
Tip |
---|
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 -)
Info |
---|
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
You can concatenate multiple schedules using &
mon,tue,wed,thu,fri;09:00-18:00&sat,sun;09:00-13: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.
Tip |
---|
If the variable is fulfilled, it will go through the green path that comes out of the evaluate, if the variable is not fulfilled, it will go through the red one. |
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.
Useful, for example, if you want to parse the response of a web service or increase the value of a variable to use as a counter.
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.
Info |
---|
In this activity, both external web services and uContact's own can be used to, for example, make calls or send emails. |
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.
Info |
---|
It is important to remember that in the query, the database from which the data will be taken, must be entered. |
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.
Info |
---|
The dispositions are inserted directly into the DB, therefore, they do not necessarily need to be created in the system. Even though they are created in uContact, they will not execute actions such as schedule or respool, since they belong to another channel. |
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.
Note |
---|
This field is required. |
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.
Tip |
---|
When the interaction reaches an agent, they will be able to see the conversation between the customer and the bot. |
Note |
---|
If you use this function it is recommended NOT to use the same bot for campaigns of different channels, since the bot will not be able to transfer to another channel. In case you want to use the same bot for multiple channels, you can use the global variable CHANNEL in a conditional statement and define transfers according to the channel. |
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}
Tip |
---|
This activity is normally used for bot development. |
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.
Info |
---|
After a FinishInteraction, the Webchat client will see a message to leave the chat or stay in it and see the conversation, but calls and the text area are disabled. |
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
Usage example: application / pdf | 20200504 / filename.pdf to send a file found in etc / IntegraServer / web / attachments / 20200504 / filename.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
The template variables can be replaced by other variables that we have in the bot even by global variables.
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.
Info |
---|
The WaitBot activity can only be used from a bot or a function bot. |
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.
Note |
---|
|
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.
Info |
---|
It is important to remember that in the query the database from which the data will be taken must be entered. |
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.
Tip |
---|
For the latter, the ReceiveNewMessage application is used. |
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.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).
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 ${}
.
InteractionStats
enterQueue
Code Block | ||
---|---|---|
| ||
{ "campaign": "Campaign", "guid": "guid", "clientId": "+59899098987" } |
startInteraction
Code Block | ||
---|---|---|
| ||
{ "agent": "agent" "campaign": "Campaign", "guid": "guid", "clientId": "+59899098987" } |
connectAgent
Code Block | ||
---|---|---|
| ||
{ "agent": "agent" "guid": "guid" } |
transferred
Code Block | ||
---|---|---|
| ||
{ "campaign": "Campaign", "guid": "guid" } |
transferredToAgent
Code Block | ||
---|---|---|
| ||
{ "agent": "agent" "guid": "guid" } |
abandon
Code Block | ||
---|---|---|
| ||
{ "guid": "guid" } |
finished
Code Block | ||
---|---|---|
| ||
{ "guid": "guid", "finishedByClient": true } |
setDisposition
Code Block | ||
---|---|---|
| ||
{ "guid": "guid", "value1": "value", "value2": "value", "value3": "value", "comment": "comment" } |
setData
Code Block | ||
---|---|---|
| ||
{ "guid": "guid" "data": { "attr": "property" } } |