Conversation Variables
Conversation variables are values which change as per the context where they are used in Skills Builder by Administrators or Developers. Variables can include text and rich text responses on a skill, which can be used in various instances across the Skills Builder.
Conversation variables can easily be used in many places within Skills Builder by typing @. For example, to use a Conversation Variable, go to Bot Dashboard > Skills > Add Skill > Details Tab > Text Responses.
To define the required conversation variable, you need to enter "@" in the Text Responses field, then automatically the available conversation variables are populated in the Text Responses field, select the required variable and click Create. The following types of variables are currently available in the Skills Builder interface.
Types of Variables | Description |
---|---|
Action | Action variables are used to show the parameters from all the actions configured in the skill at the Pre-conversation action level. |
Agent | Agent variables are used in a web service to create a ticket through the Agent Chat Console. It is also used to calculate the average wait time a user has to wait in the agent chat queue before the analyst accepts the chat request. |
Config | Configuration variables are used to show all the configuration parameters from the corresponding connector (ITSM or Generic). These variables are applicable only if a Web service is selected in the action. |
Context | Context variables are variables defined by the user for a particular context. They are used in a skill to leverage conversation parameters. |
Fn | Fn variables are used to generate a random number, such as a One Time Password (OTP). |
Followup | Followup variables are used to configure post action for a follow up. |
Pagination | Pagination variables are used to define the page size and number of items per page. |
Request | Request variables are used in a web service to request information. |
Resp | Response variables are used when in a web service to return information to a request. |
Tenant | Tenant variables are used to return the Tenant details such as the Tenant name in a web service. |
User | User variables are used to look up user details such as the user's first name, last name and more. |
Webservice | Webservice variables are used in error handling to determine the meaning of webservice response status code. |
Variables can be used in the following scenarios:
- Execute web services
- Override web services in Attributes
- Override web services in Skill fulfillment
- Set skill text responses
- Create actions (in text responses and override web services)
Following is a list of the parameters and the scenarios where they are used.
Variable Types | Out-of-the-box (OOTB) Variables | Used in Web Services? | Used to override web services in Attributes? | Used in Skill Fulfillment (by overriding web service)? | Used in Skill Text Responses? | Used in Action (In Text Response and Overriding Web Services)? |
---|---|---|---|---|---|---|
@action For example, @action.Severity is used to specify the dynamic value of a ticket severity in an action. | No OOTB variables available | No | No | Yes (Shows the parameters from all the actions configured in the skill at Pre-check or conversation parameter level) | Yes (Shows the parameters from all the actions configured in the skill at Pre-check or conversation parameter level) | Yes (Shows the parameters from the current action) |
@agent For example, @agent.description is used to provide the ticket description by the analyst while creating a ticket through the Agent Chat Console. |
| Yes | Yes | Yes | Yes | Yes |
@config For example, @config.csm_app_url is used to retrieve the application URL while executing a card message. | No OOTB variables available | Yes (Shows all the configuration parameters from the corresponding connector ITSM/Generic) | Yes (Shows all the configuration parameters from the corresponding connector ITSM or Generic) | Yes (Shows all the configuration parameters from the corresponding connector ITSM or Generic) | Yes (Shows all the configuration parameters from the corresponding connector ITSM or Generic). Applies only if a Web services is selected for fulfillment. | Yes (Shows all the configuration parameters from the corresponding connector ITSM or Generic). Applies only if a Web services is selected in the action. |
@context For example, @context.Description is used to specify the dynamic value of a ticket description in a skill. |
Note Attribute identifiers need to be used after @context.
| Yes (Shows all attributes) | Yes (Shows all attributes) | Yes (Shows only the conversation parameters) | Yes (Shows only the conversation parameters) | Yes (Shows all attributes) |
@fn For example, @fn.randomNumber is used to generate an OTP during the user registration process. | @fn.randomNumber | Yes | Yes | Yes | Yes | Yes |
@followup For example, @followup.TicketIdentifier is used to fetch the ticket identifier during a post action for each follow up. | No OOTB variables available | Yes (only while configuring a webservice for a follow up as part of the post action). | No | No | No | No |
@pagination For example, @pagination.size is used to get the total count of items listed on a page. |
| Yes | Yes | Yes | Yes | Yes |
@request For example, @request.message is used in an API call to display the messages to a user in a bot conversation. | No OOTB variables available | No | No | No | No | No |
@resp For example, @resp.data.TicketIdentifier is used to provide the ticket identifier to the user for an incident, once the ticket is created by Luma. | No OOTB variables available | No | No | Yes | Yes | Yes |
@tenant For example, @tenant.slicetoken is used to call out the tenant slice token in a skill. |
| No | No | No | No | No |
@user For example, @user.userName is used to retrieve the logged-in user's name in a skill. |
| Yes | Yes | Yes | Yes | Yes |
@webservice For example, @webservice.StatusCode is used to determine the meaning of webservice response status code. | @webservice.StatusCode | Yes | Yes | Yes | Yes | Yes |
Related pages
© 2019 Serviceaide 1-650-206-8988 http://www.serviceaide.com info@serviceaide.com