Events Overview
What are events?
Events are generated by some Tulip resources when certain actions are executed, such as the creation and update of a customer. When an event occurs in Tulip, we create a new event object (see below). The event object contains important information about the event that occurred:
Example event object
{
"uuid" : "03a4eabd-2551-41d9-9828-e105b1eb5cf5",
"subscription": "1fec24e8-f02c-4ff6-a1a5-37bbdac42b1b",
"createdAt":"2022-06-15T13:45:30",
"eventType": "customerCreate",
"resourceType":"Customer",
"resource": {
"uuid": "05c443ae-3edf-42e1-b4f9-f5a819252c0e",
"externalId":"some-external-id"
},
"source": "TULIP-APP",
}
Field | Description |
---|---|
uuid | unique Tulip identifier of the event that occurred |
subscription | unique Tulip identifier of the subscription associated with this event |
createdAt | date and time the event occurred in Z-normalized RFC3339 format |
eventType | type of event. See Supported Events section below for possible values |
resourceType | the Tulip entity type associated with this event |
resource | an object containing unique identifiers of the resource that was created or updated in Tulip. |
source | the source which generated this event. Possible values: TULIP_APP , TULIP_API . |
Fetching Data From Tulip
Once an event is received by the subscriber, the latest data should be fetched via API from the Tulip environment. The table below describes when an event is fired, and what API to use to fetch the latest data. You can use either the resource.uuid
or the resource.externalId
as the identifier when performing the lookup via API.
Supported Events
Event Type | Description | API to Fetch Affected Resource |
---|---|---|
customerCreate | A customer is created via API or Tulip Application | /api/{version}/crm/customers/{id} |
customerUpdate | A customer is updated via API or Tulip Application | /api/{version}/crm/customers/{id} |
customerNoteCreate | A customer note is created via API or Tulip Application | /api/{version}/crm/customerNotes/{id} |
customerNoteUpdate | A customer note is updated via API or Tulip Application | /api/{version}/crm/customerNotes/{id} |
customerNoteDelete | A customer note is deleted via API or Tulip Application | /api/{version}/crm/customerNotes/{id} |
orderCreate | An order is created in the Tulip Application | /api/{version}/oms/orders/{id} |
orderLineItemInsteanceUpdate | An order line item is updated in the Tulip Application | /api/{version}/oms/orders/{id} |
taskCreate | A task is created in the Tulip Application | /api/{version}/crm/followupTasks/{id} |
taskDelete | A task is deleted in the Tulip Application | /api/{version}/crm/followupTasks/{id} |
taskUpdate | A task is updated in the Tulip Application | /api/{version}/crm/followupTasks/{id} |