Marketplace Platform v2.3 deprecation:We’re continuing to improve the Marketplace Platform to deliver stronger security, better performance, and new capabilities. As part of this evolution, Marketplace Platform v2.3 will be deprecated. To learn the dates and next steps, see Migration guide.
In the Freshsales system, the user can update their availability by selecting available or unavailable.
Important:The user availability status is an internal feature and is not available for all Freshsales accounts.
When the user’s availability status is updated in the Freshsales system, the onUserAgentAvailabilityUpdate event is triggered.
Subscribe to the onUserAgentAvailabilityUpdate event and register the callback by using the following sample manifest.json content.
"events": {
"onUserAgentAvailabilityUpdate": {
"handler": "onUserAgentAvailabilityUpdateCallback"
}
}Define the corresponding callback by using the following sample server.js content:
exports = {
onUserAgentAvailabilityUpdateCallback: function(payload) {
console.log("Logging arguments from onUserAgentAvailabilityUpdate event: " + JSON.stringify(payload));
}
}Attributes of the data object
- actorobject
Information pertaining to the entity who triggered the onUserAgentAvailabilityUpdate event in the Freshsales system.
- descriptionstring
Meaningful description about the actor, specified when the actor information is created in the Freshsales system.
- idinteger
Identifier of the user who triggered the onUserAgentAvailabilityUpdate event. The identifier is auto-generated when the user’s information is configured in the Freshsales system.
- namestring
Full name of the user who triggered the onUserAgentAvailabilityUpdate event.
- typestring
Specifies that an agent triggered the product event. Possible values: agent
- associationsobject
All associated objects of the user agent availability object, that specify additional information pertaining to the availability of user / agent.
- changesobject
Changes that triggered the onUserAgentAvailabilityUpdate event, specified as a JSON object of the following format:
"changes": { //For array attributes "<user_agent_availability.attribute that changed>": { "changed": [ ["Old value"], ["New value"] ] } }Example
"changes": { "channel_preferences": { "changed": [ [ { "available": false, "channel": "chat", "enabled": true }, { "available": true, "channel": "chat", "enabled": true } ], [ { "available": false, "channel": "freshsales", "enabled": true }, { "available": true, "channel": "freshsales", "enabled": true } ] ] } }- changedarray
List of all attributes whose values have changed along with the old and modified values of the attributes.
- user_agent_availabilityobject
Updated information pertaining to the availability of a user/agent across multiple channels in the Freshsales system.
- channel_preferencesarray of objects
Details of the channel and user’s availability across the channel.
- availableboolean
Specifies the availability of the user in the channel.
- channelstring
Name of the channel.
- enabledboolean
Specifies whether the channel is enabled for the user account.
- user_uuidstring
Universally unique identifier of the user.
- user_informationarray of object
Information pertaining to the user in the Freshsales system.
- account_idinteger
Identifier of the Freshsales account to which the user is added to.
- emailstring
Email address of the user.
- namestring
Full name of the user.
- updated_atstring
Timestamp of when the user agent availability object is last updated, specified in the UTC format.
- user_idstring
Identifier of the user/agent whose availability is updated.