Skip to main content

Reference

Scopes

ScopeDescription
SESSIONThe data will no longer be accessible after the session
DOMAINThe data will be persisted on the user's machine and can be used again for future sessions in this and other assistants on the same domain
PROVIDEDThe data will be provided by the customer
CONFIGURATIONSame as session, but had different identifier to clearly mark that this does not serve any personalization. This will not be sent to the backend.

Provided scope

Attributes that are provided are made accessible by the customer. A customer makes these accessible by storing them in the local storage using a key with the following pattern: zoovu.[advisorCode].[locale?].context.xyz.

If we want to make the firstName of a customer accessible to an assistant with advisor code docs123, the key would be zoovu.docs123.context.firstName.

The key structure also allows for locale specific values.

Assignments

Text

AssignmentDescription
Set valueSets the value of the attribute to the provided value
Clear valueClears the value of the attribute
Set selected value toWill update the attribute with the label text of the selected option
Set left value fromTODO: lookup current value and take the 'shift' next value'
Set right value fromTODO: lookup current value and take the 'shift' next value'

Number

AssignmentDescription
Set numeric valueSets the value of the attribute to the provided value
Clear valueClears the value of the attribute
Set left value fromTODO: lookup current value and take the 'shift' next value'
Set right value fromTODO: lookup current value and take the 'shift' next value'
Increment by value
Decrement by value
Multiply by value
Divide by value

True/False

AssignmentDescription
Set valueSets the value of the attribute to the provided value
Clear valueClears the value of the attribute
Set selected value toWill update the attribute with the label text of the selected option

List

AssignmentDescription
Set valueSets the value of the attribute to the provided value
Clear valueClears the value of the attribute
Set selected value toWill update the attribute with the label text of the selected option

Actions

Advisor level

ActionDescription
Assign valueAssign a value to a context attribute, similar to regular context assignments, but when using an action, the assignment can be controlled with a condition
Run codeExecutes the provided JavaScript code, use at your own risk!
Disable results pageDisables navigation to the result page
Enable results pageEnables navigation to the result page

Question level

ActionDescription
SkipDo not show the question and proceed the flow
Go to resultsSkip all remaining questions and go to the results page
Assign valueAssign a value to a context attribute, similar to regular context assignments, but when using an action, the assignment can be controlled with a condition
Run codeExecutes the provided JavaScript code, use at your own risk!
Disable results pageDisables navigation to the result page
Enable results pageEnables navigation to the result page

Answer level

ActionDescription
Disable answerDisables answer when question loads
Select answerSelects answer when question loads
Select answer and continueSelects answer when question loads and proceeds automatically
Put answer firstMoves answer to the first position when question loads
Put answer lastMoves answer to the last position when question loads
Assign valueAssign a value to a context attribute, similar to regular context assignments, but when using an action, the assignment can be controlled with a condition
Run codeExecutes the provided JavaScript code, use at your own risk!
Disable results pageDisables navigation to the result page
Enable results pageEnables navigation to the result page
Advanced actionsDescription
Go to first questionQuestion flow will return to the first question while keeping selected answers.

Only use the advanced context actions when you have experience with our platform. These actions can lead to unexpected results when you don't know what you are doing.

Run code example

The Run code action can read and write to the context store. Below example shows how to read the value of the size attribute and how to set a nofit attribute to true.

var size = contextSdk.get("size").value;
contextSdk.set([{ key: "nofit", value: true }]);

Conditions

Text

ConditionDescription
equalsthe context attribute must equal the provided value
not equalsthe context attribute must not equal the provided value
existsthe context attribute has a value
not existsthe context attribute does not have a value

Number

ConditionDescription
equalsthe context attribute must equal the provided value
not equalsthe context attribute must not equal the provided value
existsthe context attribute has a value
not existsthe context attribute does not have a value

True/False

ConditionDescription
equalsthe context attribute must equal the provided value
not equalsthe context attribute must not equal the provided value
existsthe context attribute has a value
not existsthe context attribute does not have a value

List

ConditionDescription
equalsthe context attribute must equal the provided value
not equalsthe context attribute must not equal the provided value
existsthe context attribute has a value
not existsthe context attribute does not have a value