API Command: set_session_attributes

The set_session_attributes command sets the external key and other custom attributes for an active support session.

In order to issue the set_session_attributes command, you will need to supply the username and password for a Bomgar user account. That account must have the permission Allowed to Use Command API along with the permission Is Administrator.

Required Parameter for set_session_attributes

lsid=[string] The ID of the session whose attributes you wish to set. The session must currently be active.

Optional Parameters for set_session_attributes

session.custom.external_key=[string] An arbitrary string that can link this session to an identifier on an external system, such as a help desk ticket ID. This has a maximum length of 1024 characters.
session.custom.[custom field]=[string]

The code name and value of any custom fields. These fields must first be configured in /login > Management > API Configuration.

Each attribute must be specified as a different parameter. Each custom field has a maximum length of 1024 characters. The maximum total size of all combined custom fields, including the external key, must be limited to 10KB.

Note: The parameter custom.external_key has been deprecated as of 14.2 and has been replaced with session.custom.external_key. However, it is still available for backward compatibility.

Note: If an attribute is not listed in the URL, it will keep its existing value. To clear an attribute, you must set the attribute to an empty string.

XML Response for set_session_attributes Query

<success> Returns a message of Session attributes were set if the attributes were set successfully.
<error> Returns an error message if the attributes were not set successfully.

Query Examples: set_session_attributes

Set external key for session c69a8e10bea9428f816cfababe9815fe


Set a custom value for session c69a8e10bea9428f816cfababe9815fe