onDealCreate
When a deal is created, the onDealCreate event is invoked and the registered callback method is executed.
Subscribe to the onDealCreate event and register the callback by using the following sample manifest.json content.
"events": {
"onDealCreate": {
"handler": "onDealCreateCallback"
}
}
Define the corresponding callback by using the following sample server.js content:
exports = {
onDealCreateCallback: function(payload) {
console.log("Logging arguments from onDealCreate event: " + JSON.stringify(payload));
}
}
Attributes of the data object
- actorobject
Information pertaining to the entity who triggered the onDealCreate event.
- associationsobject
All associated objects of the deal object, which specify additional information pertaining to the deal created.
- dealobject
Details of the deal object created when the onDealCreate event is triggered.
onDealUpdate
When a deal is updated, the onDealUpdate event is invoked and the registered callback method is executed.
Subscribe to the onDealUpdate event and register the callback by using the following sample manifest.json content.
"events": {
"onDealUpdate": {
"handler": "onDealUpdateCallback"
}
}
Define the corresponding callback by using the following sample server.js content:
exports = {
onDealUpdateCallback: function(payload) {
console.log("Logging arguments from onDealUpdate event: " + JSON.stringify(payload));
}
}
Attributes of the data object
- actorobject
Information pertaining to the entity who triggered the onDealUpdate event.
- associationsobject
All associated objects of the deal object, which specify additional information pertaining to the deal updated.