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 VariablesDescription
Action Action variables are used to show the parameters from all the actions configured in the skill at the Pre-conversation action level.
AgentAgent 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.
FnFn variables are used to generate a random number, such as a One Time Password (OTP).
FollowupFollowup 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.

WebserviceWebservice 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 TypesOut-of-the-box (OOTB) VariablesUsed 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 availableNoNoYes (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.

  • description
  • details
  • agentWaitTime
  • supportGroup

    Note

    The agent variables are applicable only in the Agent Chat Console.

YesYesYesYesYes

@config

For example, @config.csm_app_url is used to retrieve the application URL while executing a card message.

No OOTB variables availableYes (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.

  • Any conversation parameters configured within a skill can be used as context variables during skill execution.

Note

Attribute identifiers need to be used after @context.

  • Apart from conversation attributes, the following will be available in context
    • UserSays (used to capture the chat details of a user, which can be used in various instances, for example, to execute a web service)
    • SkillName
  • For web services which are configured at conversation parameter and skill fulfillment level, those variables can be used as context variables during skill execution.
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.randomNumberYesYesYesYesYes

@followup

For example, @followup.TicketIdentifier is used to fetch the ticket identifier during a post action for each follow up.

No OOTB variables availableYes (only while configuring a webservice for a follow up as part of the post action).NoNoNoNo

@pagination

For example, @pagination.size is used to get the total count of items listed on a page.

  • page
  • zeroBasedPage
  • size
  • zeroBasedoffset
  • limit
  • oneBasedoffset
  • from
  • to
  • totalCount
YesYesYesYesYes
@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 availableNoNoNoNoNo

@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 availableNoNoYesYesYes
@tenant

For example, @tenant.slicetoken is used to call out the tenant slice token in a skill.
  • lastsynchtime
  • for ISM
    • slice
    • reconciliationValue
    • name
    • external_slice
    • sliceToken
    • url
NoNoNoNoNo
@user

For example, @user.userName is used to retrieve the logged-in user's name in a skill.
  • UserName
  • Email
  • firstName
  • lastName
  • middleName
  • displayName
  • roles
  • timezone
YesYes Yes Yes Yes

@webservice

For example, @webservice.StatusCode is used to determine the meaning of webservice response status code.

@webservice.StatusCodeYesYesYesYesYes

© 2019 Serviceaide 1-650-206-8988 http://www.serviceaide.com info@serviceaide.com