Skip to main content

Action Nodes

You can use Action nodes to perform a specific task. For example, you can use the Send OTP node to send out an OTP to the user.

info

Action nodes will not display any message to the user during conversation, they run the configured tasks in the background.

The following are the different types of Action nodes available on Yellow.ai:

  1. Interactive nodes
  2. Code Based
  3. Language & Notification

1. Interactive nodes

Interactive nodes lets you manage and improve bot conversations. These nodes help you trigger events, handle OTPs, search documents and respond to user queries, execute flows within flows, delay implementation, ticket generation, analytics capture, PDF/image generation, user event triggering, data formatting, and flow switching.

1.1 Send Event

Record an event with this node. Events are used to record specific actions or capture an important conversion, click here to learn more.


1.2 Send OTP

This node lets you send an OTP to the mentioned number.

info
  • One-Time Passwords (OTPs) serves as a versatile security measure, enhancing user authentication in scenarios such as user registration, account recovery, two-factor authentication (2FA), transaction verification, login security, identity verification, secure messaging, device pairing, coupon redemption, and attendance tracking.
  • This node is not available for Whatsapp
  1. Use the prompt node to capture the phone number from the user and store that phone number in a variable.

  2. Add the Send OTP node and choose the variable in which the phone number is stored (in the previous step).

    drawingThe user will recieve the OTP in a text message.drawing

1.3 Verify OTP

Use this node to verify the OTP sent to bot users. OTP verification is an important security measure that is used to confirm user identity during various processes.

note

This node is not available for Whatsapp

  1. Add a prompt node to get the OTP and store that in a variable.

  2. Add the Verify OTP node.

    • OTP variable: Choose the variable that contains the otp.
    • Store response in: Choose the variable to store the response of the Verify OTP node. If the variable is not available, create a new one.
    drawing
  3. Add a text node to Success and Fallback. Success indicates the successful verification of the otp, Fallback indicates that the verification has failed.

    drawing

Answer user queries referring to the available documents from your knowledge base using this node.

drawing

Document Search action node is used to answer user query at any point in the flow (or fallback) from documents uploaded in the Knowledge base (This node shows results from configured Document Cognition).

  • You can select a variable containing a search query
  • You can also choose to add metadata filters (optional) to your query (the filters you tagged your documents with will show in dropdown).

To add a meta data filter:

  1. Upload the searchable documents to KB along with tags.
  2. Under Tag, choose the tag you added in the previous step, in Value enter the value which should return the doc associated to the specific tag. Values can be added as text, steps or fetched from a bot variable or business profile.

After adding the meta data filter, when a user types a query and it matches with the tags and values added in the previous steps, it will return the exact document to the user.

  • You can branch flow from here based on whether any results were found in the documents (success) or not (failure).
  • There is no store output here, as the results are directly shown in carousels.
  • In node settings, you can configure the total no. of results shown, the total number of results per document and messages shown while showing results/reporting failure.


1.5 Execute flow

This node is available for voice bots.

This node lets you executes a different flow from the current flow. Use this node when you want to trigger a flow within a flow.

For example, in a customer support bot, you can provide multiple options such as Talk to an agent, Raise a ticket, Check status and add execute flow node to each of the option. So, when a user clicks on an option, the respective flow gets triggered.

Once you add the node, you can choose the flow you want to execute. Click Go to flow to check the added flow.

1.6 Delay

This node allows you to delay the progression of the conversation to the next node by a few minutes or hours.

For example, in response to a user query about the current temperature, the bot incorporates a delay, imitating real-time data retrieval like "Checking the latest weather in New York City..." After a short pause, it provides the up-to-date information, creating a more effective and engaging interaction.

You can delay by minutes/hours.

info

Alternative method is to set the delay on each of the nodes:

1.7 Raise Ticket

Raise ticket node lets your users connect with live agents in your bot. Click here to know more about adding live agents to Yellow.ai. You can also connect users with live chat agents in different third-party applications.

This node is used create a live chat request with basic or advanced scenarios such as Working Hours, Agent Availability, Voice/Video calling, etc.

  • Live chat agent: Choose the portal in which your live agents are available. It can be Yellow.ai Inbox or any live chat integration integrated with your bot.
  • Message after ticket assignment: The message displayed to the user when an agent is assigned to the chat.

Name, Mobile, Email and Query fields can be filled by passing variables. Use prompt nodes to collect these data in variables and pass it in the corresponding fields.

Advanced options:

To provide additional information to the ticket.

As configured in Inbox Settings, Tags and Custom Fields will be visible in a multi-select dropdown(i.e. more than one options can be added to ticket)

  • Tags: Selected Tags from dropdown will be added to the extra details of the ticket (useful for agents to get a quick overview of the issue).
  • Group code: Similar tickets can be assigned to relevant groups.
  • Priority: Denotes the priority of tickets from high, medium or low. (default priority is MEDIUM)
  • Voice Call Options: Voice Call, SIP Call and Auto Start Call can be enabled.
  • Custom Fields: Based on the use case additional information collected by bot can be added to ticket. for example, in eCommerce Order ID, Payment Mode, Delivery date etc can be asked before connecting to the agent. Just like key value pairs, once a custom field is selected, an additional prompt will be seen.
drawing

The response of a Raise ticket node:

{
"tags": [],
"responded": false,
"ticketType": "livechat",
"ticketCsatScore": null,
"agentCsatScore": null,
"assignedByAdmin": false,
"manualAssignment": false,
"lastAgentMessageTime": null,
"lastUserMessageTime": null,
"lastBotMessageTime": null,
"userActiveStatus": null,
"agentActiveStatus": null,
"replyCount": 0,
"voiceCall": false,
"sipCall": false,
"agentCurrentHandlingTicketsCount": 0,
"autoStartCall": false,
"autoTranslate": false,
"autoDetectLanguage": false,
"_id": "6156df377b7bb14e16bae116",
"botId": "YOUR_BOT_ID_HERE",
"uid": "106265078787462873391306131746",
"source": "yellowmessenger",
"issue": "ISSUE_TITLE_HERE",
"priority": "MEDIUM",
"severity": "MEDIUM",
"contact": {
"phone": "1234567890",
"name": "CUSTOMER_NAME",
"email": "[[email protected]](mailto:[email protected])"
},
"assignedTo": "community_yello_ai",
"sessionId": "5b8a665e69dbc5c451d88bf0",
"userLanguage": "en",
"ticketId": "100001",
"logs": [],
"timestamp": "2021-10-01T10:13:11.657Z",
"reassignmentLog": [],
"collaborators": [
{
"_id": "6156df377b7bb15d9fbae11a",
"username": "community_yello_ai",
"xmppUsername": "user_1624003758958",
"name": "yellow.ai Community"
}
],
"agentLanguage": "en",
"status": "ASSIGNED",
"assignedTime": "2021-10-01T10:13:11.695Z",
"xmpp": "user_1624003758958"
}

Raise ticket outputs

  1. Ticket Closed: Add any node to perform the preferred action when a ticket is closed successfuly.

  2. Error: Add any node to perform the preferred action when there's an error connecting to an agent.

    drawing

Error handling

The output of a Raise Ticket Node dictates general behaviour for any error in creating a ticket. In most real life scenarios, it is preferred to show appropriate reasons to users as to why they cannot to an agent.

note

Once any specific event is active and configured, the corresponding flow will be given preference. Bot is never paused unless a ticket is in ASSIGNED state (i.e. Agent is interacting with the user).

Two steps to handle custom scenarios are as follows:

  1. In Events, activate the custom inbox event. Scenarios that can be handled:
  • All Available Agents Busy
  • All Available Agents Away
  • All Available Agents Offline
  • All Available Agents Limit Reached
  • Queue Not Enabled
  • Group Queue Not Enabled
  • Group Queue Limit Reached
  • Offline Ticketing Not Enabled
  • Offline Ticketing Not Enabled for Groups
  • Offline Ticket Queue Limit Reached

2. Build a flow with relevant events added in the Start Trigger.

Working hours

If the bot is supposed to respond with a different message outside of agent working hours, Logic Node can be used.

drawing
note

The bot default timezone is considered while evaluating whether a user is outside working hours.

Auto-translate incoming chats

Inbox supports automatic translation, allowing agents to assist customers without requiring knowledge of the customer's language. Just enable Translate User Message in the raise ticket node configuration to use this feature.

drawing

1.8 Analytics

This node lets you capture analytics.

You can use the analytics node to send analytics events and capture custom events at any point in the execution of a flow. You can type the event name to push and select a value. The data passed via the node will flow into the analytics table of Data Explorer inside the Insights section.

For instance, use the analytics node to record a SignUp event with a corresponding value and keys, allowing you to analyze user interactions and track metadata in the Data Explorer's Insights section.

Event: This can be a static name or a variable which will be captured under the Events column on the analytics table.

Value: A variable needs to be selected here which will be captured under the eventValue column.

Keys: This is an optional field to capture metadata and will be created as a new column. Multiple columns can be created using keys.

info

Using custom events, you can analyse user flow from one flow/step to another, filter by specific custom events, summarise by different user responses, visualise drop offs and conversion funnels, etc.

Open the Analytics page by clicking the Analytics Table link.


1.9 Generate PDF/Image

Use this node to generate PDFs and images (JPG/JPEG/PNG) files from docsx, html and Base64 files.

To convert from docsx

  1. In Template, click Upload file and upload the template based on which the PDF should be generated. This document should be in .docx format and have placeholder values wherever the dynamic data is to be inserted. The placeholder should be enclosed in single brackets, that is{placeholdername}. For example, The company name is {company name}.

  2. In + Add Variable Mapping: Enter the placeholder name without the brackets in the left column and select a variable (in which the value is collected from the user) in the right column.

    drawing
  3. Select an output format will be auto-populated by PDF as that's the only available option for docs.

To convert from HTML

  1. In Select variable containing HTML string, choose the variable that contains the HTML string.
  2. In Select an output format, choose the format in which the file should be generated, PDF/JPG/JPEG/PNG

Enable Advanced options to set the margin and dimensions based on which the file should be geenrated.

drawing

To convert from Base64

There are two ways by which you can convert Base64 files:

From APIs

  1. In Input type choose API.
  2. In API, choose the API added to your bot. If your API has dynamic paramters, add nodes to collect that information from users.
  3. In Path to a BASE64 key, enter the path to the BASE64 key.
  4. Select an output format will be auto-populated by PDF as that's the only available option for docs.

From variables

  1. In Input type choose Variable.
  2. In Select variable, choose the variable that contains the BASE64 file.
  3. Select an output format will be auto-populated by PDF as that's the only available option for docs.

Display the file though the File node. Simply choose the relevant variable from the fetch from variable dropdown, it will send the dynamically generated file as a PDF to the user.

info

To display PDFs from an API response, store the response in an object variable, for example pdf_response. Include a text node and enter this syntax {{{variables.pdf_response.file.url}}}

1.10 User event

This node lets you trigger an event with a certain amount of delay. For example, if you can get feedback from users after the chat gets over, you can use this node to trigger that event which will trigger the feedback flow.

To use this node:

  1. Create a user event. To do so, go to Studio > Builder > User Events > + Add Event.

  2. In Event name, provide a name for that event and in Event description descruibe the nature of that event. Click Create Event.

  3. Go back to Build, create a flow with the start trigger as this event created in the previous step. This flow should essentially contain all the nodes required to execute the action when this event takes place.

  4. Then go to the flow which should send this event and include the User event node.

  5. Fill in the following fields:

  • Event key: Choose the event created in step 2.
  • Event delay: Enter the time by which the event occurence should be delayed.
  • Payload: Choose the variable that contains the data that should be sent along with the event.
  1. Once the flow reaches this node, the event is triggered, and the associated flow will be executed precisely after the specified delay time.

1.11 Data formatter

Use the Data Formatter node to convert the incoming data to JSON. For instance, convert user input, such as name and email, into a structured JSON object for better processing in downstream applications.

  • Input: Create/select the variable that contains the data to be converted and select the format of the data. CSV (raw, base64, url) and XML are supported in our platform.
  • Format to: Select JSON.
  • Parse json output: Choose the function that filters out a certain data from the JSON. Click here to know about writing functions.

1.12 Switch flow

This node lets you quit the current flow and launch another flow. The conversation switches from the current flow to another flow from that point and you cannot add any nodes post this.

For instance, you can use this to guide users from an initial greeting flow to a specific feedback flow, ensuring a smooth transition.

Add the node and choose the flow to which the bot should switch from the flows drop-down.

info

The difference between a switch flow and an execute flow node lies in their behavior regarding the bot's return to the original flow. In the case of a switch flow, the bot does not return to the original flow from which the node was triggered. Howevers, with an execute flow node, the bot returns to the original flow after executing the designated new flow.


1.13 Prompt Executor node

info
  • This node works only if you have configured an LLM model. For steps on configuring the LLM model, click here.
  • This node is not available for Whatsapp.

The Prompt Executor node processes the prompt you provided, using input from the user. It fetches instant responses from the AI model and displays them to end users, adhering to the specified prompt.

Use a prompt node to collect the dynamic user response in a variable and pass the variable in User Query.

For instance, imagine you wish to share food recipes with the end user. Use a prompt node to inquire about the preferred recipe, save the response in a variable, and pass it here. The node will display the recipe for the ingredient the user asked about.

Goal configuration settings

Here you can control randomness, sets limits for concise outputs and refine word selection based on probability. Click here to know about this in detail.

Model configuration

Model configuration provides you the freedom to manually input your own custom GPT or LLM credentials into the bot. You can then use various models on different dynamic nodes within the same bot independently. This grants you the flexibility to conduct extensive experiments. Click here for the steps.

2. Code-based nodes

Code-based nodes allow you to execute actions such as retrieving or sending data via API responses, implementing custom logic for specific actions, and using stored variable data effectively.

2.1 API

This node is also available for voice bots.

With the API node, you can connect to an API at a specific point in a flow to send and get responses from a third-party system outside of your chatbot.

drawing

To know about the various features of the node and how to use it, click here.


2.2 Variables

This node is available for voice bots.

Use the variable node to assign values to a new variable which has not been previously used to collect/store data.

There are two ways by which you can assign values:

  • Assign a static value
  1. In Name select a variable or create a variable.

  2. In Value, type the value you'd like to assign to that variable.

    drawing
  • Assign a dynamic value
  1. In Name, select a variable or create a variable.

  2. In Value, click the variable icon to fetch the variable value you'd like to assign to the variable.

    drawing

For example, let's say that you have captured the First name and the Last name of a user and you want to save both the names under one variable Full Name.

  1. Add two prompt nodes to capture the responses in two different variables.
  2. Add a Variable node, create a new variable Customer Name and fetch the variable values of the prompt nodes. This Customer Name can then be used throughout the flow for a different use case. Refer to the gif below to understand how this works.


2.3 Database

This node is available for voice bots.

This node helps you perform database operations such as insert, update and search operations in your database tables.

drawing
  • Insert: Select Insert to insert data in each column into any existing database table you select. To know more, click here.
  • Search: Select Search to look for specific data in the database. To know mroe, click here.
  • Update: Select Update to update any column in the databse. For steps to do so, click here.

2.4 Function

This node is available for voice bots.

This node lets you run custom logic written in the Function section for specific use cases and store the result in a variable to use it in bot ocnversations.

  • View function takes you to the function chosen in the Function field.
  • +Create new function button takes you to the function section where you can create a new function.
  • Store Response in lets you store the response of the function in a variable which can later be used in the flow if required.

Function node is most commonly used to fetch transformation codes that parses API responses to filter specific data. Click here for the steps to use this node.


2.5 Modifier

The node lets you convert the user input to a certain format before passing it to a database/API, or displaying it to the user. Use Store Response in option in this node to store the modified input in a variable to use it further in a flow.

For example, let's say that you want to convert the user input to all caps. Your input would be Test and the would be TEST.

To see how this node works, click the button at the top and enter your input to observe the corresponding output.

The following actions can be performed:

ActionDescriptionOutput typeSample inputSample output
Capitalize 1st letterCapitalizes the first letter of the inputStringi am aakankshaI am aakanksha
Capitalize 1st char of wordCapitalizes the first character of the inputStringhi aakankshaHi Aakanksha
Lower case allConverts all the letters of the input to lower caseStringHi AakanKshahi aakanksha
Upper case allConverts all the letters of the input to upper caseStringHi AakanKshaHI AAKANKSHA
Clean InputCleans the input off extra charactersStringvidyadhār nāgār,jaĭpŭrvidhyadhar nagar, jaipur
Add on both sidesAdds a character on both sides of the input (The length should be lesser than teh defined length)StringAkku (x = - , y = 6)-Akku-
Add at endAdds a character at the end of the input (will be added if length is lesser than the defined length)StringAkku (x = - , y = 6)Akku--
Add at startPrefix the input with a character. (will be added if the length is lesser than the defined length)StringAkku (x = - , y = 6)--Akku
Replace firstReplaces the character entered in find preset with the character in replace preset at the prefix of the input.String[email protected] (x=.,y=[dot])abc@gmail[dot]com
Replace AllReplaces the character entered in find preset with the character in replace preset at any part of the input.String[email protected] (x=.,y=[dot])abc@gmail[dot]com
Remove from both sidesRemoves the specified character from both the sides of the input-Akku- (x=-)Akku
Remove from startRemoves the specified character from the prefix of the inputString-Akku- (x=-)Akku-
Remove from endRemoves the specified character from the suffix of the inputString-Akku- (x=-)-Akku
Limit lengthThe input length is restricted to the specified number in the length preset, and any additional characters beyond that are substituted with the character defined in the omission preset.Length limitAakanksha Jain (x=12)Aakanksha Ja...
SliceProvides the input between the set positionsArray[1,2,3,4,5] (2,4)3
Split by spaceSplits the input into arraysArraytree house["tree", "house"]
Split into wordsThe input is divided into individual words based on the character specified in the preset.Arraytreehouse ,["tree", "house"]
JoinJoin the input array with the character in presetString["My", "Name", "is", "Aakanksha"] (with = '-')My-Name-is-Aakanksha
Pick by positionPicks the word in the array in the specified positionString["My", "Name", "is", "Aakanksha"] (3)is
Get lengthReturns an array's lengthString[]"My", "Name", "is", "Aakanksha"]4
For eachApply modifier options on each element of the arraySelect modifier["My", "Name", "is", "Aakanksha"] (operation = Upper case all)["MY", "NAME", "IS", "AAKANKSHA"]

3. Language and Notification nodes

3.1 Set language

This node lets you change the language of the bot conversation to one of the pre-configured languages. The language can be changed only if you have already set up languages in your bot, otherwise, this node will not work. This node takes input only in the form of ISO codes based on which it will change the language of the bot.

drawing

Let's say that you want to build a flow that asks for user's preferred language to continue the conversation.

  1. Add the preferred languages to your bot.

  2. Go to the flow and include a Quick reply node. Create different buttons for different languages and assign the ISO code as button values to the respective language option.

  3. Store the response of the Quick Reply node in a variable.

  4. Include the Set language node and choose the variable created in the previous step. Refer to the following gif to see how it works.


3.2 Outbound notification

This node lets you send notifications as part of the bot conversation. Include this node at whichever point of the flow you want the bot send an outbound notification. Using this node you can send notifications via SMS, Email, Whatsapp and Voice.

Imagine you've integrated a chat bot into your e-commerce platform. When a customer successfully places an order, the bot distribute notifications across different channels as configured in the node. For example, customers receive WhatsApp/SMS messages confirming their order details, while Email/Voice notifications are dispatched post-shipping for additional updates.

For a detailed guide on setting up outbound campaigns, click here.

OptionDescription
TypeChoose the type of communication you want to send: SMS, Email, WhatsApp, or Voice.
SenderChoose the sender ID from which you want to send the communication.
ProfileSelect the sender for the SMS notification. Applicable only for SMS in India.
ToChoose the appropriate variable containing the recipient details, example, SMS phone number, Email address, etc.
CCChoose recipients for CC (Carbon Copy) if needed.
BCCChoose recipients for BCC (Blind Carbon Copy) if needed.
Select templatePick a template to use for your communication.
Store message ID inChoose the variable where you want to store the Message ID.
Text typeSelect Text/SSML from the dropdown.
TTS EngineSelect the engines from the dropdown- Microsoft Azure, Google Wavenet, Amazon Polly.
Voice IDType the characters of voice ID. You can add this for Microsoft if text_type = "text" and for Google if text_type = "text" and "SSML".
SpeedThis value defines how fast the bot must converse. This value can be 0.9 - 1.5 for the bot to soundly humanly. You can add this for Microsoft if text_type = "text" and for Google if text_type = "text" and "SSML".
PitchPitch value can be any decimal value depending on the base of voice required, 0 is ideal. You can add this for Microsoft if text_type = "text" and for Google for text_type = "text" and "SSML".
Capture DTMF lengthEnable this option if the DTMF is to be collected on the specific node.
DTMF digital lengthEnter the length of characters to be captured. Ex: For an Indian phone number, it is 10.

3.3 Notification status

The Notification status node helps you track the delivery and status of the notification configured in the Outbound Notification node. It uses the Message ID to retrive the notification status. The node offers valuable insights, such as delivery confirmation, read receipts, or error notifications, depending on the capabilities of the communication channel.

You can make use of message status (Sent/Delivered) to take appropriate actions based on the status of your outbound notification, ensuring effective and responsive communication with your audience.

To use this node:

  1. Add an Outbound Notification node to your flow and store the response of that node in a variable.

  2. Add a Notification Status node to the outbound notification node.

  3. In Type, choose the communication channel: SMS, Email or WhatsApp and in Message ID fetch the variable that contains the Message ID.

  4. In notifStatusStoreCustomPayloadIn, create or choose the variable to store the payload.

  5. Connect relevant nodes to Sent and Delivered options based on what you want the bot to do if the particular notification was sent and delivered.

note

To know more about Outbound notifications, click here.


3.4 Sync database

info

This node is only available when a flow is created as a skill.

The Sync database node facilitates the synchronization of your bot's database with external databases using APIs. This node streamlines the process of automating data synchronization with external databases.

Let's say you have a bot that assists with inventory management for an e-commerce website. You want to ensure that the inventory data in your bot's database is always up-to-date with your main inventory database. By using the Sync database node, you can seamlessly integrate your bot's database with your main inventory database, ensuring that any changes or updates made externally are reflected in real-time within your chatbot, thus providing accurate and timely information to your users.

info

Refer to this video to see how this node works

Sync DB node

note
  • The column names in the table should be exactly the same as the attribute names in the JSON response.
  • All the rows will be imported, processed and sent to the selected table to perform the selected action.

To configure the Sync Database node:

  1. In API, choose the preferred API in the drop down. For steps to add a new API to the bot, click here.

  2. In Parameters of API, select the variables that contain the values of the corresponding fields.

    • If the values are dynamic, they should be collected from customers using prompt nodes and those variable should be mapped here.
    • If they are static values, you can create a variable and type the values.
  3. In API response type, choose the API response type of the API added. JSON and CSV are the options available. Fill the following fields based on the option selected.

  • JSON path selector:(this field is available only for the JSON response) Select the path where the relevant data lies in the JSON response. For example, the JSON path for the following code would be the is "data.results.*
{
data: {
results: {
record1 :{},
record2: {},
........
}
}
}
  • Parse API response: Choose the function that contains the transformation logic. This helps access individual row attributes.

    Sample code

    (This is optional for CSV)

    return new Promise(resolve => {
    let record = ymLib.args.record;
    /*
    record is an object, representing a row. all values will be of type string, keys will be fetched from the csv-header.
    */
    resolve({
    identifier: record.identifier,
    category: record.category
    });
    });
  • Store Response in: Choose the variable in which the response of this node should be stored.
  • Select table: Choose the database table in which the data should be populated.
  • Select action: Choose one of the preferred actions.
    • Insert: Adds rows from API call to the end of the table.
    • Update: Compares rows from API call to the existing table and checks if there is a match in Unique ID and updates those rows.
    • Import: Truncates existing table completely and replaces it with data from API call.

To use this node in a flow:

  1. Create a Schedule Event (if there is a requirement to schedule the database updates).
  2. Add the API and create a database table in the required format (template without any rows).
  3. Create or open a skill. On the start node, select the scheduled event as the start trigger.

  1. Connect the start node to the Sync Database node.
  2. When the Sync DB node gets triggered, it pulls all the data through API.
  3. On the scheduled time, status of the sync can be viewed in status object.
{
success: true,
error : 'if any, we show it',
recordsProcessed: 1230,
}