Events¶
The RIPE ecosystem includes an ESB (Enterprise Service Bus), named RIPE Bus, that gives you access to some events that reflect some of the things that might have happened in the system, such as orders that were created or rules that were edited.
This document includes the specification of those events, separated by their domain. Events are divided into channels called topics that groups their messages by context. For example, the topic order contains events related to orders.
Common fields¶
All the events share a common structure:
{ "name" : "order.created", "origin": "service-1", "hostname": "hostname.com", "datatype": "json", "timestamp": 1612431932598, "payload": { ... } }
Field | Type | Description |
---|---|---|
name | str | Identifies the event that originated the message. |
origin | str | Identifies the service or instance that created the event. |
hostname | str | The domain where the service that created the event is running. |
datatype | str | Specifies the datatype of the payload field. |
timestamp | float | Marks the time where the event was created, measured in milliseconds since Unix epoch. |
payload | datatype | It's the only field is the only one that is specific to each type of event. Each event has its own payload, typically displaying the data being created/updated/deleted. |
Core events¶
These events are central to RIPE's functioning.
Name | Topic | Description |
---|---|---|
order.pending | order | Triggered when any of the orders in the RIPE instance is marked as pending. |
order.pending.<brand> | order | Triggered when an order from the requested brand is marked as pending. |
order.created | order | Triggered when any of the orders in the RIPE instance is set to created. |
order.created.<brand> | order | Triggered when an order from the requested brand is set to created. |
order.production | order | Triggered when any of the orders in the RIPE instance is marked as in production. |
order.production.<brand> | order | Triggered when an order from the requested brand is marked as in production. |
order.ready | order | Triggered when any of the orders in the RIPE instance is marked as ready. |
order.ready.<brand> | order | Triggered when an order from the requested brand is marked as ready. |
order.sent | order | Triggered when any of the orders in the RIPE instance is marked as sent. |
order.sent.<brand> | order | Triggered when an order from the requested brand is marked as sent. |
order.received | order | Triggered when any of the orders in the RIPE instance is marked as received. |
order.received.<brand> | order | Triggered when an order from the requested brand is marked as received. |
order.returned | order | Triggered when any of the orders in the RIPE instance is marked as returned. |
order.returned.<brand> | order | Triggered when an order from the requested brand is marked as returned. |
order.canceled | order | Triggered when any of the orders in the RIPE instance is marked as canceled. |
order.canceled.<brand> | order | Triggered when an order from the requested brand is marked as canceled. |
availability_rule.created | availability_rule | Triggered when a new availability rule entry is created. |
availability_rule.updated | availability_rule | Triggered when an availability rule entry is updated. |
availability_rule.saved | availability_rule | Triggered when an availability rule entry is saved (either created or updated). |
availability_rule.deleted | availability_rule | Triggered when an availability rule entry is deleted from the data source. |
cites_rule.created | cites_rule | Triggered when a new cites rule entry is created. |
cites_rule.updated | cites_rule | Triggered when a cites rule entry is updated. |
cites_rule.saved | cites_rule | Triggered when a cites rule entry is saved (either created or updated). |
cites_rule.deleted | cites_rule | Triggered when a cites rule entry is deleted from the data source. |
code_rule.created | code_rule | Triggered when a new code rule entry is created. |
code_rule.updated | code_rule | Triggered when a code rule entry is updated. |
code_rule.saved | code_rule | Triggered when a code rule entry is saved (either created or updated). |
code_rule.deleted | code_rule | Triggered when a code rule entry is deleted from the data source. |
config_rule.created | config_rule | Triggered when a new config rule entry is created. |
config_rule.updated | config_rule | Triggered when a config rule entry is updated. |
config_rule.saved | config_rule | Triggered when a config rule entry is saved (either created or updated). |
config_rule.deleted | config_rule | Triggered when a config rule entry is deleted from the data source. |
ddp_rule.created | ddp_rule | Triggered when a new ddp rule entry is created. |
ddp_rule.updated | ddp_rule | Triggered when a ddp rule entry is updated. |
ddp_rule.saved | ddp_rule | Triggered when a ddp rule entry is saved (either created or updated). |
ddp_rule.deleted | ddp_rule | Triggered when a ddp rule entry is deleted from the data source. |
extra_duty_rule.created | extra_duty_rule | Triggered when a new extra duty rule entry is created. |
extra_duty_rule.updated | extra_duty_rule | Triggered when an extra duty rule entry is updated. |
extra_duty_rule.saved | extra_duty_rule | Triggered when an extra duty rule entry is saved (either created or updated). |
extra_duty_rule.deleted | extra_duty_rule | Triggered when an extra duty rule entry is deleted from the data source. |
factory_rule.created | factory_rule | Triggered when a new factory rule entry is created. |
factory_rule.updated | factory_rule | Triggered when a factory rule entry is updated. |
factory_rule.saved | factory_rule | Triggered when a factory rule entry is saved (either created or updated). |
factory_rule.deleted | factory_rule | Triggered when a factory rule entry is deleted from the data source. |
hs_code_map.created | hs_code_map | Triggered when a new hs code map rule entry is created. |
hs_code_map.updated | hs_code_map | Triggered when a hs code map rule entry is updated. |
hs_code_map.saved | hs_code_map | Triggered when a hs code map rule entry is saved (either created or updated). |
hs_code_map.deleted | hs_code_map | Triggered when a hs code map rule entry is deleted from the data source. |
hs_code_map.created | hs_code_map | Triggered when a new hs code map entry is created. |
hs_code_map.updated | hs_code_map | Triggered when a hs code map entry is updated. |
hs_code_map.saved | hs_code_map | Triggered when a hs code map entry is saved (either created or updated). |
hs_code_map.deleted | hs_code_map | Triggered when a hs code map entry is deleted from the data source. |
hs_code_rule.created | hs_code_rule | Triggered when a new hs code rule entry is created. |
hs_code_rule.updated | hs_code_rule | Triggered when a hs code rule entry is updated. |
hs_code_rule.saved | hs_code_rule | Triggered when a hs code rule entry is saved (either created or updated). |
hs_code_rule.deleted | hs_code_rule | Triggered when a hs code rule entry is deleted from the data source. |
inventory_rule.created | inventory_rule | Triggered when a new inventory rule entry is created. |
inventory_rule.updated | inventory_rule | Triggered when an inventory rule entry is updated. |
inventory_rule.saved | inventory_rule | Triggered when an inventory rule entry is saved (either created or updated). |
inventory_rule.deleted | inventory_rule | Triggered when an inventory rule entry is deleted from the data source. |
letter_rule.created | letter_rule | Triggered when a new letter rule entry is created. |
letter_rule.updated | letter_rule | Triggered when a letter rule entry is updated. |
letter_rule.saved | letter_rule | Triggered when a letter rule entry is saved (either created or updated). |
letter_rule.deleted | letter_rule | Triggered when a letter rule entry is deleted from the data source. |
note_rule.created | note_rule | Triggered when a new note rule entry is created. |
note_rule.updated | note_rule | Triggered when a note rule entry is updated. |
note_rule.saved | note_rule | Triggered when a note rule entry is saved (either created or updated). |
note_rule.deleted | note_rule | Triggered when a note rule entry is deleted from the data source. |
price_rule.created | price_rule | Triggered when a new price rule entry is created. |
price_rule.updated | price_rule | Triggered when a price rule entry is updated. |
price_rule.saved | price_rule | Triggered when a price rule entry is saved (either created or updated). |
price_rule.deleted | price_rule | Triggered when a price rule entry is deleted from the data source. |
shipping_rule.created | shipping_rule | Triggered when a new shipping rule entry is created. |
shipping_rule.updated | shipping_rule | Triggered when a shipping rule entry is updated. |
shipping_rule.saved | shipping_rule | Triggered when a shipping rule entry is saved (either created or updated). |
shipping_rule.deleted | shipping_rule | Triggered when a shipping rule entry is deleted from the data source. |
Payloads¶
Order related¶
{ "url": "https://webhook.site/88998fc4-e09d-4519-9d39-7ecffbd916a1", "params": { "payload": { "_id": "5c800503a3a4ff004ef8f785", "id": 4993, "number": 4993, "enabled": true, "description": null, "created": 1551893763, "modified": 1551893763, "meta": { "timestamp": "2019-03-06T17:36:03.482Z" }, "key": "95970f5244d37375be56aeadba27c992c00041a7", "status": "created", "production_status": "unset", "production": "produce", "gender": "male", "currency": "EUR", "country": "PT", "price": null, "prices": null, "brand": "dummy", "shoe": "dummy", "shoe_query": "model=dummy&brand=dummy&p=piping:leather_dmy:black&p=side:leather_dmy:black&p=top0_bottom:leather_dmy:black&p=shadow:default:default", "shoe_url": "/config/customization?model=dummy&brand=dummy&p=piping:leather_dmy:black&p=side:leather_dmy:black&p=top0_bottom:leather_dmy:black&p=shadow:default:default", "image_url": "/compose?model=dummy&brand=dummy&p=piping:leather_dmy:black&p=side:leather_dmy:black&p=top0_bottom:leather_dmy:black&p=shadow:default:default", "minify_hash": "NDIwNDI", "image_hash": "NDIwNDM", "image_o_hash": "NDIwNDQ", "top_hash": "NDIwNDU", "top_o_hash": "NDIwNDY", "bottom_hash": "NDIwNDc", "bottom_o_hash": "NDIwNDg", "back_hash": "NDIwNDk", "side_hash": "NDIwNTA", "structure": "{\"brand\": \"dummy\", \"model\": \"dummy\", \"variant\": \"\", \"parts\": [{\"color\": \"black\", \"material\": \"leather_dmy\", \"face\": \"side\", \"name\": \"piping\", \"hidden\": false, \"optional\": false}, {\"color\": \"black\", \"material\": \"leather_dmy\", \"face\": \"side\", \"name\": \"side\", \"hidden\": false, \"optional\": false}, {\"color\": \"black\", \"material\": \"leather_dmy\", \"face\": \"top\", \"name\": \"top0_bottom\", \"hidden\": false, \"optional\": false}, {\"color\": \"default\", \"hidden\": true, \"material\": \"default\", \"name\": \"shadow\", \"optional\": false}], \"parts_m\": {\"piping\": {\"color\": \"black\", \"material\": \"leather_dmy\", \"face\": \"side\"}, \"side\": {\"color\": \"black\", \"material\": \"leather_dmy\", \"face\": \"side\"}, \"top0_bottom\": {\"color\": \"black\", \"material\": \"leather_dmy\", \"face\": \"top\"}, \"shadow\": {\"color\": \"default\", \"hidden\": true, \"material\": \"default\"}}, \"gender\": \"male\", \"size\": 24, \"query\": \"model=dummy&brand=dummy&p=piping:leather_dmy:black&p=side:leather_dmy:black&p=top0_bottom:leather_dmy:black&p=shadow:default:default\", \"url\": \"/config/customization?model=dummy&brand=dummy&p=piping:leather_dmy:black&p=side:leather_dmy:black&p=top0_bottom:leather_dmy:black&p=shadow:default:default\", \"image\": \"/compose?model=dummy&brand=dummy&p=piping:leather_dmy:black&p=side:leather_dmy:black&p=top0_bottom:leather_dmy:black&p=shadow:default:default\", \"extras\": 0}", "ff_id": null, "ff_shoe_id": null, "ff_order_id": "00df7665-a218-4514-896e-1d6e5f192fd7", "delivery_time": null, "tracking_number": null, "tracking_url": null, "states": [], "attachments": [], "account": "root@root.com", "customer": "root@root.com", "ambassador": "root@root.com", "store": null, "number_s": "#004993", "delivery_d": 1554312963, "details": { "brand": "dummy", "model": "dummy", "variant": "", "parts": [ { "color": "black", "material": "leather_dmy", "face": "side", "name": "piping", "hidden": false, "optional": false }, { "color": "black", "material": "leather_dmy", "face": "side", "name": "side", "hidden": false, "optional": false }, { "color": "black", "material": "leather_dmy", "face": "top", "name": "top0_bottom", "hidden": false, "optional": false }, { "color": "default", "hidden": true, "material": "default", "name": "shadow", "optional": false } ], "parts_m": { "piping": { "color": "black", "material": "leather_dmy", "face": "side" }, "side": { "color": "black", "material": "leather_dmy", "face": "side" }, "top0_bottom": { "color": "black", "material": "leather_dmy", "face": "top" }, "shadow": { "color": "default", "hidden": true, "material": "default" } }, "gender": "male", "size": 24, "query": "model=dummy&brand=dummy&p=piping:leather_dmy:black&p=side:leather_dmy:black&p=top0_bottom:leather_dmy:black&p=shadow:default:default", "url": "/config/customization?model=dummy&brand=dummy&p=piping:leather_dmy:black&p=side:leather_dmy:black&p=top0_bottom:leather_dmy:black&p=shadow:default:default", "image": "/compose?model=dummy&brand=dummy&p=piping:leather_dmy:black&p=side:leather_dmy:black&p=top0_bottom:leather_dmy:black&p=shadow:default:default", "extras": 0 } }, (...) }, "event": "order.created", "handler": "http" }
Rule related¶
{ "url": "https://webhook.site/88998fc4-e09d-4519-9d39-7ecffbd916a1", "payload": { "enabled": true, "description": "", "created": 1551894521, "modified": 1551894521, "meta": {}, "name": "", "priority": null, "brand": "swear", "shoe": "vyner", "variant": "", "part": "side", "material": "python", "color": "", "vat_included": false, "ddp_included": false, "fixed_price": false, "round_price": true, "pivot": "", "price_eur": 100, "price_usd": 110, "price_gbp": 90, "price_geo": {}, "_id": "5c8007f9a3a4ff0052f8f766", "id": 21628 }, "event": "price_rule.created", "handler": "http" }
RIPE Twitch events¶
These are the events that are triggered specifically by ripe-twitch.
Name | Topic | Description |
---|---|---|
ripe_twitch:order.paid | ripe_twitch:order | Triggered when a sales order is paid for. |
Payloads¶
Order paid¶
{ "id": "1", "user": "user1", "email": "email1@email.com", "shippingAddress": { "firstName": "First Name1", "lastName": "Last Name1", "address": "Name1 Shipping Address", "postcode": "1111", "country": "country", "state": "state" }, "billingAddress": { "firstName": "First Name1", "lastName": "Last Name1", "address": "Name1 Billing Address", "postcode": "1111", "country": "country", "state": "state" }, "currency": "USD", "amount": 100, "productQuery": "brand=dummy&model=dummy&p=side:leather_dmy:black&p=piping:leather_dmy:black&p=top0_bottom:leather_dmy:black&p=shadow:default:default" }
PERI Email events¶
These are the events that are triggered specifically by peri-email.
Name | Topic | Description |
---|---|---|
email.success | email | Triggered when an email is successfully sent. |
email.error | email | Triggered when there is a failure sending the email. |
Payloads¶
The payload of the success
or error
events is the same as the message who originated the event.
For example, a ripe_twitch:order.paid
event is consumed by PERI Email to send an e-mail notification. The payload of the original event is the RIPE Twitch order. For that reason, the success
and error
events have as payload the twitch order.