PUTVALUE

Stores and retrieves data in an NICE inContact database table in order to make it accessible to other scripts and contacts and behaves like a list.

Supported Script Types

Generic Email Chat Phone Voicemail Work Item

Properties

Scope

This property is a drop-down list to select one of the following:

What you select here determines the level that this value will be visible to other contacts. Only contacts that share the same Scope can access the same data.

The option selected for the PUTVALUE Scope must match the Scope for the GETVALUE action. Even when the names of the lists are the same, they will not be recognized if the Scope options do not match.

Name

This property is the name or key used to identify the value. This can be any name or number. When the value is retrieved using GETVALUE, the same name must be supplied. Names are not case sensitive.

If the Name of the lists do not match, they will not recognize each other, even if the Scope option is the same.

Value
This property displays the data value to be stored.
Method
When multiple values with the same name are stored, they are put in a list. Select one of the following methods:
  • ReplaceAll - this is the default value and will be automatically selected.
  • Append - places the new value at the end of the list. When appending values, if the number exceeds 1000 append in less than 24 hours, it will no longer append until some of the appends clear (after 24hrs).
  • Insert - places the value at the beginning of the list. Subsequent calls to GETVALUE will retrieve data from the beginning of the list.
Persistent

This property is a drop-down list to select either True or False.

When False (the default) is selected, values stored by a given contact will be removed when the contact is released.

TTL (hrs)
Time to Live. Once this duration expires the set value or condition is cleared. The default is 24 hours, the minimum is 1 hour, and the maximum is 168 hours (7 days). Setting values above or below the allowable limits causes the action to use the nearest allowable value.

Branches

Default
The Default branch condition will always be used.

Tips and Tricks

  • PUTVALUE utilizes a unique data type that must be accessed using the appropriate Studio actions: PUTVALUE, GETVALUE, REMVALUE, GETLIST, and CLEARLIST.
  • When the Persistent property is set to “False”, all public values that were added by a specific contact are automatically removed when the contact is released. This feature is commonly used when a parent script needs to keep track of spawned child scripts. Each child script will PUTVALUE with the Name property such as "{MasterID}List" and a value of {ContactID}. Because the "{MasterID}List" is public, the parent script can periodically execute GETLIST to discover how many child scripts are currently running. By virtue of the Persistent=false property, the child script's public value will automatically be removed when released. No extra work is required to maintain an accurate count of child scripts.
  • If several variables need to be accessed by other scripts/contacts, a database is generally the best solution.
  • Non-persistent public variables can be shared by other scripts/contacts throughout the life of the script which sets those variables. The variables are automatically cleaned up once they are released.
  • Persistent variables must be manually removed by executing GETVALUE (with the Remove property set to “true”), REMVALUE, or CLEARLIST. It is not recommended to use PUTVALUE for large amounts of data or data you will need for long periods of time. If you need to save data, it is recommended that you use and DB Connector and connect to a database that you control.