Cobalt supports User defined custom events to trigger a workflow. While creating such an event user needs to create a model as well. This model defines what the event expects to be sent as a payload while being fired by the user. The properties of this model can be used as trigger variables in the workflow and can be accessed by using a $, helping the user to pass any linked account specific dynamic value in a worflow instead to hardcoding a static value.

A single user defined event model can be used to trigger multiple worflows across multiple applications and its properties accessed similarly everywhere, irrespective of any application.

Steps to create an event

A user can create an event through the platform or an api as per their requirement. To create an event using an api please visit this documentation. Creating an event requires three very easy steps:

  1. Visit default app > Events
  2. Enter the name of the event that you want to create. For example, “Create a customer”
  3. Create a json model of properties inside Response, that you wish to send to cobalt while firing this event with sample values. For example,
Sample event model
  "customer_name": "Mark Wood",
  "age": 30,
  "associated_emails": ["", ""],
  "is_new": true,
  "address": {
    "house_number": 24,
    "apartment": "Greenville Apartments",
    "street": "Swan lake st.",
    "city": "Bengaluru"

And done!. The event is ready to be fired, and the model properties to be accessed in the workflows.

Note: Make sure to use the exact name of the event when trying to trigger a worflow by firing the custom event.

Cobalt do not check for the event model properties when the event is fired by the user. If a event property is mising in the event payload being fired, Cobalt simply ignores the property and passes a null value subsequently if the property is being used as a variable in any of the associated worflows

To understand how to fire a custom event, please refer this api reference.