From Bright Pattern Documentation
Jump to: navigation, search
 
Line 3: Line 3:
 
Enables a variable to be pushed to a scenario as if the [[scenario-builder-reference-guide/SetVariable|Set Variable]] block is included; the variable is then available in scenarios and [[contact-center-administrator-guide/WorkflowEntries|workflows]].
 
Enables a variable to be pushed to a scenario as if the [[scenario-builder-reference-guide/SetVariable|Set Variable]] block is included; the variable is then available in scenarios and [[contact-center-administrator-guide/WorkflowEntries|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 activity history. If an activity history field was marked for export in campaign results, it will be possible to export it with 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 the form, it changes the value to be submitted.
+
When invoking the postVariable method for a variable that starts with ''ActivityHistory'', Agent Desktop memorizes the value of the variable to post it in activity history (see the ''Form Builder Reference Guide'', section [[5.3:Form-builder-reference-guide/HowtoConfigureActivityHistoryForms#Action_2:_Map_Activity_History_Values_to_Form_Fields |  How to Configure Activity History Forms]] for more information on mapping activity history values). If an activity history field was marked for export in campaign results, it will be possible to export it with 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 the form, it changes the value to be submitted.
  
 
== Request ==
 
== Request ==

Latest revision as of 18:37, 3 September 2019

• 5.19 • 5.3 • 5.8

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 activity history (see the Form Builder Reference Guide, section How to Configure Activity History Forms for more information on mapping activity history values). If an activity history field was marked for export in campaign results, it will be possible to export it with 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 the 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").


< Previous | Next >