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.
When a message is posted, either by the agent or user, the onMessageCreate event is invoked and the registered callback method is executed.
Subscribe to the onMessageCreate event and register the callback by using the following sample manifest.json content.
"events": {
"onMessageCreate": {
"handler": "onMessageCreateCallback"
}
}Define the corresponding callback by using the following sample server.js content:
exports = {
onMessageCreateCallback: function(payload) {
console.log("Logging arguments from onMessageCreate event: " + JSON.stringify(payload));
}
}Attributes of the data object
- actorobject
Details of the entity that posted the message.
- associationsobject
Associated objects related to the message object.
- messageobject
Details of the message that triggered the onMessageCreate event.