The app is displayed in theapps trayon the right side of the user profile page in the agent interface.

Example manifest

             
"location":{"support":{"user_sidebar":"assets/iframe.html"}},

SeeSetting the app location.

In addition to the objects available inall locations, including theUser object, the following objects are available in this location:

Events

In addition to thecore events, you can use the following events to listen for changes to the user's data:

  • user.alias.changed
  • user.avatarUrl.changed
  • user.details.changed
  • user.email.changed
  • user.externalId.changed
  • user.groups.changed
  • user.name.changed
  • user.notes.changed
  • user.role.changed
  • user.signature.changed
  • user.tags.changed
  • user.timeZone.changed
  • user.[custom_field_key].changed
  • user.organizations.changed

Theuser.name.changed事件触发,当用户的名字在the user's page changes.

For custom fields, replace[custom_field_key]with the custom field'skeyattribute. Use theUser FieldsREST API to get a list of possiblekeyvalues.

Note: Currently, if another user changes a property in a separate window, the event will not be picked up.

To add event listeners to your app, seeWorking with framework events.

User Profile Page Field object

userFields

Returns either the named user field as an User Profile Page Field object, or all available user fields if you don't specify a name.

Here are the names of the user fields available:

  • access
  • alias
  • details
  • groups
  • locales
  • notes
  • organization
  • organizations
  • role
  • signature
  • tags
  • timezone
  • user_type
  • {user_field_key}

For field definitions, seeDefault user fieldsin Zendesk help.

For custom fields, replace{user_field_key}with the custom field'skeyattribute. Use theUser FieldsREST API to get a list of possiblekeyvalues.

get
             
client.get(“userFields”)
returns
             
{"userFields":[{// User Profile Page Field object properties}]}

or

get
             
client.get('userFields:fieldName')// e.g. client.get('userFields:my_text_field')
returns
             
{"userFields:fieldName":{// User Profile Page Field object properties}}

You can also access individual fields by their zero-indexed order.

get
             
client.get('userFields.0')
returns
             
{"userFields.0":{// User Profile Field object properties}}

Properties

Actions

userField.name

get
             
client.get('userFields:fieldName.name')
returns
             
{"userFields:fieldName.name":string}

userField.isVisible

get
             
client.get('userFields:fieldName.isVisible')
returns
             
{"userFields:fieldName.isVisible":boolean}

userField.options

get
             
client.get('userFields:fieldName.options')
returns
             
{"userFields:fieldName.options":[{// User Profile Page Field Option properties}]}

SeeUser Profile Page Field Option objectfor the properties.

userField.hide

invoke
             
client.invoke('userFields:fieldName.hide')

userField.show

invoke
             
client.invoke('userFields:fieldName.show')

userField.toggle

invoke
             
client.invoke('userFields:fieldName.toggle')

User Profile Page Field Option object

fieldName.options

Returns all the options of a dropdown field in the profile page. Only applicable to dropdown fields.

SeeUser Profile Page Field object.

get
             
client.get('userFields:fieldName.options')// e.g. client.get('userFields:role.options')
returns
             
{"userFields:fieldName.options":[{// User Profile Page Field Option properties}]}

You can access individual options by their zero-indexed order.

get
             
client.get('userFields:fieldName.options.0')// e.g. client.get('userFields:role.options.0')
returns
             
{"userFields:fieldName.options.0":{// User Profile Page Field Option properties}}

Properties

userFieldOption.label

get
             
client.get('userFields:fieldName.options.0.label')
returns
             
{"userFields:fieldName.options.0.label":string}

userFieldOption.value

get
             
client.get('userFields:fieldName.options.0.value')
returns
             
{"userFields:fieldName.options.0.value":string}