Reserved form data
Some form data keys are reserved by Mavenoid. These are often populated automatically by Mavenoid and can be recognized by their leading $
characters.
Global
These keys are available throughout the flow once they have been populated.
$created-on-page-url
When a conversation starts, this key is automatically populated with the URL of the page on which the assistant is embedded.
For example, if the user visits your page https://example.com/support/
where you have an embedded Mavenoid assistant and starts a conversation there, the value associated with $created-on-page-url
will be set to https://example.com/support/
. If they instead visit your page https://example.com/warranty/
and start a conversation there, the value will instead be set to https://example.com/warranty/
.
This allows you to use the same flows in your assistant on multiple pages but direct users differently or prefill different information, based on the page the user is currently visiting or any parameters in the URL.
This data is a string containing the full URL, such as "https://example.com/support/"
.
$customer-email
This key is not populated automatically, but is used by any and all customer email form fields. Any email address that is entered into such a field will thereafter be accessible using this key.
This allows you to store the user's email for follow-up contact, sending transcript emails, and so on.
This data is a string containing the email address, such as "[email protected]"
.
$flow
When a conversation starts, this key is automatically populated with the name and ID of the flow. The name is as specified in the flow's settings. The ID is a unique numeric identifier.
This data is a map with the following format: {"name": string, "id": string}
. You can therefore access each specific string by using $flow["name"]
or $flow["id"]
.
$language-iso
When a conversation starts, this key is automatically populated with the ISO code for the language in which the user is viewing the assistant. If the user changes the assistant to a different language, this key is updated as well, though the current node will not refresh.
This allows you to direct the user to content or live support agent groups based on the languages they are familiar with.
This data is a string containing the language code, such as "en"
.
$latest-assigned-agent
When a live chat ends, this key is automatically populated with the email address, first name, and last name of the last support agent to join the chat. If the chat is transferred, the new agent's data will replace the previous data.
This allows you to log which agent handled the interaction and may thus be best positioned for follow-up.
This data is a map with the following format: {"email": string, "firstName": string, "lastName": string}
. You can therefore access each specific string by using $latest-assigned-agent["email"]
, $latest-assigned-agent["firstName"]
, or $latest-assigned-agent["lastName"]
.
$session
When a conversation starts, this key is automatically populated with the ID and URL of the conversation. The ID is a unique alphanumeric identifier. The URL points to a read-only view of the conversation and is only accessible by people with the required roles within Mavenoid.
This allows you to store links to the Mavenoid conversation within other systems.
This data is a map with the following format: {"id": string, "url": string}
. You can therefore access each specific string by using $session["id"]
or $session["url"]
.
$user
When a conversation starts, this key is automatically populated with the name and email of the user if the user is logged in to Mavenoid.
This allows you to prefill user information in the case that your users log in to Mavenoid to access the product assistant. If your users do not log in to Mavenoid to access the product assistant, this will not be useful to you.
This data is a map with the following format: {"first_name": string, "last_name": string, "email": string}
. You can therefore access each specific string by using $user["first_name"]
, $user["last_name"]
, or $user["email"]
.
Limited
These keys are only available in specific contexts. When they are available, they act like form data, but they must be stored to an actual form data key to be made available in other contexts.
$error
Actions attempt to perform an action in a remote system. If this attempt fails and the remote system returns an error message, that message will be available to the action's form data assignments under the identifier $error
.
This is mostly useful for debugging Actions nodes during flow development.
This data is a string containing the error message.
$objectId
In a Create Salesforce Case action, the ID of the created case will be available to the action's form data assignments under this identifier.
This allows you to store the case ID, which is particularly useful if you will later update the Salesforce case.
This data is a string containing the ID.
For the Zendesk equivalent, see $ticketId
.
$secrets
In a Call External API action, the headers to send can access your organization's secrets under this identifier.
This allows you to store authentication or API tokens and securely use them in your flows without exposing them.
This data is a map of secrets keyed by name. For example, to access an OAuth 2.0 Bearer Token stored as a secret named "bearer", use $secrets["bearer"]
.
$status
, $headers
, and $body
In a Call External API action, the response to the API call is available to the action's form data assignments under these identifiers.
This allows you to process the outcome of the API call and proceed accordingly.
$status
The numeric HTTP status of the response, such as 200
or 404
, stored as a string.
$headers
The headers included in the HTTP response, stored as a map of header names to values. For example, $headers["Content-Type"]
might have value of "text/html; charset=UTF-8"
.
$body
The body of the HTTP response. If the response type of the action is set to "JSON", this will be a JSON object. If it is instead set to "String", this will be a raw string.
$ticketId
In a Create Zendesk Ticket action, the ID of the created ticket will be available to the action's form data assignments under this identifier.
This allows you to store the ticket ID, which is particularly useful if you will later update the Zendesk ticket.
This data is a string containing the ID.
For the Salesforce equivalent, see $objectId
.
$transcript
Within an action, the transcript of the user's interaction with the product assistant thus far. This allows you to send a record of the interaction to the customer or to store it in a connected help desk.
This data is a map with the following format: {"body": string, "subject": string, "duration": string, "productName": string, "causes": string, "liveSupportURL": string, "ftsText": string, "feedback": string, "history": string, "agentNotes": string, "formData": string}
. You can therefore access each specific string by using $transcript["body"]
, $transcript["subject"]
, and so on.
$transcript["agentNotes"]
Any notes added by a support agent during live chat.
In general, this should only be used for internal records.
$transcript["body"]
The full transcript with all sections.
In general, this should only be used for internal records; some of the information is not ideal for sharing with your customers.
$transcript["causes"]
A list of solutions ruled out or accepted by the user during any self-service troubleshooting.
$transcript["duration"]
How long the conversation has lasted so far.
$transcript["feedback"]
Any feedback provided by the user on a Feedback node, including the rating and any comments.
$transcript["formData"]
Any form data associated with the conversation.
$transcript["ftsText"]
If the user passed through a Search node, the text they searched for.
$transcript["history"]
The back-and-forth messages between the user and the assistant as well as between the user and the support agent in any live chat.
$transcript["liveSupportURL"]
The URL at which team members with at least the live support agent role can review the conversation transcript.
In general, this should only be used for internal records.
$transcript["productName"]
The name of the flow in which the conversation took place. (This is equivalent to $flow["name"]
.)
$transcript["subject"]
If the user passed through a Search node, the label of whatever button they selected from that node (including a search match, the skip button, or the none-of-the-above button). Otherwise, the text "Issue reported via Mavenoid (session SESSION_ID)" with the specific session ID in place of "SESSION_ID".