Use Variables in Skills

The Luma VA Platform provides various context variables that can be used for representing in skill conversations, configuration settings, and across the Bot Builder application.

Variables can be used in the following scenarios:

  • Execute web services
  • Override web services in Skill fulfillment
  • Inside Information Message for the Bot Replies to the user.

Following is a list of the parameters and the scenarios where they are used.

Types of VariablesDescriptionExamplesOut-of-the-box (OOTB) Variables
Global AttributeGlobal Attributes store data extracted from user input, third party integration operations, responses, and more. Global Attributes are used as placeholders in user message templates, rules, integrations, action workflows, and more. 

@{global.<attributeIdentifier>}

For example, @{global.itsm_ticketDescription} is used to store the ITSM ticket description, which is extracted from the user's input.

  • @{global.itsm_instanceId} 
  • @{global.itsm_ticketDescription} 
  • @{global.itsm_ticketType} 
Local Attribute
Local Attributes are used to store data during skill execution temporarily. The value stored in a local variable is retained for the skill execution. Unlike a Global Attribute that is can be used in multiple skills and events, a Local Attribute is not available outside of the skill or operation that it's defined in.

@{local.<localAttributeName>} 

For example, @{local.ticketId} is used to store the ticket ID.

@{local.ticketId}
Custom User AttributeCustom User Attributes store User Profile Attributes defined by a system administrator. They typically store information like Department, Location, VIP Status, and more that skills can use for rules and branching. Custom User Attributes are used as placeholders in the user message templates, rules and more. 

@{user.<userProfileAttributeName>} 

For example, @{user.firstName} is used to store the user's first name in the current channel.

  • @{user.firstName} 
  • @{user.middleName} 
  • @{user.lastName} 
  • @{user.email} 
  • @{user.userName} 
  • @{user.id} 
  • @{user.phone} 
  • @{user.timezone} 
  • @{user.title} 
  • @{user.contactExternalId}  
  • @{user.roleIds} 
  • @{user.roleNames} 
  • @{user.groupIds} 
  • @{user.groupNames} 
  • @{user.languageLocale} 
  • @{user.languageName} 
  • @{user.languageDisplayName} 
  • @{user.languageCode} 

 

External integration parameters: 

  • @{user.location} 
  • @{user.employee id} 
Channel Attribute

A Channel Attribute is used to store the details of the channel used to interact with the bot.

@{channel.<channelAttribute>}  

For example, @{channel.channelType} is used to store the current channel type, for example, WeChat.

  • @{channel.channelScopeContactId}  
  • @{channel.channelType} 
  • @{channel.channelAuthenticationId} 
  • @{channel.channelAuthenticationStatus} 
  • @{channel.channelAuthenticationMode} 
  • @{channel.channelAccountId}
  • @{channel.channelDisplayName}
  • @{channel.channelScopeId}
  • @{channel.channelUserEmail}
  • @{channel.channelUserFirstName}
  • @{channel.channelUserId}
  • @{channel.channelUserLastName}
  • @{channel.channelUserMiddleName}
  • @{channel.channelUserPhone}
  • @{channel.channelUserName}
  • @{channel.conversationMode}
Bot AttributeBot Attributes store the current bot specific attributes.

@{bot.<botAttribute>} 

For example, @{bot.name} is used to store the current bot name.

  • @{bot.name}  
  • @{bot.externalId}  
  • @{bot.symbol} 
  • @{bot.id} 
  • @{bot.languageLocales} 
  • @{bot.languageNames} 
  • @{bot.languageDisplayNames} 
  • @{bot.languageCodes} 
Application or 
Connected App Instance Configuration Attributes 
Connected App Instance Configuration Attributes store the parameters configured in the Connected App Instance. They are used to add parameter values in the user message templates, rules, Integrations, action workflows and so on. 

@{app.<parameterName>}

For example, @{app.headers.user_auth_token} is used to store the user's authentication token during a webservice integration.

  • @{app.apiBaseUrl} 
  • @{app.headers.csm_app_url} 
  • @{app.headers.user_auth_token} 
Connected App Operation HTTP RequestThis attribute contains the values of HTTP requests sent to other systems.

@{request.<parametername>} 

For example, @{request.timeout} is used for the request timeout in an API call during a bot conversation.

  • @{request.requestUri} 
  • @{request.method} 
  • @{request.requestUrl} 
  • @{request.headers.<headerName>} 
  • @{request.path.<pathParameterName>} 
  • @{request.query.<queryParameterName>} 
  • @{request.soapBinding} 
  • @{request.soapOperation} 
  • @{request.soapEndPoint} 
  •  @{request.timeout} 
  • @{request.body} 
Connected App Operation HTTP ResponseThis attribute contains the values of HTTP responses received from other systems.

@{response.<parametername>} 

For example, @{response.statusCode} is used to display the response status code in an API call during a bot conversation.

  • @{response.statusCode} 
  • @{response.protocolVersion} 
  • @{response.reasonPhrase} 
  • @{response.statusLine}  
  • @{response.headers.<headerName>} 
    • @{response.body}     
                                                      
ConversationA Conversation context attribute is used to store the details of the attribute in use, during skill execution.

@{conv.<parametername>} 

For example, @{conv.currentAttributeName} stores the name of the attribute being used while executing a  skill. 
@{conv.skillName) holds the name of the Skill that is being executed as part of the conversation.

  • @{conv.currentAttributeBlackListedFileFormats}
  • @{conv.currentAttributeDefaultValue}
  • @{conv.currentAttributePattern}
  • @{conv.currentAttributeDataType}
  • @{conv.currentAttributeEnumList}
  • @{conv.currentAttributeIdentifier}
  • @{conv.currentAttributeLength)
  • @{conv.currentAttributeMaximum)
  • @{conv.currentAttributeMaximumFileSize)
  • @{conv.currentAttributeMaximumLength)
  • @{conv.currentAttributeMinimum)
  • @{conv.currentAttributeMinimumLength)
  • @{conv.currentAttributeName)
  • @{conv.currentAttributeValidFileFormats)
  • @{conv.currentAttributeRequired)
  • @{conv.skillName)
  • @{conv.skillIdentifier}
  • @{conv.skillPhrase}
  • @{conv.transcriptJson}
  • @{conv.transcriptText}

Note: for variables like chat transcript to work, we need to enable them from the backend, Need to raise a support request to enable chat transcript for the specific tenant. 

DisambiguationThese attributes contain details of the skill disambiguation resolved by your bot

@{disamb.<attribute>}

For example, @{disamb.skillNames) is used to store name of the competing skills that are within the proximity range

  • @{disamb.skillConfidenceScores}
  • @{disamb.entities)
  • @{disamb.skillDescriptions)
  • @{disamb.skillIdentifiers)
  • @{disamb.skillNames)
FollowupThese attributes contain details of the actionable followups configured and triggered for your tenant.

@{followup.<parametername>}

For example, @{followup.attemptNumbers} stores the  number of attempts configured for the followup being triggered.

  • @{followup.attemptNumbers}
  • @{followup.configurationConnectionType)
  • @{followup.configurationId)
  • @{followup.configurationName)
  • @{followup.data)
  • @{followup.extractedDataType)
  • @{followup.recordIdentifiers)
  • @{followup.attemptNumber}
FormatThese attributes are used to format bot messages displayed on the chat channels.

@{format.<parametername>}

For example ,@{format.lineBreak) represents new line character and is used to add a line break.

  • @{format.beginBold}
  • @{format.beginItalic)
  • @{format.endBold)
  • @{format.endItalic)
  • @{format.lineBreak)
Re Transfer Group'Re Transfer Group' attribute is used to store the details of the Support Group to which the user request is assigned.

@{retransferGroup.<parametername>}

@{retransferGroup.newGroupName} represents the support group name whenever the user requests to talk to a Support Agent.

  • @{retransferGroup.newGroupName}
Skill CommandSkill command stores information on the skills used by the user to exit conversation with the Virtual Agent or SupportAgent OR  transfer the conversation to Support Agents.

@{skillcommand.<parametername>}

For example , @{skillcommand.abort} is used to exit conversation and it is tenant-specific and set to '//abort' by default.

  • @{skillcommand.abort}
  • @{skillcommand.agentTransfer}
Support AgentSupport Agent attributes are used to store details related to the Support Agent logged in to the Agent Chat Console to assist users with their request.

@{supportagent.<attribute>}

For example , @ {supportagent.firstName} is used to store first name of the Support Agent .
@{supportagent.groupNames} stores the Support groups, the Support Agent is part of.

  • @{supportagent.contactExternalId}
  • @{supportagent.email}
  • @{supportagent.firstName}
  • @{supportagent.groupIds}
  • @{supportagent.groupNames}
  • @{supportagent.id}
  • @{supportagent.languageCode}
  • @{supportagent.languageDisplayName}
  • @{supportagent.languageLocale}
  • @{supportagent.languageName}
  • @{supportagent.lastName}
  • @{supportagent.middleName}
  • @{supportagent.phone}
  • @{supportagent.roleIds}
  • @{supportagent.roleNames}
  • @{supportagent.timezone}
  • @{supportagent.title}
  • @{supportagent.userName}
Support Agent ChatSupport Agent Chat stores the details of the conversation between the end-user and Support agent

@{supportagentchat.<attribute>}

@{supportagentchat.transcriptJson} stores the transcript of the conversation between the EndUser and the Support Agent in JSON format

  • @{supportagentchat.transcriptJson}
  • @{supportagentchat.transcriptText}
Support Agent ActionSupport Agent Action attributes stores the details of the actions taken by the Support agent on behalf of the end-user.

@{supportagentaction.<attribute>

For example, @{supportagentaction.formField.<fieldname>} is used to refer to the value provided in the support agent action form field.

  • @{supportagentaction.formField.<fieldname>}
Support GroupSupport Group attributes are used to store details related to the selected Support Group

@{supportgroup.<attribute>}

For  example @{supportgroup.memberCount) represents the total number of support agents in the selected Support group.

  • @{supportgroup.groupExternalId}
  • @{supportgroup.memberCount}
  • @{supportgroup.name}
  • @{supportgroup.usedFor}
  • @{supportgroup.id}
SystemSystem attributes are used to store Luma API details such as Base URL, URI path, gateway etc.

@{system.<attribute>}

For example @{system.application.base.url} is used to refer to the base URL of logged in environment.

  • @{system.botapigateway.context}
  • @{system.application.base.url}
  • @{system.api.v1.uri.path}
System CommandsSystem commands are used to trigger a system action

@{systemcommand.skip}

Skip command is used to determine if the end-user has requested to skip the prompt during skill execution.

  • @{systemcommand.skip}
TenantTenant Attributes are used to store information related to the tenant to which the user is connected.

@{tenant.<attribute>}

For example , @ {tenant.name} is used to store Tenant name.

  • @{tenant.externalId}
  • @{tenant.name}
  • @{tenant.symbol}
  • @{tenant.tenantId}
GroupGroup attributes are used to store details related to the group available in Luma.

@{group.<attribute>}

 For example, @{group.name} is used to store the group name.

  • @{group.groupExternalId}
  • @{group.id}
  • @{group.name}
RequestRequest Attributes are used to refer to the information sent as a request to the web service integration

@{request.<attribute>}

 For example, @{request.body} is used to store the outbound request payload

  • @{request.body}
  • @{request.headers.<HeaderName>}
  • @{request.method}
  • @{request.path.<pathparameter>}
  • @{request.query.<queryparamter>}
  • @{request.timeout}
  • @{request.requestUri}
  • @{request.requestUrl}
ResponseRequest Attributes are used to refer to the information received from the web service as response.

@{response.<attribute>}

For example, @{response.body} is used to refer to the inbound response (in JSON, text or XML format) received from the web service.

  • @{response.body}
  • @{response.reasonPhrase}
  • @{response.headers.<HeaderName>}
  • @{response.status}
  • @{response.statusCode}
  • @{response.statusLine}
CatalogCatalog Context variables are used to refer to the catalogs in search results of Luma VA's initial search or the custom search using 'Search Catalog' conversation Item

@{catalog.<AttributeIdentifier>}

For example, @{catalog.totalCatalogCount} is used to refer to the number of catalogs found in the search.

  • Catalog Browsing Url(catalogBrowsingUrl)
  • Catalog Found(catalogFound)
  • Catalog URLs(catalogURLs)
  • Catalogs Json(catalogsJson)
  • Categories(categories)
  • Category Ids(categoryIds)
  • Confidence Levels(confidenceLevels)
  • Descriptions(descriptions)
  • Image Urls(imageUrls)
  • Names(names)
  • Pagination(pagination)
  • Search Feedback Identifier(searchFeedbackIdentifier)
  • Title(title)
  • Top Confidence Level(topConfidenceLevel)
  • Top Confidence Level Id(topConfidenceLevelId)
  • Total Catalog Count(totalCatalogCount)
Knowledge ArticleKnowledge Context variables that are used to refer to the Knowledge Articles found as search results of Luma VA's initial search or the custom search using 'Search Knowledge' conversation Item

@{knowledgeArticle.<AttributeIdentifier>}

For example, @{knowledgeArticle.topConfidenceLevel} is used to refer to the Confidence Band of the Knowledge articles found as part of the search.

  • Articles Found(articlesFound)
  • Articles Json(articlesJson)
  • ArticleURLs(articleURLs)
  • Confidence Levels(confidenceLevels)
  • Default Image Url(defaultImageUrl)
  • Descriptions(descriptions)
  • Pagination(pagination)
  • Search Feedback Identifier(searchFeedbackIdentifier)
  • Summaries(summaries)
  • Title(title)
  • Top Confidence Level(topConfidenceLevel)
  • Top Confidence Level Id(topConfidenceLevelId)
  • Topic Browsing Url(topicBrowsingUrl)
  • TopicIds(topicIds)
  • Topics(topics)
  • Total Article Count(totalArticleCount)
Matched SkillSkill Context variables are used to refer to the matching skills found in Luma VA's initial skill search.

@{matchedSkill.<AttributeIdentifier>}

For example, @{matchedSkill.topSkillIdentifier} that holds the skill identifier of the best matching skill found as part of the search.

  • Commands(commands)
  • Descriptions(descriptions)
  • Entities(entities)
  • Identifiers(identifiers)
  • ImageUrls(imageUrls)
  • Names(names)
  • Skills Found(skillsFound)
  • Top Confidence Level(topConfidenceLevel)
  • Top Confidence Level Id(topConfidenceLevelId)
  • Top Skill Identifier(topSkillIdentifier)
  • Total Skill Count(totalSkillCount)
AI NLQAI NLQ context variables are filled when the AI NLQ step is executed in the conversation. 

@{ainlq.need}


For Example, @{ainlq.need} holds the user's need identified from the phrase used to identify ticket filter query.

  • Command(command)
  • Command Embedded In Query(commandEmbeddedInQuery)
  • Implicit Reference Used(implicitReferenceUsed)
  • Need(need)
  • Next Path Taken(nextPathTaken)
  • Query(query)
  • Response JSON(responseJson)
  • Type(type)
AI TaskAI Task context variables are filled when the an Generative AI Task is executed in the conversation. 

@{aitask.response}

For example, @{aitask.response} holds the response received by executing the Generative AI task.

  • Error code(errorcode)
  • Reason Phrase(reasonPhrase)
  • Response(response)
  • Status(status)
User IntentUser Intent context variables are filled when user's phrase is categorized using the User Intent Categorization step in the conversation.

@{userintent.domain}

For example,@{userintent.domain} holds the business domain identified from the user's phrase.

  • Acknowledgement(acknowledgement)
  • Ambiguous(ambiguous)
  • Category(category)
  • Domain(domain)
  • Domain Category(domainCategory)
  • Followup Question(followupQuestion)
  • Keywords(keywords)
  • Need(need)
  • Next Path Taken(nextPathTaken)
  • Proposal Type(proposalType)
  • Proposed Solution(proposedSolution)
  • Response JSON(responseJson)
  • Sentence Type(sentenceType)
  • Type(type)

Smart Lookups

Luma provides a smart lookup feature enabling the System Administrator/ Developer to access the context variables. quickly.

This helps to avoid typing manually, remembering the format, and referring to the API documentation. It allows you to directly lookup for the attributes available for your skill. Attributes are grouped together into various categories to help you to quickly identify the required attribute.

Type @ to invoke the smart lookups pop-up to see the list of categories of context variables.   

Results are displayed in alphabetical order A-Z. You may search or scroll through the result set and select the required Context Variable. The selected item will be populated into the respective field.



Info

Smart Lookups feature is available on System skills, Small talk, Skill builder, Integrations, Bot Configurations, and Tenant Settings.

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