Table of Contents

Dialogflow: Parameters

Susan Swier Updated by Susan Swier

Respond.io uses custom Dialogflow parameters to enhance the application's functions to cater to multiple use cases.

In Dialogflow, parameters are generally used to connect words and phrases in a User’s response to entities. So if someone says "My birthday is on March 13," the phrase "March 13" will be automatically detected and treated as a date entity. You can read more about parameters in Dialogflow on their documentation page.

With the respond.io platform, you can use parameters to cover more use cases. You can use them to save and collect information provided by your Contacts, for example by assigning dynamic tags, setting custom fields. You can even notify support representatives when a contact requires assistance. You can also use the respond.io platform to store and easily manage your intent responses.

There is a lot that can be achieved when you use the respond.io platform in conjunction with Dialogflow Intent parameters.

screenshot of dialogflow action and parameters page

Parameter Reference

The list of parameters you can use on Dialogflow to communicate with the respond.io platform.

Parameter Name

Value

Description

RB_ADDTAGS

tag1, [tag2, ...]

Adds the specified tag(s) to the Contact profile on the respond.io platform

​RB_REMOVETAGS

tag1, [tag2, ...]

Removes the specified tag(s) from the Contact profile on the respond.io platform

RB_BOTSTATUS​

false

Turns the bot off for the specific contact. This is useful in cases were you want to pass the conversation from the bot to a human.

RB_MARKDONE​

true/false

Opens or closes a conversation for a Contact. This is useful for support. Opens a conversation for Contacts who are still expecting something, while closing a conversation signifies Contacts who have been attended to.

​RB_NOTIFY

notification_message

Sends a notification to the humans on the respond.io platform, accompanied by a notification message

RB_SUBSCRIBE​

true/false

Subscribes or unsubscribes a Contact. Unsubscribed Contacts will not receive broadcast messages.

RB_FIELD_FIRSTNAME

value

Fills the First Name field of the Contact profile with the specified value

RB_FIELD_LASTNAME​

value

Fills the Last Name field of the Contact profile with the specified value

RB_FIELD_FULLNAME​

value

Fills the Full Name field of the Contact profile with the specified value

RB_FIELD_EMAIL​

value

Fills the Email Address field of the Contact profile with the specified value

​RB_FIELD_PHONE​

value

Fills the Phone Number field of the Contact profile with the specified value

RB_FIELD_LANGUAGE​

value

Fills the Language field of the Contact profile with the specified value, e.g., en-us

​RB_FIELD_[NAME]​

value

Adds a custom field onto the Contact's profile with the specified value. This is best used for non-dynamic information, such as email, birthday, etc.

RB_REMOVEFIELDS​

field1, [field2, ...]

Removes the specified custom field(s) from the Contacts on the platform

RB_USER_ASSIGN​

value

Assigns the Contact to one User in your team

​RB_SNIPPET​

snippet_id

Sends the specified Snippet to the Contact

RB_FILE

file_id

Sends the specified file stored on the platform to the Contact

Tagging

Contacts' information can be stored in the form of tags. Tags can be manually added/removed in the Contacts Module or Inbox Module, programmatically added/removed using Workflows, and added/removed using parameters in Dialogflow intents.

Important: Tags are used for audience segmentation in broadcasts. Keep that in mind when adding/removing tags using Dialogflow intents.

Using Tag Parameters

Adding Tags

Using the RB_ADDTAGS parameter, you can assign a tag to a contact. Tags will be added to the contact based on the value of the parameter. You have the option to add multiple tags by separating them with commas.

screenshot of adding dialogflow tag parameters
Note that tag names cannot contain spaces. You may want to use underscores instead.

Removing Tags

Using the RB_REMOVETAGS parameter, you can remove a tag from a contact. Tags will be added to the contact based on the value of the parameter. You have the option to remove multiple tags by separating them with commas.

screenshot of removing dialogflow tags

Best Practices

When creating new tags, it is a good idea to define short but meaningful names that are easily identifiable. Ideally, you would want other people to be able to understand the tags associated with a user.

With slot filling using entities, you have an option of dynamically creating new tags. However, this is not advised as it will quickly lead to tag pollution.

To reduce tag pollution, try not to be too specific or too generous with the tagging in order the keep the number of tags to a minimum.

When using tags to keep track of a user’s topic interest, you can use the same tag in several intents that have the same topic. This can identify that the user has a specific interest or concern while reducing tag pollution.

Turning the Bot Off

Dialogflow Bot can be turned on/off manually from the Inbox Module and automatically using Workflows. In addition to that, a bot can also be turned off using parameters in Dialogflow intents.

Using a Dialogflow intent to turn a contact's Bot Status off can be used in order to create a human handoff in your bot workflow.

When Bot is disabled for a Contact, no messages are passed to Dialogflow. Contacts with Bot disabled will appear on the platform under Unassigned section in Dashboard.

Using the Bot Status Parameter

With RB_BOTSTATUS, you can turn the bot off for the specific user by setting the value to false.

screenshot showing the bot off dialogflow parameter

Best Practices

The Fallback intent does not include a place to add parameters. When turning off the bot from Dialogflow, you should create a quick reply in your Fallback intent asking the Contact if they want to talk to a human. If the Contact responds with the yes quick reply, that should take them to the intent with the RB_BOTSTATUS parameter.

When using this parameter to disable the bot, you may also want to update the User status on the platform with RB_MARKDONE and send a notification on the platform with the RB_NOTIFY parameter within a single intent.

Closing a Conversation

The Assignment and Closing a Conversation system open a new conversation for all new Contacts and all Contacts with new messages. This ensures that all Contacts who require assistance show up in the unassigned list.

By default, the platform will open a new conversation for all new Contacts and Contacts who send a new message.

A conversation can be opened or closed for a Contact manually in the Contacts Module or Inbox Module, opened or closed programmatically using Workflows, and closed using parameters in Dialogflow intents.

To close a conversation of a Contact from Dialogflow, use the RB_MARKDONE parameter in your Dialogflow Intent(s).

Using The Marked Done Parameter

To close a conversation of a Contact, use the RB_MARKDONE parameter in your Dialogflow intent and set the value to true.

screenshot showing how to use the dialogflow markdone parameter

Any Contact who triggers an intent using the RB_MARKDONE parameter with value true will have their conversation closed on the respond.io platform.

Best Practices

By default, all new Contacts and Contacts with new messages will open a new conversation. You'll want to set add RB_MARKDONE as true for intents that do not require a human agent when triggered.

You may want to think about using this intent in tandem with RB_NOTIFY to trigger a notification when a conversation is opened for a Contact. The notification message can be used to pass on information on what needs to be done for the specific Contact.

Assigning

To assign a Contact to a User from Dialogflow, use the RB_USER_ASSIGN parameter in your Dialogflow Intent(s).

Using The Assignment Parameter

To assign a Contact to a User, use the RB_USER_ASSIGN parameter in your Dialogflow intent and set the value as the email of the platform User you wish to assign to.

screenshot showing how to use dialogflow parameters to assign a contact to a user

Any Contact who triggers an intent using the RB_USER_ASSIGN parameter with a valid User email in Value is assigned to that User on the respond.io platform.

Sending Custom Notifications

By default, the Notification System will send notifications to platform Users when a Contact sends a new message. Additional notifications can be created and sent to platform Users using parameters in Dialogflow Intents.

To send a notification to platform Users use the RB_NOTIFY parameter in your Dialogflow Intent(s).

Using the Notification Parameter

A notification can be sent to the platform using the RB_NOTIFY as the Parameter Name. The value of the parameter will be sent as the notification.

screenshot showing how to use dialogflow parameters to send notifications
Tip: You may use a dynamic variable in the value of the parameter by typing $dynamic.variable.

Best Practices

Use the $contact.name dynamic variable in order to let the platform User know which Contact needs attention.

Use RB_NOTIFY together with RB_BOTSTATUS and RB_MARKDONE to ensure the Contact gets the attention they need.

Unsubscribing

Every now and then you will have a Contact text you "STOP". This is likely because they no longer want to receive broadcasts. Setting RB_SUBSCRIBE as false in Dialogflow will unsubscribe Contacts from all future broadcasts.

Bot responses and direct messages will not be affected.

Using the Subscription Parameter

With RB_SUBSCRIBE, you can subscribe or unsubscribe a Contact to the bot by setting the value to true or false respectively. Unsubscribed Contacts are excluded from future platform broadcasts.

screenshot showing how to use dialogflow parameters to unsubscribe a contact

Best Practices

If you are using the RB_SUBSCRIBE parameter to manage broadcast permissions you should create a custom field in respond.io to display a Contact's subscription status. This can be done by using the RB_FIELD_[NAME] parameter together with RB_SUBSCRIBE.

Contact Fields and Values

Contacts' information can be stored in the form of values in Contact Fields.

In addition to the default fields, custom fields can be added & removed in the Settings Module. New custom fields can also be created from Dialogflow.

If you use a field parameter in Dialogflow and the corresponding custom field does not exist in the platform, a new custom field will be created.

Contact field values can be manually changed in the Contacts Module or Inbox Module, programmatically changed using Workflows, or changed using parameters in Dialogflow intents.

Using Field Parameters

Setting Field Values

You can edit a Contact's custom field value with RB_FIELD_[FIELD_ID] where “[FIELD_ID]” is replaced with the ID of the custom field. The custom field ID is generated as name of the custom field in SNAKE_CASING. The value of the custom field would be set as the value in the parameter. For example, if you are collecting the blood types of Contacts and a Contact has blood type AB positive, you would send the parameter RB_FIELD_BLOODTYPE with the value of AB+.

screenshot showing how to use dialogflow parameters to set a custom field
Tip: You can use custom field values as dynamic variables.

Default Fields

The same can be done for any of the default Contact fields. For example, the parameter RB_FIELD_PHONE can be used to update the value of a Contact's phone number.

By default, Contacts on respond.io have the following Contact fields:

Field Name

ID

Description

First Name

FIRSTNAME

The first name of the Contact

Last Name

LASTNAME

The last name of the Contact

Full Name

FULLNAME

The full name of the Contact, i.e., First Name + Last Name

Email Address

EMAIL

The email address of the Contact

Phone Number

PHONE

The phone number of the Contact

Language

LANGUAGE

The language of the Contact

These default fields are automatically filled using available information provided by the channel when the Contact is first created.

Clearing Fields

To clear a field value for a contact, you can use the parameter RB_REMOVEFIELDS. The value would be the names of the fields you want to remove. You have the option of clearing several fields at once by separating them with commas.

screenshot showing how to use dialogflow parameters to remove fields

Snippets

The Snippets system is used to store the content of commonly used responses on the respond.io platform.

Snippets can be sent out manually in the Inbox Module to reduce typing or sent using parameters in Dialogflow Intents.

By sending Snippets in your Dialogflow Agent, you are able to store the content of your Intent responses on the respond.io platform where they can be easily managed and edited.

Multiple intents can also use the same Snippet. In this case, editing the Snippet will update the content of the response across all of the Intents.

To send a Snippet using Dialogflow Intents, use the RB_SNIPPET parameter. The triggering Intent will respond with the Snippet content.

Using the Snippet Parameter

With RB_SNIPPET, you can send a Snippet as the response. Set the value of the parameter to the Snippet ID that you wish to send.

screenshot showing how to use dialogflow parameters to send snippets
Updating or changing the name or content of a Snippet will preserve the existing Snippet ID.

Sending Files

Files can be sent manually in the Inbox Module or sent using parameters in Dialogflow Intents.

Using the RB_FILE parameter, you can send files stored in the File Manager to Contacts who trigger a Dialogflow Intent.

Using the File Parameter

Before you can send a file, you must upload the file(s) to the respond.io File Manager. Then use the RB_FILE parameter with the file ID as the value to send a file to a Contact.

screenshot showing how to use dialogflow parameters to send files
Only Files uploaded to the space connected to Dialogflow will be sent. Files uploaded to other spaces will not be sent to the Contact.

Feeling stuck? Do not fear.

Need assistance? Contact us for support. Help is here!

Dialogflow: Managing Intents

Dialogflow: Events

Can't find what you're looking for? 🔎

Talk to an expert here!

Contact Support
Status Security
Powered by HelpDocs (opens in a new tab)

Powered by HelpDocs (opens in a new tab)