Events
To read about the available stream integrations, click here.
An event is a singular data point which represents a critical information regarding the state of the application. An event would have a name as well as a payload with associated attributes in it.
You can send events in any format and it can be re-designed too.
A typical event looks like this:
name -> This is the event type. Its a string.
timestamp -> This is the time of the occurrence of that event. If not passed, Doctor Droid assumes it to be the current time. This should epoch time in milliseconds.
payload -> This is a json object with keys and their values that detail out the event. One of these keys have to be the group key that is repeated across all events of the same entity.
Events Modelling
Below are sample events to give you an illustration.
E-commerce order event
For example, the following event represents 3 events in an order journey on a food delivery platform; from being created to being delivered.
{
"name": "OrderCreated",
"timestamp": 1677751161120,
"payload": {
"order_id": "ekpsHJ9GhQd7OU",
"city": "Bengaluru",
"store_code": "PZHT0056",
"order_value": 435,
"promised_eta": 23
}
}
{
"name": "OrderShipped",
"timestamp": 1677751561100,
"payload": {
"order_id": "ekpsHJ9GhQd7OU",
"delivery_eta": 14,
"driver_id": 32432
}
}
{
"name": "OrderDelivered",
"timestamp": 1677752561100,
"payload": {
"order_id": "ekpsHJ9GhQd7OU",
"delivery_eta": 14
}
}
Payment Gateway
Similarly, for a payment gateway integration with stripe, you can create the following events to monitor callback success rate for each card_type.
{
"name": "Payment_Started"
"timestamp": 1677751161100,
"payload": {
"transaction_id": "si_LULhDM2vvvt7yZ",
"amount": 54.8,
"currency": "usd",
"card_type": "amex",
"invoice_id": "in_1KnN0G589O8KAxCGfVSpD0Pj"
}
{
"name": "Payment_Callback"
"timestamp": 1677751261100,
"payload": {
"transaction_id": "si_LULhDM2vvvt7yZ",
"status": "paid",
"payment_method": "cc"
}
Vendor Payments
For a B2B payment flow through NetBanking API calls, you can create the following events to track checkpoints in the callback or recipient notification pipeline.
{
"name": "Transfer_Prepared"
"timestamp": 1677751161100,
"payload": {
"recipient_id": "tWaIb3aK3vlHn9",
"amount": 10323,
"currency": "inr",
"recipient_bank": "citi",
"source_bank": "hdfc"
}
{
"name": "Transfer_Initiated"
"timestamp": 1677751361100,
"payload": {
"recipient_id": "tWaIb3aK3vlHn9",
"transaction_id": "98363ixIwXnh07L5DuLvQE6c",
"bank_api_status_code": "0004",
"transaction_status": "pending"
}
{
"name": "Transfer_Completed"
"timestamp": 1677751461100,
"payload": {
"recipient_id": "tWaIb3aK3vlHn9",
"transaction_id": "98363ixIwXnh07L5DuLvQE6c",
"transaction_status": "success"
}
{
"name": "Recipient_Notified"
"timestamp": 1677751561011,
"payload": {
"recipient_id": "tWaIb3aK3vlHn9",
"transaction_id": "98363ixIwXnh07L5DuLvQE6c",
"email_sent": true,
"sms_sent": false
}
You can check how to send these events in our data sources.
Updated 24 days ago