From Bright Pattern Documentation
< 5.19:Embedded-agent-desktop-api-specification | Methods
Revision as of 18:14, 30 August 2019 by Tracy (talk | contribs) (Created page with "<translate> = postVariable = Enables a variable to be pushed to a scenario as if the Set Variable block is included; the varia...")
<translate>
postVariable
Enables a variable to be pushed to a scenario as if the Set Variable block is included; the variable is then available in scenarios and workflows.
When invoking the postVariable method for a variable that starts with ActivityHistory, Agent Desktop memorizes the value of the variable to post it in campaign results. The data is retained in Agent Desktop until changed or the interaction is completed. If a form is displaying that data, the form is also updated to reflect the new value. If the data changes in form, it changes the value to be submitted.
Request
Syntax
window.bpspat.api.postVariable(name, value)
Parameters
Parameter | Type | Optional/Required | Description | Example |
name | string | required | The name of the desired variable | "$(service.name)" |
value | string | required | The resulting value of the variable | "Customer Service" |
Response
Empty. In response to the request, the variable is sent to scenarios and is posted to campaign results (if the variable starts with "ActivityHistory").
</translate>