Bot Instruction Manual for Web and Messaging

Bot Instruction Manual for Web and Messaging


TABLE OF CONTENTS

1. OVERVIEW    

1.1.    Flow Designer    

2. WEB BOT: GETTING STARTED    

2.1.    Create a conversation    

2.2.    Specific tools in the conversation designer    

2.3.    Turning the Bot on and off    

3. BOT MESSAGING: GETTING STARTED    

3.1.    Create a conversation    

3.2.    Specific tools in the conversation designer    

4. AVAILABLE MODULES    

4.1.    Basic Modules    

4.1.1.    Chat    

4.1.2.    Request data    

4.1.3.    Agent available    

4.1.4.    Transfer    

4.1.5.    Multiple choice    

4.1.6.    Media    

4.1.7.    File    

4.1.8.    Link    

4.1.9.    Tag    

4.1.10.    Analytics events    

4.1.11.    Save contact    

4.1.12.    Send transcription    

4.1.13.    Send email    

4.1.14.    Show order details    

4.1.15.    Additional info    

4.1.16.    Privacy policy    

4.1.17.    Delay    

4.1.18.    End    

4.2.    Advanced Modules    

4.2.1.    Run script    

4.2.2.    HTTP Request    

4.2.3.    Assignment    

4.2.4.    Condition    

4.2.5.    Conditions list    

4.2.6.    Loop    

4.2.7.    Multiple choice array    

4.2.8.    CRM Integration    

4.2.9.    IFrame    

4.2.10.    Product search    

4.2.11.    Form    

4.2.12.    GPT Chat    

4.2.13.    Map JSON    

4.2.14.    Move to queue    

4.2.15.    Set pending status    

4.2.16.    Status change    

5. BLOCKS    

5.1.    Order Details    

6. CONTEXT VARIABLES    

6.1.    Web Bot Context Variables    

6.2.    Bot Messaging Context Variables    


1. OVERVIEW

Oct8ne's conversational BOT allows users to be served automatically without the intervention of an agent. Through decision flows, you can guide your customers with Q&A navigation until they find the solution they need, transfer that query to an agent, save visitor data, and more.


Oct8ne supports two types of Conversational Bots, depending on the environment in which they are going to be used:

  1. Web Chatbot intended to serve visitors to your website ("Web Bot").
  2. Conversational Bot for messaging channels ("Bot Messaging"), whose objective is to pay attention via applications such as WhatsApp or Messenger.

Both types of Bot share quite a few concepts and tools, so these instructions will, for the most part, be valid for both cases. However, since the capabilities available in the web world and in messaging apps are different, certain sections or sections will be described individually. 


Remember: not all functionalities are valid in both types of Bots. Pay attention to the type of Bot you are designing and consider only the information specific to it, and that which is common for Web Bots and Messaging.


  1. Flow Designer

Regardless of the type of bot, the flow of interaction with users is defined by designing conversations. By means of a visual designer included in the Oct8ne dashboard, you will be able to model the behavior of your Bot by deciding the messages that will be sent to users, capturing their responses, making decisions, or even make complete transactions thanks to its integration capabilities with external systems via HTTP API or native plugins with the most popular e-commerce platforms.


You can view the conversations stored in your account from the Management > Chatbot option in the Oct8ne dashboard. To view conversations specifically designed for Web Bot, select the "Conversational" tab; If you want to view conversations for messaging channels, select the "Messaging" tab:

Important: Conversations for Web and Messaging are independent, as each type of bot has its own particularities.


You can enter to edit a conversation by simply clicking on its name in the list of conversations. By doing so, you will access Oct8ne's conversation designer, a visual tool that will allow you to define the behavior of your Bot in a really simple way. 

The behavior of the Bot is modeled by adding successive modules (boxes) linked to each other, which represent the actions that the Bot will perform during the conversation. The initial module, where the conversation will begin, is always identified by a house icon.


Actions can range from simple tasks, such as sending a chat text to the visitor, to more complex functions such as requesting information entry, transferring to human agents, or even making decisions based on data obtained during the conversation. As you will see below, Oct8ne includes a rich set of actions that will allow you to design workflows to cover both purely informational bots and bots capable of completing transactions and performing practically any type of operation.


You can add modules to a conversation from tie points presented by other modules, by dragging the "+" button to the position on the designer's surface where you want to place the new element. Releasing the mouse button will bring up the menu where you can choose the next action to take in the conversation.


Note: The available modules are different depending on whether you are designing the conversation for Web Bot or Bot Messaging.


The following screenshot shows how, dragging the "+" button from the tree's initial action to the right of the surface displays the module selection menu. Next, the result of selecting the "Multiple Choice" module from the menu appears, where we see that the module has been linked to the first step and, therefore, it will be the next action to be executed after the initial greeting:



When you select a module above the designer by clicking on it, its properties window will open on the side, where you can configure the behavior of the action in detail.  As described later in this document, the options to be configured depend on each type of module; For example, in the case of the "Chat" module it will be possible to indicate the message to be sent to the visitor, or in the "Multiple Choice" you will be able to configure the message to be sent to the visitor and the options from which they must choose.

Also, from this point it will be possible to modify the name of the action, which may be interesting to facilitate its identification later. Generally, when adding a new module to the conversation, it will be assigned a name that by default will match the name of the action followed by a sequential number (such as "Chat 1", "Chat 2", ..., "Multiple choice 1", "Multiple choice 2", ...). You can easily modify it by selecting the module and editing its properties:

Modules can be dragged onto the design surface to change their location. You can also use the zoom controls to zoom in or out of the displayed surface, and scroll through it using drag & drop.

Tip: For easy maintenance and readability, it's a good idea to keep your conversation diagram neat and clean. And if a conversation gets too big, feel free to break the dialogue into separate conversations and use the "Link" module to link them.


In the upper right corner of each module, you will find a context menu identified by the three dots "...", the options of which allow:

  1. Open the module properties window
  2. Set as initial, so that it is the first action to be executed when the conversation starts. Once clicked, the house-shaped icon will be located in the current module.
  3. Copy to clipboard. Copied elements can later be pasted onto the designer's surface using the context menu (right mouse button). If you want to select more than one module, you can do so by clicking on them while holding down the Control key.
  4. Remove the module from the conversation.

Once you're done modeling the conversation, you can use the button on the top toolbar to save your changes.

2. WEB BOT: GETTING STARTED

  1. Create a conversation

Conversations for the Web Bot allow you to model the behavior of the Bot during its interaction with visitors to your web page. 

To create a new conversation, access the Management > Chatbot option in the Oct8ne dashboard, select the "Conversational" tab and click the "Create conversation" button:



Next, you need to fill in some basic information about the new conversation: 

  1. Name the conversation
  2. A brief description of it
  3. The language used in user interactions

If you identify this conversation as primary, it will be used by default for all your visitors. You'll be able to quickly see which of your conversations is the top because it's highlighted with a home icon:


Oct8ne provides you with a set of predefined templates. You can start from them to create your conversation and modify them later to suit your needs, or you can start from a blank conversation.


If you define different conversations with the same name as the initial, but with a different language, the one whose language matches that of the current user will be used. For example, in the following case, visitors who are in the
    page in Spanish will start the second conversation called "Initial BOT",     while the rest will use the former:




Once the conversation is created, the visual designer will automatically open, allowing you to start modeling the Bot's behavior immediately.


  1. Specific tools in the conversation designer

Once you've finished modeling your conversation for Web Bots, you can use the buttons on the top toolbar, specific to Web Bots, to perform the following actions:


  1. Save the changes you made. By pressing this button, the conversation settings will be saved, although it will not yet be available to visitors until it is published.
  2. Preview the conversation. By pressing this button, the system will open a browser from which you can start a session as a visitor, in order to directly test the current conversation.

Important: Preview mode does not support all functionalities, as it is a simulated runtime. Actions such as linking to another conversation, sending transcripts or emails, transfers to agents or departments, saving contacts, checking the status of orders, or tagging conversations will not work.


  1. Publish the conversation, so that it can be used when the Bot is active. This step is necessary so that a conversation can be used by website visitors.
  2. Removing the conversation undoes the post and makes the conversation unavailable to visitors.



  1. Turning the Bot on and off

In a Web environment, the Oct8ne Bot will behave like another agent, so it makes sense to be able to configure its availability when it comes to serving visitors. This can be achieved by using a switch available at the top of the web chatbot configuration screen:

Only if the button is in the connected position (green), the Bot will be able to serve the visitors of the website. In this case, it will also be possible to configure additional configurations by clicking on the "View availability options" link:

The advanced availability configuration options allow you to set the criteria with which Oct8ne will assign your website visitors to the Bot. They can be set via the following dialog box:

The available options, which you can activate independently, are:

  1. Only when agents are connected. If you enable this option, the Bot will only serve visitors as long as there are human agents connected. This can be useful if we want the Bot's hours of operation to coincide with those of the human agents in charge of the service; This can happen, for example, if our conversation always ends in the transfer to people to complete the visitor assistance. Brief:
  1. If enabled (green position), the Bot will only be available as long as human agents are connected.
  2. If disabled (red position), the Bot will always be available, regardless of whether or not humans are connected.
  1. Prioritize agents. You can enable this option if you want the Bot to only intervene when no agents are available. Brief:
  1. If enabled (green position), the Bot will not serve visitors initially if agents are available. Instead, visitors will be assigned directly to agents.
  2. Otherwise (red position) the Bot will serve all visitors initially, regardless of the existence of available agents.

Additionally, it is possible to establish filtering criteria, so that the Bot is only available when the specified conditions are met, basically based on the page and language of the visitor. For example, in the following screenshot you can see a configuration that will make the Bot available only when the URL of the page where the visitor is located contains the text "/computers/":



You can use the "Add New Condition" button to insert new criteria.

3. BOT MESSAGING: GETTING STARTED

  1. Create a conversation

The process of creating a conversation for Messaging Channel Bots is very similar to the one seen above. In short, just go to the Management>Chatbot section of the Oct8ne dashboard, select the "Messaging" tab and click on the "Create conversation" button:


A dialog box will then be displayed, where you will need to enter some basic information about the conversation you are about to create: 

  1. Name the conversation
  2. A brief description of it
  3. The language used in user interactions


Once the form is filled out, the conversation designer will automatically open, where you can start defining the behavior of the Bot.


Unlike Conversational Bots for the Web environment, in Messaging it is not necessary to configure a conversation as an initial one, since the selection of the conversation to start in each case is something that is configured from  the Messaging Setup section of  the Oct8ne dashboard, where each queue of an instance can be assigned to a conversation. 

For example, the side screenshot shows the configuration of a Messaging queue serviced by Bots, which has been configured so that its initial conversation is the so-called "Black Friday default conversation".

Therefore, in this case, when a visitor is assigned or moved to the "Default queue" queue, the Bot will start the "Black Friday default conversation".










  1. Specific tools in the conversation designer

Once you've finished modeling your conversation for Bots Messaging, you can use the buttons on the top toolbar, specific to Bots, to perform the following actions:


  1. Save the changes you made. By pressing this button, the conversation settings will be saved, although it will not yet be available to visitors until it is published.
  2. Publish the conversation, so that it can be used when the Bot is active. This step is necessary so that a conversation can be used by users who write to your messaging channel.
  3. Removing the conversation undoes the post and makes the conversation unavailable to visitors.



An important aspect to keep in mind is that, unlike what happens on the Web, Bots for Messaging do not have a preview mode, so they must be published in order to be tested. However, you can use the following procedure to test your conversations:

  1. Design the new conversation you want to test.
  2. In one of the instances of Messaging that you have configured, create a new queue managed by Bots and assign the new conversation to it.
  3. Access the instance where you have configured the queue from your messaging application.
  4. As an agent, from the Oct8ne dashboard, move your user to the queue created in the second step.
  5. The Bot will take control and start the conversation configured for that queue.

Tip: While testing a Bot Messaging, you can completely restart your conversation from the app (WhatsApp, Messenger, etc.) by sending the text "/reset" (without the quotation marks). This will return the conversation to the starting point and delete all the data collected so far.


4. AVAILABLE MODULES

In this section, we'll go through the modules that Oct8ne makes available to you to model the Bot's conversations:

  1. The modules common to Web Bot and Messaging and that, therefore, can be used in any type of Bot.
  2. Modules available exclusively for Web Conversation Bots.
  3. Modules available exclusively for Messaging Channel Bots.

The following table summarizes the set of modules and their availability in each Bot type:

Module

Available in

Bot Web

Available in Bot Messaging

Chat

✔

✔

Request data

✔

✔

Agent Available

✔


Transfer

✔


Multiple choice

✔

✔

Media

✔

✔

Link

✔

✔

Tag

✔

✔

Analytics event

✔


Save contact

✔

✔

Show order details

✔


Send transcription

✔

✔

Send email

✔

✔

Additional Info

✔


Privacy policy

✔

✔

Delay

✔

✔

End

✔

✔

Run script

✔


HTTP Request

✔

✔

Assignment

✔

✔

Condition

✔

✔

Conditions List

✔

✔

Loop

✔

✔

Multiple choice array

✔

✔

CRM Integration

✔

✔

IFrame

✔


Product Search

✔

✔

Form

✔


Chat GPT

✔

✔

Map JSON

✔

✔

Move to queue


✔

Set pending status


✔

Status change


✔


Note: Depending on the plan contracted with Oct8ne, some of these modules may not be available. If you need to use modules that are not included in your plan, please consult with your Business Advisor.


  1. Basic Modules


  1. Chat

This module is used to send messages to the user, which will be displayed in the form of "speech bubbles" or bubbles in their chat interface in Web Bots, or as messages in messaging applications such as WhatsApp or Messenger.


To configure this action, you will simply need to add as many messages as you want to send to the visitor. These messages can use basic text formats, such as bold or italics, using the buttons located in the editor toolbar. 

In Bots for the Web, it is also possible to include links and images integrated into the text, although for the latter it is recommended to use the Media module, specially designed for this purpose.

It will also be possible to insert in the body of the message the value of variables previously defined in the conversation, whose values will be replaced at run time. You can use the {x} button on the toolbar to do this:



Chat

Available in Web Bot

Available in Bot Messaging

✔

✔





  1. Request data

You can use this module when you want the Bot to request some type of information from the visitor, such as their name, email, or the identifier of the order they want to consult, among others. The information provided by the user will be entered into a variable that can then be used in subsequent modules or actions. 

When you enter this action, you'll need to configure the following aspects:

  1. The text or question that will be sent to the user 

to request the information from you, 

such as "What's your name?"


. You can use the same editing tools as in the "Chat" module.

  1. The name of the variable in which it will be 

deposited the value entered by the user. Variables can be any word or identifier that begins with a letter and contains only letters and digits, such as "first name" or "last name1."

  1. The type of data expected, to be chosen from the following:
  1. Text (plain text or alphanumeric)
  2. Email
  3. Number (a numeric value)

When the type of data received is not correct, the information will be requested again from the user.

Note:  Phone numbers, ZIP numbers, zip codes, or any type of reference, such as an order code, are usually of the "Text" type. Use the "Number" data type only when you plan to perform mathematical operations with the value. 


Request data

Available in Web Bot

Available in Bot Messaging

✔

✔







  1. Agent available 

This action allows you to check the availability of an agent or group of agents and branch to different modules based on the result of the check. 

Depending on the configuration of the module, the availability of the following will be checked:

  1. Any agent, regardless of their department.
  2. Agents from a specific department, selected using a drop-down control.
  3. A specific agent, also selected through a drop-down menu.


This module can be connected with two different possible actions, depending on the result of the availability check. For example, if agents are available, you could connect with the Transfer module to transfer the session to a physical agent; otherwise, the conversation could be modeled so that the user is asked for their contact details to write to you later.


Agent Available

Available in Web Bot

Available in Bot Messaging

✔

🛇 


  1. Transfer 

This module transfers the conversation to an available agent, based on the specified criteria.

To configure this action, you must first specify a text, which will be displayed to the agent receiving the transfer.

Next, the destination of the transfer will be defined, to be chosen between:

  1. Any agent and department, indicating that the transfer will be made to the first available agent, regardless of which department they are in.
  2. Agents from a specific department, selected using a drop-down control.
  3. A specific agent, also selected through a drop-down menu.

It is common to find this module right after the Agent available module.


Transfer

Available in Web Bot

Available in Bot Messaging

✔

🛇 

Alternatively, you can use the 'Move to queue' module to transfer the chat to a specific queue managed by an agent.


  1. Multiple choice

This action allows you to send the user a list of options, from which the user must select one to continue the conversation. 

Its configuration consists of specifying the following information:

  1. The text displayed to the user as the header of the various selectable options.
  2. The type of selector, only available in Web Bots, to choose between a list of buttons or a drop-down menu. It is advisable to use the latter when the number of options is high, so that it is more easily readable by the user.
  3. An optional output variable that allows you to assign a variable the value selected by the user.
  4. The options that the user must choose from.

Each of the options provided to the user must be connected to the action or module that will be executed when the user selects it. For example, in the following conversation, a Multiple-choice module is configured, and each of the options is linked to a subsequent chat module that will allow the conversation to continue: 

It's usually not a good idea to show the user overly long lists of options, because it will make them difficult to read and make their decision more complex. In these cases, it will be more advisable to chop up the question and use several Multiple choices chained together until you reach the answer you want to get from the user:

🛇 NOT RECOMMENDED

✔ ADVISABLE




Multiple choice

Available in Web Bot

Available in Bot Messaging

✔

✔


  1. Media

This module aims to send the user a video, image, or audio. In Web Bots, resources will be displayed in the coviewer area, while Messaging Bots will send them as separate messages in the conversation.


To configure this module, it will be necessary to indicate:

  1. The type of resource that will be displayed to the user, which can be: Image, audio or video.
  2. The Internet address (URL) of the resource you want to share. You can enter an existing link or click the "Upload" button to add a new resource on the fly.
  3. Optionally, you can enter a title or descriptive text, which will be sent along with the resource.

Note: The Internet address (URL) must refer to a physical file, and not to the address of service pages that display it. For example, the address to a YouTube page would not be valid.


Stocking

Available in Web Bot

Available in Bot Messaging

✔

✔


  1. File

This module aims to send the user a file or a document. In Web Bots, resources will be displayed in the coviewer area, while Messaging Bots will send them as separate messages in the conversation.


To configure this module, it will be necessary to indicate:

  1. Upload of the file in question of the resource that you want to be shared. Click the "Upload" button to add a new resource on the fly.
  2. Label: Optionally, you can enter a title or descriptive text, which will be sent along with the resource.

Note: This module only accepts file uploads at the moment. It will not be possible to use an Internet address (URL)


File

Available in Web Bot

Available in Bot Messaging

✔

✔



  1. Link

This module allows you to link the conversation to another conversation created in the system, or to another module within the same conversation. 

To configure this action, it will be necessary to select the target conversation, using a drop-down menu where all the conversations created in the Oct8ne panel previously published will appear, and the destination module within that conversation.

This way, when the dialog with the user reaches this action, the flow will jump to the module specified as the destination, continuing the conversation with the visitor right at that point.

Note: You can't link a Web Bot conversation to a Messaging Bot conversation, or vice versa. Also, keep in mind that you can only link to conversation that has been posted.


Link

Available in Web Bot

Available in Bot Messaging

✔

✔



  1. Tag

Tagging is a simple formula to classify sessions and allow their subsequent monitoring, statistical analysis and aggregate data collection.

The Tags module allows you to automatically tag sessions when the dialogue with the visitor passes through the point in the conversation where it has been inserted. 

In your configuration, the only data required is the selection of the tag to be used, which must have been previously defined from the administration tools of your account.

To create a new tag you need to go to Management > Tags section  of the Oct8ne dashboard. Also, if you type in a non-existent tag, when you save the changes made to the properties of this module, it will be created automatically.


Tag

Available in Web Bot

Available in Bot Messaging

✔

✔



  1. Analytics events

Similar to the Tags module, this action allows you to send personalized events to Google Analytics that will allow you to track and subsequently use the key points of your conversation statistically. 

To configure this action, you'll need to enter the event and, optionally, the subevent you want to send to Analytics.






You can create the events and sub-events to be tracked from Oct8ne in your Google Analytics dashboard.


Analytics event

Available in Web Bot

Available in Bot Messaging

✔

🛇 

As an alternative for tracking, you can use the Tag module.


  1. Save contact

This module allows you to save information about a contact in Oct8ne whose data has been previously stored in system variables: 

  1. Using a module such as Request data to request it from the user,
  2. Using the mapping module,
  3. Or by getting them from an external API using the HTTP Request action.

The configuration of the module consists of specifying the variables where the information of the main fields of the contact is located:

  1. Email, mandatory
  2. Name
  3. Surnames
  4. Phone Number


The selection of variables is done using a drop-down selector, so they must have been previously defined in the conversation.

This data will be saved correctly in the session and it will be possible to export it from the Statistics section of the Oct8ne control panel.


Save contact

Available in Web Bot

Available in Bot Messaging

✔

✔


  1. Send transcription

This module sends the transcript of the current session to the email address specified in your settings. 

It is possible to configure the subject of the message, as well as indicate one or more recipients of the email, which can be fixed addresses or variable names written in the form <var>VariableName</var>.





The content of this email is not configurable, and contains only the transcript of the dialogue with the user. If you want to send custom text, use  the Send Email module, which will allow you to add the transcript as well.


Send transcription

Available in Web Bot

Available in Bot Messaging

✔

✔


  1.  Send email

This module allows you to send an arbitrary text to the email addresses that are configured as recipients of the message, optionally, along with the transcript of the conversation. 

It is possible to configure the subject of the message, as well as indicate one or more recipients of the email, which can be fixed addresses or variable names written in the form <var>VariableName</var>.

It is also possible to configure the body of the message, as well as indicate whether you want the transcript of the conversation with the user to be added automatically.

If the email can be answered, you can configure the recipient of the reply using the 'Reply to' field.


Send email

Available in Web Bot

Available in Bot Messaging

✔

✔


  1.  Show order details

This module, only available for Web Bots, queries the e-commerce platform for details of an order whose identifier or reference is stored in a system variable, and displays that information through a custom text. 

To do this, first of all, it is necessary to select the variable where the code of the order to be obtained is saved. This variable may have been populated by asking the user for its value through a Request data action, or through any of the mechanisms provided by Oct8ne. Next, the text to be displayed to the user when the order data has been retrieved must be indicated. The following internal variables can be used in this text, which will be replaced by the real value obtained from the platform:

{date}, {reference}, {total}, {currency}, {labelState}, {deliveryDate}, {carrier}, {trackingNumber}, {productNumber}, {trackingUrl}


So, if we use, for example, a text such as "Your order {reference} is in status '{labelState}'", a user could get a message in the chat such as "Your order 2293X39 is in the status 'In delivery'". 


Finally, it is possible to map the value of these internal variables to variables usable at any other point in the conversation. This is achieved in the last section of the module configuration, adding correspondences between conversation variables and the order status values obtained.


The use of this module is restricted to plugins that have the Order Status API implemented, as well as custom implementations of Oct8ne API 2.4.


Show order details

Available in Web Bot

Available in Bot Messaging

✔

🛇 

Alternatively, you can usually use Http Request actions  to get the data from the backend and then display it using Chat modules


  1.  Additional info

The objective of this action, available exclusively for Web Bots, is to show the user extensive information, using the coviewer area, available in the Oct8ne web visitor interface. 

The module will display a short message in the chat window, identified as "Link" in the settings, the pressing of which will cause the viewer to open in the form of a popup showing the title and the full body of the message.





Additional info

Available in Web Bot

Available in Bot Messaging

✔

🛇 

Alternatively, you can use Chat modules  with long text, or even external links to websites where the information is displayed.


  1.  Privacy policy

The purpose of this action is to show the user a text and a link to the company's privacy policies, offering the possibility of accepting or rejecting them. 

In addition, in Privacy policy you must configure two connections with other modules:

  1. The first is that it will be the path taken by the conversation if the user accepts the privacy policies.
  2. The second will define the next steps in the conversation when the user decides not to accept them. Typically, you'll link  a Chat action  to send a goodbye message, and an End to end the conversation.

Privacy policy

Available in Web Bot

Available in Bot Messaging

✔

✔


  1.  Delay

The Delay module allows you to introduce a delay in the conversation, which can be useful to give the user time to read consecutive messages, or to make the interaction more human by simulating the time it would take a person to type between different messages. 

In Web Bots, in the configuration of this module it is possible to specify both the time of the pause and whether the message "Typing..." while the delay is being applied.

Delay

Available in Web Bot

Available in Bot Messaging

✔

✔



  1.  End

This module allows you to end the conversation between the Bot and the visitor. 

In Web Bots, this will end the conversation, being stored as completed in Oct8ne's history. In this case, the only configurable aspect of the module is whether or not a button appears so that the visitor can send their contact details at that moment.

In Bots Messaging, the session will end and the visitor will be moved to the default queue.

End

Available in Web Bot

Available in Bot Messaging

✔

✔










  1. Advanced Modules

  1. Run script

This module, exclusive to Web Bots, allows you to execute arbitrary script code as part of a conversation between a visitor and the Oct8ne Bot. This can be used to trigger an action on the page of your website where the user is located, or a custom code inside the Oct8ne viewer. 

The action allows you to configure the following aspects:

  1. The script you want to execute, which can include calls to functions or objects present on the host where it will be processed. For example, you could include a call to a function on the page that displays a custom popup message. 
  2. The host or location where the script will be executed; by selecting "Run inside Oct8ne", the code will run in the chat advantage; otherwise, it will run on the page that is being visited by the client.
  3. Whether the conversation should continue or should be terminated. It's important to note that this module runs the script asynchronously, which means it won't wait for the script to finish before continuing or logging out.

Important: Oct8ne does not perform any type of security control on the script to be executed, so it is the responsibility of the conversation creator to ensure that the code provided is valid and does not pose any risk to the user or the platform.


Run script

Available in Web Bot

Available in Bot Messaging

✔

🛇 


  1. HTTP Request

This module allows the Oct8ne Bot to communicate via HTTP calls with external systems that have a JSON-based public API during a conversation. This communication could be done in two ways: 

  1. Upstream, i.e. sending data from the Bot to external systems.
  2. Top-down, use the external API to gain insights and integrate the collected data within the conversation.


The specification of an HTTP call consists of providing the following data:

  1. HTTP method or verb: GET, POST, PUT, PATCH or DELETE.
  2. URL: The address of the API endpoint.
  3. Request headers: key-value pairs in which arbitrary headers can be added that will be part of the request.
  4. Request body (except in GET calls): content to be sent to the external server.  Usually this will be a JSON structure (application/json), but form coding (application/form-www-urlencoded) is also supported.
  5. Response Mapping: Extracts information from the JSON response returned by the external API and maps it to variables associated with the current conversation with the user.


The URL, body, and headers properties support variable substitution at runtime, using the <  var>VariableName</var> syntax.


To map the answers, two aspects must be indicated:

  1. The name of the variable in the conversation where the information will be entered.
  2. The origin of the value, or the path to it within the received JSON response.


For example, extracting the name of the following JSON response would use the name source, while getting the city would use address.city:


{ "name": "John Smith", "address": { "city": "New York", "street": "5th Ave" }}


HTTP Request

Available in Web Bot

Available in Bot Messaging

✔

✔


  1. Assignment

This module allows you to create and assign values to variables that can be used later during the conversation. Unlike other modules such as Request data, which allows you to assign values obtained directly from the user to variables, the Assignment module  allows you to assign values that are calculated within the conversation itself.


The Assigment module allows you to specify one or more assignments, setting the value of a variable in the conversation for each of them. For each assignment it will be necessary to specify: 

  1. The name of the variable where we want to store the value. You must use identifiers that start with a letter and can optionally contain numbers. Valid examples would be: total, name, phone1, etc.  
  2. An expression (constant, variable, or function) that specifies the value to assign to the variable. 


Examples of assigning constant values to variables:


Variable

Expression

Feedback

Name

"Peter"

Assign the  text "Peter" to the Name variable

Age

18

Assign Age the numerical value 18

Weigth

24.56

Assign Weight  the numerical value 24.56

IsValid

True

We assign IsValid to the true logical value


Examples of assigning expressions:


Variable

Expression

Feedback

Count

Count+1

Increased the value of Count

Sum

A + B

We assign to Sum the result of adding A and B

FullName

FirstName + " " + LastName

We assign  to FullName the  result of concatenating the value of FirstName, a blank space, and LastName

Rnd

Random(1,10)

We assign Rnd a random number between 1 and 10

Len

StrLen(Name)

Assign  the  length of the contents of the Name variable to Len

Arr

Array(1, 2, 3)

Assign  Arr an array with elements 1, 2, and 3



You can review the full reference of expressions and functions by following this link: https://bot.oct8ne.com/expressions/reference


Assignment

Available in Web Bot

Available in Bot Messaging

✔

✔


  1. Condition

This module allows the Bot to make decisions on its own, based on the information available during the conversation. In a way, it is the action that allows us to provide a certain intelligence to conversations and make them much more interactive and useful for the user. 

The Condition action allows you to modify the flow of the conversation based on the fulfillment of the specified condition(s). 


When more than one condition is specified, they can be combined as indicated in the "execution mode" box:

  1. All criteria must be met (the logical Y)
  2. Some criterion must be met (the logical O)

Each of the criteria included in a conditional action must indicate:


  1. Whether or not the condition must be met (denial logic).
  2. Left operator, which can be any type 

(Text strings enclosed in quotation marks,

numbers, variables, or function calls).

  1. Condition (equal, greater than, less than, contains, starts with, etc.) By default, Oct8ne provides about twenty pre-designed conditions that cover the most frequent cases.
  2. Right operator, which can also be any type of expression.
  3. In the case of text comparisons, whether the operation should be carried out in case sensitivity.


Finally, you'll need to link the condition to the modules that will continue the conversation when the condition is met and isn't met, respectively, as in the following example:





Condition

Available in Web Bot

Available in Bot Messaging

✔

✔


  1. Conditions list

When several conditions have to be entered consecutively in a conversation, the diagram can grow quite large; For example, consider the following conversation, where we chain three conditions to display a message depending on the number requested from the user:

As you can see, the number of Condition modules will be proportional to the number of options to be managed, resulting in extensive and difficult to manage workflows.

The Conditions List action proposes a more compact formula to achieve the same result, concentrating decision-making on a single point and bifurcating towards the different points of the conversation that are of interest. In this way, the above example could be modeled as follows:

This module has two configuration modes: basic and advanced. 

Basic mode is the simplest and most appropriate option when the conversation needs to take different paths based on the exact value of a variable or expression.

Its configuration consists of indicating the expression to be evaluated and then the values of the different execution branches. For example, in the example above, the expression to be evaluated would be the number variable, and the three cases would be the values 1, 2 and 3, which would be inserted individually, and then act as the link points to the continuation of the conversation for each of them.

In advanced mode, on the other hand, you can add different conditions independent of each other. These conditions are set exactly the same as in the Condition module, specifying the left operator, the condition, and finally the right operator. Each of these conditions will define a link point to the next step in the conversation.



Note: Once the module switches to advanced mode, it will not be possible to return to basic mode. In this case, you'll need to delete the action and recreate it.


Note: Regardless of the mode chosen, if none of the conditions stated in the settings are met, the conversation will continue on the default branch.


Condition

Available in Web Bot

Available in Bot Messaging

✔

✔


  1. Loop

You can use this module to create a loop that iterates between two values specified in its definition, allowing mappings to be made within it. It is the ideal formula for processing data sets or arrays (collections of values).

The configuration of the Loop action is done by specifying the following values:

  1. From index, the initial value of the loop's control variable, called $index. It can be a constant or an expression.
  2. To index, sets the highest value (inclusive) that the control variable can take to $index.
  3. Step, a constant numerical value that indicates the increment that will be applied to $index in each iteration of the loop.

Since you can enter positive or negative values in Step, it is possible to create loops both upstream and downstream.


Additionally, you will need to enter one or more mappings, which will be processed as many times as iterations are executed in the loop.

Example: The following conversation asks the user for a number, then shows the user their factorial number (for example, the factorial number of 5 = 5*4*3*2 = 120)


Loop

Available in Web Bot

Available in Bot Messaging

✔

✔


  1. Multiple choice array

This module is very similar to the Multiple choice action described in this document, as its objective is also to send the user a list of options from which they must select one to continue the conversation.

The main difference with respect to Multiple choice is that, in this case, the options that will be displayed to the user will not be specified directly in the properties of the module, but, instead, in variables or expressions of type array.

To configure this module, it will be necessary to indicate:

  1. The text displayed to the user as the header of the various selectable options.
  2. The variable or expression of type array that contains the text of the options displayed to the user.
  3. Optionally, the variable or expression of type array, parallel to the previous one, which contains the value of each of the options shown.
  4. The variable where the value of the option selected by the user will be stored.

The array of values is optional; if omitted, the value stored in the output variable will be the text displayed to the user.


For example, the following conversation shows the user a menu to select a color (red, green, or blue), and then displays the hexadecimal value of that color. To do this, two parallel arrays have been used, one for the name of the color and the other for its hexadecimal value:


Multiple choice array

Available in Web Bot

Available in Bot Messaging

✔

✔



  1. CRM Integration

This module allows your Bot to automatically generate tickets in your Customer Relationship Management (CRM) system. 

When the conversation flow reaches this action, the system will get your current CRM settings (set in the Settings > Integrations > CRM section of the Oct8ne dashboard) and use them to insert a ticket with information about the current session.

After carrying out this task, the conversation will continue through the "Success" endpoint, if the information could be sent to your CRM, or "Failure" if not.

To configure the module, you must enter the data that will make up the new ticket, depending on the type of CRM you are using. For example, if you use Zendesk, you will need to enter information about the status in which you want to store the new ticket, its priority or its subject, as well as the email and name of the customer with whom it will be associated. In all these cases, you can either fill them in by directly entering the values you want to send to the CRM, or insert variable in them using the usual syntax <var>VariableName</var>.

If you change your CRM settings, you can reset the module fields by clicking on the header part: "Click here to load all fields again".


CRM Integration

Available in Web Bot

Available in Bot Messaging

✔

✔















  1. IFrame

This module, exclusive to Web Bot, aims to display HTML frames in both the chat and the coviewer, which would allow arbitrary content to be embedded in both the chat and the Oct8ne coviewer. Examples of use could be embedding a Google Map with a location, a YouTube video, or an online appointment booking website.


To configure this module you will need to:

  1. Indicate  the link or path ("src" attribute) of the application or web page that will be embedded in the IFrame.
  2. Where the frame is going to be displayed. It can be viewed only on the chat surface (the same one occupied by the messages) or in the chat and the coviewer, so it would also appear, with a larger available surface, in the Oct8ne coviewer.
  3. Optionally, it is possible to set additional styles for the <iframe> tag that will be inserted. Here you can insert valid CSS styles into the style attribute of HTML tags. 

An important aspect to keep in mind is that many web applications offer the ability to share their content by generating an HTML code to embed on a host site. This is, for example, what happens if you click the "Share" button on a YouTube video, where it could generate a code like the following:

<iframe width="560" height="315" src="https://www.youtube.com/embed/k3ftlbnbwuc" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>


In these cases, you should ignore all the code and extract only the address of the resource (the value of the src attribute of the <iframe> tag highlighted in the code above), entering it in the URL field of the module configuration. 

Note: For security reasons, not all web content is prepared or allowed to be embedded on third-party sites. Otherwise, the content will appear empty, but the conversation will continue to work. You can also use checker tools such as https://iframetester.com/


IFrame

Available in Web Bot

Available in Bot Messaging

✔

🛇


  1.  Product search

The goal of this module is to show product suggestions to users. You can configure this module to search for products based on the Oct8ne catalog or your store, using keywords or product references as search criteria.


To configure this module, it will be necessary to indicate:

  1. The origin of the products from which the search will be made. It can be "Oct8ne Catalog" or "Store Catalog".
  2. The type of search to be carried out can be "keyword" or "reference" of a product.
  3. Text to search. If you search by keyword, returned products must contain that text; On the other hand, if you search by reference, you must enter the reference of a product in this field. In both cases, you can insert the variable value using the  <var>VariableName</var> syntax.
  4. You can select the number of products to show to the user regardless of the search result. This field will only be available if the search type is by keyword.

In Bots Messaging, you will need to additionally specify two fields:

  1. Search profile, which defines the source of the data.
  2. Display options, which configure how the product will be displayed.

Note: you can consult and modify both the search profiles and the available display options by accessing the Messaging Setup menu from the Oct8ne dashboard, "Products" tab. 


Product search

Available in Web Bot

Available in Bot Messaging

✔

✔


  1.  Form

This module, exclusive to Web Bots, allows you to display custom forms to users in the chat interface.


To configure this module, it will be necessary to indicate:

  1. Form Header: This is the text that will appear at the top of the form
  2. Whether the user will be able to cancel (ignore) the form or not. If enabled, the user will be able to click on a link to continue the conversation without having to fill in the form.
  3. The fields to request form. Each field in the form is defined by:
  1. The data type of the field, which can be â€œText area", "Number", "Email", "Text", "Checkbox", "Select", "Upload" or "Date". 
  2. The text label that will accompany the form 
  3. The default or initial value that the field has if the user does not interact with it. 
  4. The maximum length of the field in case it is any type of text. 
  5. Whether it is required or not. (If required, the user must fill in this field in order to submit the form) 
  6. In case of using the "Select" type, the options that would appear in the drop-down list, separated by a vertical bar. For example, a list to select three numbers would be "1|2|3".


Form

Available in Web Bot

Available in Bot Messaging

✔

🛇
Alternatively, you could use the Request Data action to request the user's data


  1.  GPT Chat

This module allows you to integrate Oct8ne with an AI robot. Specifically, the integration is done with OPENAI. Despite the fact that there are other robots and companies dedicated to Artificial Intelligence, Oct8ne only integrates with OPENIA.  https://openai.com/chatgpt/pricing


The customer will need to have an OpenAI account in order to integrate successfully.



To configure this module, it will be necessary to indicate:

  1. OpenAi Token: This is the token provided by the OpenAi tool for each client, in order to integrate with third-party tools
  2. Prompt: These are the setup instructions for chatGPT; that is, what it should say and how it should behave. 
  3. Input variable: The variable with the text that the visitor has previously entered for the AI to interpret and generate a response.
  4. Output variable: The AI response text will be stored in this variable.



Note: The prompt is the most important part of the setup. Prompts consume tokens, and tokens are paid depending on the OPENAI model used.


A bad prompt can lead to excessive consumption by OpenAI. Consult with our business advisors.





In advanced parameters we can modify certain aspects of the module:


  1. Model: The model or version of GPT AI that is being used.
  2. Response Format: The format of the response text, whether it's text or even JSON. 
  3. Token Limit: Token limit generated in the response.
  4. Temperature, Top_p, Presence Penalty, Frequency Penalty
  5. Memory: Number of previous interventions that the bot has to generate or 'understand' the context that is being talked about.









GPT Chat

Available in Web Bot

Available in Bot Messaging

✔

✔










  1.  Map JSON

This module allows you to map data structures in JSON format and assign them to the BOT's own variables in order to display them in conversation.


To configure this module, it will be necessary to indicate:

  1. Input variable: This will be the name of the variable that contains the JSON we want to map.
  2. Response mapping: Allows you to extract information from the JSON variable returned by any external API (including GPT) and map it to variables associated with the current conversation with the user.



To map the answers, two aspects must be indicated:

  1. The name of the variable in the conversation where the information will be entered.
  2. The origin of the value, or the path to it within the received JSON response.




Map JSON

Available in Web Bot

Available in Bot Messaging

✔

✔














  1.  Move to queue

The Move to Queue module, available exclusively in Bots Messaging, allows you to move a user to the queue specified in your configuration. If the target queue is served by humans, the user will be left waiting for an agent to continue the service; On the other hand, if it is attended by a Bot, it will start the conversation it has configured.

When selecting the queue to which the user will be moved, you have two options:

  1. Move it to the default queue of the Messaging instance associated with the conversation
  2. Move it to a specific queue by selecting it from the drop-down list or by entering the tag with which the queue was identified.

You can check the queue labels available through the Oct8ne dashboard, in the "Queues" section of the properties of the Messaging instances:

Note: Note that this module is a finisher, i.e., the current conversation will stop just as it reaches this point in the dialog and the user is moved to the target queue, and the session with the user will continue in that queue.


Move to queue

Available in Web Bot

Available in Bot Messaging

🛇 

✔


  1.  Set pending status

Basically, users who communicate with Oct8ne agents via Messaging can be in two states:

  1. Pending reply, when the user wrote a message, but it has not yet been answered. That is, the last to send a message was the user.
  2. Not pending, when some agent replied to the user's last message.

The Set pending status module allows you to modify the status of the current user, marking it as pending or not pending to be answered, depending on your interests. This can be useful, for example, if the bot wants to move the user to a human-managed queue and force their state to pending attention so that an agent can resume the conversation.

Set pending status

Available in Web Bot

Available in Bot Messaging

🛇 

✔


  1.  Status change

Apart from Pending/Not Pending statuses, Oct8ne allows you to assign custom statuses to conversations, usually closer to business management needs or customer service processes. For example, you could use statuses like "Pending Review" or "Waiting for Storage" to quickly identify the status of your conversation so you can more efficiently organize interactions with users.

The Status change action allows the Bot to set the status of the conversation. To do this, you need to select the desired state from the drop-down list displayed in the module settings.

Note: You can manage the statuses available in your account from  the Messaging Setup menu, Status tab, of the Oct8ne dashboard.


Change pending status

Available in Web Bot

Available in Bot Messaging

🛇 

✔



5. BLOCKS

Blocks are groups of modules provided by Oct8ne that, working together, define specific behaviors. You can insert them into your conversations, and configure them later to suit your needs.

  1. Order Details

This block consists of 4 modules that define a workflow to get the details of a visitor's order:


  1. First, the visitor is asked for the order ID.
  2. If the order exists, its details are displayed and the conversation continues.
  3. If not, the user is asked if they want to try again, taking them to the initial module if the answer is yes.




6. CONTEXT VARIABLES

When you start the dialog with a user, you can preload a set of variables by getting their values from the context information of the conversation. These variables must be defined from the conversation settings, adding the variables that you will need during the dialogue with the user.

You can access the conversation settings by pressing the cogwheel button at the bottom of the conversation designer's surface.


Context variables act in exactly the same way as the rest of the variables established through modules such as Request Data or Assignment, i.e. they can be used as part of any expression. The difference is that, in this case, their values will be automatically supplied by Oct8ne when the dialogue with the user is initiated.


The environment variables that you can add to the conversation by default depending on the type of Bot used are as follows.


  1. Web Bot Context Variables


Variable Name

Value uploaded by Oct8ne

$url

Full URL of the current page. It can be useful, for example, for the bot to make decisions based on the current path.

$locale

Language and culture of the current page.

$productId

Product identifier (only if the user is viewing a specific product page).

$enterType

Method of entry to Oct8ne (chat opening, trigger, invitation...).

$timeOffset

User's offset from the UTC+00 time zone expressed in minutes (positive or negative).

$triggerId

Id of the triggered trigger. In case the chat has not been opened by trigger (manual opening), it will be 0.

$firstAccessPage

First access to the page.

$urlHash

The hash property of the url where the client is located.

$userAgent

Customer's browser information.

$isDevice

Indicates whether the customer is using a mobile device. True/False


Additionally, it is possible to specify fully customized context variables. These values must be supplied from the page Oct8ne is on, setting them as properties of the page's oct8ne.options.context object  , as in the following example:


<script type="text/javascript">

   var oct8ne = document.createElement("script");

   oct8ne.type = "text/javascript";

   oct8ne.async = true;

   ...    


   Bot context variables:

   oct8ne.options = {

      context: {

         userName: "John Smith"

      }

   };


   ...

   var s = document.getElementsByTagName("script")[0];

   s.parentNode.insertBefore(oct8ne, s);

</script>


After ensuring that the value has been inserted into the page, it is necessary to add a new variable of type "Custom" to the set of context variables from the bot designer of the Oct8ne dashboard, indicating:


  1. The name of the variable, for example "Name".
  2. The path to the property where the value is located within the oct8ne.options.context object; in the example above, it would be necessary to enter "userName" in order for the value to be retrieved.














  1. Bot Messaging Context Variables


Variable Name

Value uploaded by Oct8ne

$clientName

Name of the customer on the messaging platform, or the one set by the agents using the Messaging tools.

$locale

Language and culture of the instance used in the conversation.

$messagingApp

Name of the app used by the customer, such as "Whatsapp" or "Messenger".

$license

License code for your Oct8ne account.

$messagingPlatform

Code of the platform used by the current instance. For example, you will receive 1 for Messenger or 4 for Whatsapp via 360Dialog.

$instanceId

Identifier of the current instance.

$queueId

Numeric identifier of the queue the conversation is currently in.

$queueTag

Tag or textual identifier of the current queue.

$clientId

Identifier of the current user. In case of using Whatsapp, it will match your phone number; on Facebook or Instagram, your internal identifier on those social networks.

$clientCulture

In case of using Whatsapp, the country of origin of the current customer, based on the prefix of their phone number. In other cases, the data will not exist.

The codes shown are ISO 3166 A-2:

https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes

$currentMessage

Last message sent by the user

$currentMessageType

Type of the message sent by the user.

It can be used to distinguish reactions, Instagram mentions...


Also, in Bots Messaging you can specify fully custom context variables. The values for them are defined by the queue the user is currently in. You can configure the values for each queue by editing its properties and entering a valid JSON object in the Variables (JSON) field:



Once done, you need to add the variables present in the JSON object supplied by the queue to the conversation. To do this, you need to insert a new context variable of type "Custom", specifying the name of the variable, which must match the name of the property in the JSON.


For example, if we configure a JSON in the queue as  {"userName": "John"}, we will have to configure the context variable with the name "userName", as shown in the attached screenshot.






Recommendation: Always use property names in context JSON that do not conflict with the variable names used in the conversation.



    • Related Articles

    • API for sending transactional or bulk messages from WhatsApp

      Introduction WhatsApp Delivery API allows you to automate the delivery of WhatsApp templates via Oct8ne. The following operations are available: Send template to WhatsApp Get delivery status Get deliveries Get message details Security All API calls ...
    • Cancelling a WhatsApp Business API (Waba) number

      This document describes the cancellation process, the different statuses that the number goes through both in the 360 Dialog hub and what the customer can continue to do or not do from the time we request the cancellation of a number until it is ...
    • Integration with Google Analytics version 4 (GA4)

      Introduction Oct8ne allows direct integration with Google Analytics version 4 (GA4) through event submission. These provide vital information about the interactions that take place within Oct8ne, which you can check in your Google Analytics ...
    • Contextual Information

      1. INTRODUCTION One of the main features of Oct8ne is its integrated viewer. The viewer is an interactive space shared by agents and customers, within the chat, to view images and videos of the products in your catalog. Simultaneously, you can zoom ...
    • Catalog upload via Feed

      1. INTRODUCTION One of the main features of Oct8ne is its integrated viewer. The viewer is an interactive space shared by agents and customers, within the chat, to view images and videos of the products in your catalog. Simultaneously, you can zoom ...