Webhooks - Item Events

Item Event Object

NameTypeDescriptionExample
idstrIdentifier of the event“mmmm4444nnnn3333pppp”
typestrThe type of event that occurredSee below for full list of event types
createdintTime since epoch when the event occurred1622589211
dataobjectTypeSee JSON below
data.object.typestrResource type of event"Subscription"
data.object.merchantstrIdentifier of merchant"aaaa1111bbbb2222cccc"
data.object.public_idstrPublic ID of resource. Should be used to retrieve additional resource object data via OG API if necessary."zzzz9999yyyy8888xxxx
data.object.customerstrThe merchant_user_id AKA the id from merchant system - not our internal public ID"h183738"
data.object.productstrThe external product ID from the merchant's system"SKUabc"
data.object.orderstrThe public ID from Ordergroove's system of the order in which this item exists."1234e74444dd115555d8bc7cccc043b0"
data.object.subscriptionstrIf item is part of a subscription this will contain the public ID of that subscription in Ordergroove's system"bc7cccc043b01234e74444155"
data.object.offerstrOffer record ID"1234e74444dd115555d8bc7cccc043b0"
data.object.quantityintNumber of items1
data.object.pricestrUnit price of item'20.00'
data.object.total_pricestrFinal item price after all item level incentives have been applied'20.00'
data.object.first_placedintUnix timestamp of the first day the item was attempted to be placed.

This is only set for items that enter our "out of stock" workflow.
1300375961
data.object.componentsobjectList of objects representing the bundle components/products[
{"product": "product_1"},
{"product": "product_2"}
]
  • Example data:
{
  "id": "mmmm4444nnnn3333pppp",
  "type": "item.create",
  "created": 1622589211,
  "data": {
    "object": {
      "type": "item",
      "merchant": "aaaa1111bbbb2222cccc",
      "public_id": "zzzz9999yyyy8888xxxx",
      "customer": "m1234576",
      "product": "SKUabc",
      "order": "1234e74444dd115555d8bc7cccc043b0",
      "subscription": "bc7cccc043b01234e74444155",
      "offer": "a748aa648ac811e8af3bbc764e106cf4",
      "quantity": 1,
      "price": '20.00',
      "total_price": '20.00',
      "first_placed": null,
      "components": [
        {"product": "product_1"}, 
        {"product": "product_2"}
      ]
    }
  }
}

Item Event Types

  • item.create

  • Triggered when an item is created. This event will only occur once for an item, but can occur many times for the associated subscription.
  • item.change_quantity

  • Triggered when the quantity of an item is modified. This event can be triggered more than once for an item.
  • item.remove

  • Triggered when the item is removed from an order. When this happens, it is deleted from the order. If the item was associated with an active subscription, a corresponding item.create event will be generated. This event will only occur once for an item, but can occur many times for the associated subscription.
  • item.item_subscribe

  • Triggered when a subscription is created from an item that originally was a "one-time" item - an item in an order that customer had not subscribed to. This event will only occur once for an item.
  • item.update_price

  • Triggered when the price of an item is updated. This event can be triggered more than once for an item.
    NOTE: This event can only be triggered when the update item price API endpoint is used
  • item.successfully_placed

  • Triggered when the associated order's placement response indicates it was processed successfully and GMV was realized. This event will only occur once for an item, but can occur many times for the associated subscription.
    Related: order.success event
  • item.out_of_stock

  • Triggered when an item is detected as not having enough inventory to be fulfilled. The Ordergroove application moves the item to be attempted for processing the next day. The payload provides the order the item was moved to.
    NOTE: This retry mechanism occurs a limited number of times. At the end of the retry cycle the item is deleted. This event is not triggered at the end of the retry cycle.