Installing Webhooks

Configure webhooks from within the Ordergroove Admin to receive real-time event notifications

View as Markdown

You can create and modify webhooks from within the Ordergroove Admin. With Webhooks 2.0, standard for all merchants, you can configure which data points are valuable to receive in a single webhook notification!


Setup

Accessing the webhooks configurator

We’ll be using the webhooks configuration interface. You can access it through your Ordergroove Admin:

  1. Log in to Ordergroove.
  2. Go to Developers on the top toolbar, and select Webhooks.
  3. Click + CREATE WEBHOOK to begin.
  4. Select which events you want to receive webhook notifications for and any additional webhook data you want included in the payload. For example, an order event will only contain order-level information. If you select to add subscription and item-level data, that will also be sent in the payload of the webhook.
Note

Order and item-level data cannot be added to subscriber or subscription events at this time. Adding subscription-level data to order and item-level events is supported in the Alpha of Webhooks 2.0.


Payload Structure

The additional webhook data selected during configuration will be sent in the snapshot object within the payload. See example:

1{
2 "id": "mmmm4444nnnn3333pppp",
3 "type": "subscriber.create",
4 "created": 1622589211,
5 "data": {
6 "object": {
7 "type": "subscriber"
8 },
9 "snapshot": {
10 "customer": {},
11 "subscriptions": [],
12 "orders": [],
13 "items": [],
14 "products": [],
15 "addresses": [],
16 "payments": []
17 }
18 }
19}

The Snapshot Object

This object will include the additional selected data during configuration of the webhook. The customer object within snapshot will be a single customer since all webhooks can only be tied to one customer. The subscriptions, orders, items, addresses, payments, and products objects will always be a list even if there is only one object within the list. Example:

1{
2 "snapshot": {
3 "customer": {
4 "id": "00026001",
5 "public_id": "c4cd7f86ccc411e8ada3bc764e101db1",
6 "first_name": "Nathan",
7 "last_name": "Torres",
8 "address": "75 Broad St Fl 23",
9 "address2": null,
10 "city": "New York",
11 "state_province_code": "NY",
12 "zip_postal_code": "10004-2487",
13 "phone": "3154055372",
14 "fax": null,
15 "country_code": "US",
16 "live": true,
17 "created": "2018-10-10 14:43:32",
18 "token_id": null,
19 "store_public_id": null
20 },
21 "subscriptions": [{
22 "customer": "00026001",
23 "merchant": "ac4f7938383a11e89ecbbc764e1107f2",
24 "product": "0070067689",
25 "payment": "443ddf72094711e9a5afbc764e1043b0",
26 "shipping_address": "394aee16d61611e88b4abc764e1043b0",
27 "offer": "a748aa648ac811e8af3bbc764e106cf4",
28 "subscription_type": "replenishment",
29 "components": [],
30 "extra_data": {},
31 "public_id": "0ff0f88accc511e8b6c0bc764e106cf4",
32 "product_attribute": null,
33 "quantity": 4,
34 "price": null,
35 "frequency_days": 120,
36 "reminder_days": 10,
37 "every": 4,
38 "every_period": 3,
39 "start_date": "2018-12-27",
40 "cancelled": null,
41 "cancel_reason": null,
42 "cancel_reason_code": null,
43 "iteration": null,
44 "sequence": null,
45 "session_id": "ac4f7938383a11e89ecbbc764e1107f2.896371.1539022086",
46 "merchant_order_id": "2906548",
47 "customer_rep": null,
48 "club": null,
49 "created": "2018-10-10 14:45:38",
50 "updated": "2019-01-17 12:09:23",
51 "live": true
52 }],
53 "orders": [{
54 "merchant": "ac4f7938383a11e89ecbbc764e1107f2",
55 "customer": "00026001",
56 "payment": "070001bc02fd11e99542bc764e1043b0",
57 "shipping_address": "66c25cd0564011e9abc5bc764e107990",
58 "public_id": "c4e05d04ccc411e8ada3bc764e101db1",
59 "sub_total": "22.90",
60 "tax_total": "0.00",
61 "shipping_total": "5.99",
62 "discount_total": "21.08",
63 "total": "28.89",
64 "created": "2018-10-10 14:43:32",
65 "place": "2019-06-06 12:08:37",
66 "cancelled": "2019-04-05 12:13:32",
67 "tries": 1,
68 "generic_error_count": 0,
69 "status": 1,
70 "type": 1,
71 "order_merchant_id": "",
72 "rejected_message": "",
73 "extra_data": "",
74 "locked": false,
75 "oos_free_shipping": false
76 }],
77 "items": [{
78 "order": "45c27952cd9211e8855abc764e106cf4",
79 "offer": null,
80 "subscription": "6199282ccd8f11e88267bc764e106cf4",
81 "product": "0070067698",
82 "components": [],
83 "quantity": 1,
84 "public_id": "45c39ceccd9211e8855abc764e106cf4",
85 "product_attribute": null,
86 "price": "79.99",
87 "extra_cost": "0.00",
88 "total_price": "35.99",
89 "one_time": false,
90 "frozen": false,
91 "first_placed": null
92 }],
93 "products": [{
94 "merchant": "ac4f7938383a11e89ecbbc764e1107f2",
95 "groups": [],
96 "name": "Wild Yam Root 405mg",
97 "price": "6.99",
98 "image_url": "https://staging-web-vitaminworld.demandware.net/on/demandware.static/-/Sites-vitaminworld-master/default/dwafa9ff17/images/2017/000030.jpg",
99 "detail_url": "https://staging-web-vitaminworld.demandware.net/s/vitaminworld_us/wild-yam-root-405mg-0070000030.html",
100 "external_product_id": "0070000030",
101 "sku": "0070000030",
102 "autoship_enabled": false,
103 "premier_enabled": 0,
104 "created": "2018-07-24 10:06:10",
105 "last_update": "2018-11-20 10:48:00",
106 "live": false,
107 "discontinued": false,
108 "offer_profile": null,
109 "extra_data": null,
110 "incentive_group": null,
111 "product_type": "standard",
112 "autoship_by_default": false,
113 "every": 2,
114 "every_period": 2
115 }],
116 "addresses": [{
117 "customer": "00026001",
118 "public_id": "c4cd7f86ccc411e8ada3bc764e101db1",
119 "label": null,
120 "first_name": "Nathan",
121 "last_name": "Torres",
122 "company_name": null,
123 "address": "75 Broad St Fl 23",
124 "address2": null,
125 "city": "New York",
126 "state_province_code": "NY",
127 "zip_postal_code": "10004-2487",
128 "phone": "3154055372",
129 "fax": null,
130 "country_code": "US",
131 "live": true,
132 "created": "2018-10-10 14:43:32",
133 "token_id": null,
134 "store_public_id": null
135 }],
136 "payments": [{
137 "customer": "00026001",
138 "billing_address": "c4cfc106ccc411e8ada3bc764e101db1",
139 "cc_number_ending": null,
140 "public_id": "c4d1d4e6ccc411e8ada3bc764e101db1",
141 "label": null,
142 "token_id": "5CA94EAA-AADE-4918-ABEE-8C8531411BAE",
143 "cc_holder": null,
144 "cc_type": 1,
145 "cc_exp_date": "02/2020",
146 "payment_method": "credit card",
147 "live": false,
148 "created": "2018-10-10 14:43:32",
149 "last_updated": "2018-10-10 14:43:32"
150 }]
151 }
152}