Total component functions
Paid Service
✅Note: An orange-colored icon in the form of an exclamation mark in a circle notifies you that this service is chargeable.Nodes
Nodes are of two types:
Input node
There can be only one. There is one on every component (only the Begin component is an exception). Any number of arcs can come to the input node.
Output node
There can be more than one. There is one on each component (exceptions are the Transition and Transition Between Scenarios components). Only one arc can come out of each exit node.
Each component has at least one node.
In the figure, the input nodes are labeled in green and the output nodes are labeled in red.⚠️ Attention! If there is no arc coming out of the exit node, the scenario moves to the Start component.
Item settings
The name is displayed in the top line of the component.
To change the name, click on the pencil icon. By default, there is no name.
Clicking on the question mark icon redirects to the item description page in the knowledge base.
Using variables
To use a variable (global or local) in any***** component, you must use the following format:
${{{{VariableName}}}
For example,
You have a variable Name, which holds the user's name (John). To say hello to him you need to write:
Hi, ${{{Name}}}!
Then the sent text will look like:
Hi, John!
*Exceptions are the components Variable, Response, Request. It will be noted additionally.
By default, each user has the following set of variables:
Connector variables
chat_user_id — The user ID within the KOMPaaS platform.
Telegram
telegram_id — Id of the interlocutor
telegram_username — Nickname of the interlocutor
telegram_first_name — Name of the conversation partner
telegram_last_name — The last name of the person you are talking to.
telegram_start — Data when you click [https://t.me/<Bot_name>?start=<DATA>](https://t.me/<Bot_name>?start=<DATA>).
Viber
viber_first_name — Name of the conversation partner
viber_last_name — Surname of the conversation partner
Text decoration
On some components, you can enable the option to decorate text.
⚠️ Warning! The function works only for telegram and viber!When this option is activated, text modification becomes available. The modified text must be written inside special characters. The following formats are available:
Italics (text)
Bold (text)
Code (
code
) all characters (including indentation) are preserved.Link (text) (does not work in Viber).
Components
Bot actions
Start
Contains the welcome text that the user sees when they first interact with the bot.
Message
The bot sends a message to the messenger.
⚠️ Warning! The following features work only in Telegram.Contact — send a message with a contact to the conversation partner.
Name ![contact](52 1234567890)
Geolocation request — send a request to the conversation partner to access their geolocation.
*Message*[*Button text*](geo)
⚠️ Warning! To display data about the location of the interlocutor in the constructor, it is necessary to place the Reply component after the Message component. Geolocation comes in the form of coordinates, for example, the address of the company office will be displayed as — 48.19971424775815, 16.3459346.Contact request — send a request to the conversation partner to access their phone number.
*Message text*[*Button text*](contact)
⚠️ Warning! To display data about the location of the interlocutor in the constructor, it is necessary to place the Reply component after the Message component. The phone number will be saved as — 52 1234567890.Pin message — the bot will send the message and bookmark it in the dialog.
⚠️ Warning! The function works only for telegram!
Variable
Writes a value to a variable. Analogous to the assignment operator.
Global variable — switches the operation mode of the component from interaction with local variables to interaction with global variables.
Name — The name of the variable that will be created automatically if not created by the user.
Value — data to be written to the variable.
Add. options:
Current time — writes the current time to the variable.
Actual time — writes the current date to the variable.
Random number — writes a random number of the length specified in the "Code length" field to the variable.
List — Allows multiple items to be stored and accessed by index or other characteristics.
*It is not necessary to surround the variable name with ${{ }} characters in this block.
Condition
Checks if the condition specified in the component is met.
If the condition is met, the script execution continues along the Truth branch, otherwise - False.
Value 1 — the first parameter of the condition.
Operation — operand, by the rules of which the condition is checked.
- < — less (True if Value 1 is less than Value 2). The strings are compared in alphabetical order;
- = — equality (true if Value 1 is equal to Value 2);
- Inclusion — (true if Value 1 contains Value 2).
Such an expression would be true.
*Variable values can also be compared to an empty field, thus checking whether something is in it or not.
Comparing the value of the name variable with the field without the variable. Does name exist?
Thus the script will follow the Truth branch if name does not exist (the field is empty), otherwise (the name variable contains some value) it will follow the False branch.
Delay
Suspends script execution for one conversation partner.
- Select component of the chatbot script.
- Relative time — Allows you to set a delay based on the previous point in time or event after which the user will be directed further down the script.
- Absolute time — Allows you to set an exact delay time, regardless of previous events or time periods.
- From a variable — The ability to dynamically set the delay time based on values stored in other variables.
Delayed Transition
An component that schedules the user to be redeployed to a specific section of the scenario after a certain amount of time.
Order of execution:
- The user gets to the component ;
- the component plans to move to component X after the time specified in the parameters;
- The user moves on with the script;
- After some time [specified in the component ] the transition to component X is made.
- Select component of the chatbot script.
- Relative time — Allows you to set a delay based on the previous point in time or event after which the user will be directed further down the script.
- Absolute time — Allows you to set an exact delay time, regardless of previous events or time periods.
- From a variable — The ability to dynamically set the delay time based on values stored in other variables.
Transition
This component is used as a switch or navigator to define the transition between different states or dialog stages.
- Select component — Selects the next component of the chatbot script.An component without an exit node, when executed, moves the script to the specified component.
Such a transition is equivalent to the circuit in the image below.
- Select component — Selects the next component of the chatbot script.An component without an exit node, when executed, moves the script to the specified component.
Operation
Performs an arithmetic operation, writing the result to a variable.
Name — name of the variable to which the result will be written. Operand 1, Operand 2 — data with which the arithmetic operation is performed. Operation — function performed on the operands (in the upper right corner):
- + — addition
- - — subtraction
- * — multiplication
- / — division
- Date concatenation — addition for variables in which the date is stored
*It is not required to surround the variable name with ${{ }} characters in this parameter.
Operator
The component passes control of the dialog to the operator, until the conversation partner writes one of their keywords.
The function works with the Contact Center Ai product.
- Text for exit button from operator component — This setting defines the text that will be displayed on the Exit button of the Operator item.
- Text when jumping to an operator component — This setting defines the text message that will be displayed when navigating to an operator component from another block or during dialog execution.
- Select queue — This option allows you to select the queue to be used when performing operations related to the Operator component. A queue can determine the order in which operations are performed, provide a sequence of actions, or control access to resources in a multitasking environment.
Timetable
The component checks if the current time corresponds to the schedule. If the schedule matches the current time — the scenario continues its execution along the branch Matches, otherwise — Not matches. Similarly to the Condition block.
- Day of the week — the day of the week to which the schedule applies2.
- Start time — on the given day of the week starting from the selected time the block will start working (the script will follow the Truth branch)
- End time — on the given day of the week after the specified time the block will not work (the scenario will follow the False branch)
- Non-stoop — on this day the block will work (the script will follow the Truth branch) all day long (from 0:00 to 23:59).
- Never — on this day the Block will not work (the scenario will follow the False branch) (default value). In this case, the values of parameters 2 and 3 take the value 0:00.
- Holidays — add holidays or reduced work days.
Switch between scenarios
An component without an exit node, after execution, transfers the interlocutor to an component in another scenario. If it is necessary to return the client to the original scenario, this component must be reused in the child scenario.
Inclusion
Component , aka the multiple choice operator, sequentially checks if any of the values in the component exists in the variable. If these values match, scenario execution continues along the corresponding direction.
Analogous to the Switch/Case construct, but includes is used Instead of the = Operation.
Text message (Variable) — the text that will be checked for fulfillment of conditions. If the user's text contains a word from the first line and simultaneously from the second line, the first line will be selected as the priority one.
Qualifying phrase — allows you to specify a condition or key phrase that initiates the inclusion of the corresponding external module, block or other component in the main script of the chatbot.
Comma separated values — phrases, the presence of which in the text will be checked. There can be several phrases, specify them separated by commas. The check is case insensitive.
Label name — this setting defines a name or label for this component that can be used to reference this included module or block within other parts of the script.
Chat GPT
The component is used to integrate with a language modeling model such as OpenAI GPT (Generative Pre-trained Transformer) to improve the bot's ability to generate text, respond, and support conversations with users.
Model — GPT model selection:
- Standart — the fastest, cheapest and most accessible AI model. The maximum number of tokens is 4096.
- Extended — this model is more expensive and can contain much more context. The maximum number of tokens is 16000.
- ExtendedTurbo — much smarter, contains newer knowledge, costs more. Maximum number of tokens is 4096.
Temperature — is used to indicate the intensity or richness of the text.
Write answer to variable — allows saving the generated response to a variable for further use or processing in chatbot scripts.
Text request — text message or query that is provided to the model to generate a response.
Context — represents information about previous messages or conversation state, which helps the model better understand the context and generate more coherent and cohesive responses.
assignContact
The component in the chatbot script saves the contact data of the interlocutor in the address book of the personal cabinet. This data should be freely available with the interlocutor's permission.
idValue — contain an identifier or unique value that identifies the interlocutor contact.
Integrations
The component is used to connect and integrate with external services, APIs, applications or platforms.
Phone call using scenario — allows the bot to initiate a phone call using a specific scenario.
Send a message to Telegram — allows the bot to send messages or notifications via Telegram messenger.
Google sheets — allows the bot to interact with Google Sheets, send or retrieve data, create records, or update information in Google Sheets.
Google sheets by line — with this setting, the bot can interact with data in Google Sheets on a line-by-line basis.
Sending SMS event — allows the bot to send SMS messages to specified phone numbers.
Send messages to email — allows the bot to send notifications, reports or other information via email.
User actions
Menu
Component is typically used to create an interactive list of options or commands that are presented to the user as a menu to select actions or directions.
Time-based transition — works the same way as Transition. The user will be sent to the item that was selected in the field below:
- Select component — The component to which the transition will be made;
- Delay — A time delay before the menu is displayed to the user after a specific action or event.
Inline Buttons — display buttons directly in the chat text window;
Repeated menu text if the visitor answers with a message not from the buttons (if empty, the first text will be used);
Name of the variable to record the user's response — the variable where the last user's response to the menu will be recorded. Even if he pressed the button, in this case the value of the button will be recorded.
Select the component to direct the interlocutor to if he answers with a message not from the buttons — Transition when answering not by button, see Transition.
Add answer options — the answer choices offered to the user. Options can be named and linked to other components of the scenario, which the user will navigate to when selecting them.
Image — you can add a picture that will be displayed along with the text and option selection.
User answer
The component sends a message to the interlocutor with a question and records its answer in a variable.
- Time-based transition — specifies the time interval after which a transition or action will be performed if the user has not provided a response within the specified time period.
- Answer format — specifies the format or type of response that is expected from the user.
- Text request — is a text message or request that is displayed to the user in order to get a response from them.
Requests
Request
The component allows you to execute a GET or POST HTTP request to the selected URL and save the response to a variable.
- GET/POST (in the upper right corner) — method of request to the site.
- URL — used to specify a URL that will be invoked or downloaded in response to a user action.
- Name — allows you to specify a name or label that will be used to designate this item or User answer action within a chatbot script.
- Add variable — allows you to save the User answer in a variable for further use in other parts of the script or for information processing.
- Add new header — is used to add a new HTTP header to the request that is sent to the specified URL after the user response.
Media
Images
Sends a message with an image to the interlocutor.
Requirements: Formats jpg, jpeg, png
Size <10Mb, except Viber (<1Mb) For mailings <5Mb
Audio
Sends a message with an audio file to the interlocutor.
Requirements: Size <20Mb
Video
Sends a message with a video to the interlocutor.
Requirements: Size <20Mb
File
Sends a message with a file to the interlocutor.
Requirements: Formats, any except: [Prohibited formats] (https://developers.viber.com/docs/api/rest-bot-api/#forbiddenFileFormats) for Viber Size <20Mb< /div>
Code
The component executes code in JS. User variables are stored in the user object.
⚠️ The code must be verified after each change. For verification please contact support.
- Status — intended to display the code execution status inside the "CODE" component.
- Code execution — the code itself is located here, which the bot will execute as part of the script.
component
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article