- See:
Example
liveApi.controller.contextAttributes.set("appLocation", "Basic Guidance");
liveApi.controller.contextAttributes.set("fullName", "Macy Williams");
liveApi.controller.contextAttributes.set("email", "macy.williams@example.com");
liveApi.controller.contextAttributes.set("phone", "+16505550121");
liveApi.controller.contextAttributes.set("location",
"San Francisco CA, United States");
Methods
get(key) → {string}
Get the context attribute value for the given key.
Parameters:
Name | Type | Description |
---|---|---|
key |
string | the context key. |
Returns:
the context value.
- Type
- string
remove(key)
Remove an attribute from the context.
Parameters:
Name | Type | Description |
---|---|---|
key |
string | the context key to remove |
removeAll()
Remove all of the context attributes.
set(key, value)
Set the context attribute key to a value.
Parameters:
Name | Type | Description |
---|---|---|
key |
string | the context key. |
value |
string | the context value. |