Skip to main content

Events

Some Application in CRM for complex problems developer needs access every event and send to another application. In this section we can show how send before and after action events handle to another applications.

Define Events

You need define your models in fow-extension.json file.

{
"name": "Awesome Extension",
"extension": {
"configuration": {
"key": "configuration",
"type": "configuration",
"fileName": "Configuration.js"
},
"components": [],
"events": [
{
"key": "test-event", //Unqiue key for event
"scopes": [
//which event send to your defined request
"lead.created",
"contact.updated"
],
"requests": [
{
"url": "https://example.com/",
"method": "POST",
"headers": {
"token": "token-x-y-z"
}
}
]
},
{
"key": "test-event-2",
"scopes": ["account.created"],
"requests": [
{
"url": "https://example.com/{{extensionId}}", //you can add extensionId directly to url
"method": "POST",
"headers": {
"token": "token-x-y-z"
}
}
]
}
]
}
}

Event Types

You can send every type of events to directly your urls.


"*",
"product.created",
"lead.created",
"lead.updated",
"lead.status_changed",
"lead.stage_changed",
"lead.deleted",
"lead.transfered",
"socialMedia.created",
"socialMedia.updated",
"socialMedia.deleted",
"customer.created",
"customer.updated",
"customer.deleted",
"customer.transfered",
"contact.created",
"contact.updated",
"contact.deleted",
"contact.transfered",
"file.created",
"file.deleted",
"opportunity.created",
"opportunity.updated",
"opportunity.deleted",
"opportunity.stage_changed",
"opportunity.status_changed",
"opportunity.transfered",
"quote.created",
"quote.updated",
"quote.deleted",
"paymentPlan.created",
"paymentPlan.updated",
"invoice.created",
"invoice.updated",
"invoice.deleted",
"invoice.stage_changed",
"payment.created",
"payment.updated",
"payment.deleted",
"activity.created",
"activity.updated",
"activity.deleted",
"activity.status_changed",
"activityType.created",
"activityType.updated",
"activityType.deleted"