The following objects, as well as a number of additional properties and actions, are available in all locations in the Chat product.

Objects

CurrentAccount object

Represents the account.

currentAccount

Retrieves the current account object, with all its properties.

get
client.get('currentAccount');
returns
{  "currentAccount": {    // Account object properties  }}

Properties

currentAccount.key

Gets the account key of the current account.

get
client.get('currentAccount.key');
returns
{  "currentAccount.key": string}

currentAccount.zendesk

Gets the subdomain of the Zendesk Support account that is linked to the current account.

get
client.get('currentAccount.zendesk');
returns
{  "currentAccount.zendesk": string}

CurrentUser object

Represents the current agent logged into the dashboard.

currentUser

Retrieves the current logged in agent object, with all its properties.

get
client.get('currentUser');
returns
{  "currentUser": {    // User object properties  }}

Properties

currentUser.id

Gets the id of the current agent logged into the dashboard.

get
client.get('currentUser.id');
returns
{  "currentUser.id": string}

currentUser.name

Gets the display name of the current agent logged into the dashboard.

get
client.get('currentUser.name');
returns
{  "currentUser.name": string}

currentUser.first_name

Gets the first name of the current agent logged into the dashboard.

get
client.get('currentUser.first_name');
returns
{  "currentUser.first_name": string}

currentUser.last_name

Gets the last name of the current agent logged into the dashboard.

get
client.get('currentUser.last_name');
returns
{  "currentUser.last_name": string}

currentUser.email

Gets the email of the current agent logged into the dashboard.

get
client.get('currentUser.email');
returns
{  "currentUser.email": string}

currentUser.role

Gets the role of the current agent logged into the dashboard. The possible values returned are agent, admin or owner. If the user has a custom role (Zendesk Suite Enterprise plan or above), then it returns the name of the custom role.

get
client.get('currentUser.role');
returns
{  "currentUser.role": string}

currentUser.admin

Gets a boolean indicating whether the current agent is an administrator of the account.

get
client.get('currentUser.admin');
returns
{  "currentUser.admin":  boolean}

currentUser.zendeskId

Gets the Zendesk Support user ID of the current agent logged into the dashboard.

get
client.get('currentUser.zendeskId');
returns
{  "currentUser.zendeskId": integer}

currentUser.locale

Gets the Zendesk Chat preferred language of the current user.

get
client.get('currentUser.locale');
returns
{  "currentUser.locale": string}