Skip to content

Commit df07540

Browse files
Clarify Segment<>Iterable ecommerce connection (#1486)
* Clarify Segment<>Iterable ecommerce connection Per this ticket: https://segment.zendesk.com/agent/tickets/420194, our docs are pretty unclear on exactly what Iterable requires for the ecommerce events we map for customers. Based on https://github.com/segmentio/integrations/blob/master/integrations/iterable/lib/index.js#L163-L206 and https://github.com/segmentio/integrations/blob/master/integrations/iterable/lib/mapper.js, we pretty much just send the `products` array we are given to Iterable, but turns out, the endpoints we hit requires some basic fields in each product object: https://api.iterable.com/api/docs#commerce_trackPurchase and https://api.iterable.com/api/docs#commerce_updateCart. I tried to clarify these requirements better for less confusion in the future. * Update src/connections/destinations/catalog/iterable/index.md Co-authored-by: LRubin <[email protected]> * Expanding "Order Completed" example event * Update src/connections/destinations/catalog/iterable/index.md Co-authored-by: LRubin <[email protected]>
1 parent 35309e0 commit df07540

File tree

1 file changed

+16
-2
lines changed
  • src/connections/destinations/catalog/iterable

1 file changed

+16
-2
lines changed

src/connections/destinations/catalog/iterable/index.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,25 @@ Subsequent `track` with `userId`
6767

6868
Iterable also supports Segment's [ecommerce events](/docs/connections/spec/ecommerce/v2/). This works just as you would expect, using the `track` method.
6969

70-
There is one important difference from the Segment documentation. If you are using the `Product Added` / `Product Removed` events, you must also pass along the "products" field with the cart info, just like Segment's example for the `Order Completed` event. You must include all required fields for the Purchase events in Iterable, which includes the total value of the purchase with the property: `total`. This value works best as a float, double, and possibly an integer. An example might look like this:
70+
Iterable has one important difference from the Segment Ecommerce spec. If you use the `Product Added` / `Product Removed`/ `Order Completed` events, you must include the "products" field with the cart info, as in the `Order Completed` example event. You must include [all required fields for the Purchase events in Iterable](https://api.iterable.com/api/docs#commerce_trackPurchase). This includes the total value of the purchase as `total` (best as a float, double, and possibly an integer), and an array of objects called `products`. Each product must include an `id` or `productId` as a string, and a `name`, `price`, and `quantity` on each product object in the array. These are used to map to Iterable's expected `items` array. An example might look like this:
7171

7272
```js
7373
analytics.track("Order Completed", {
74-
total: 100.00
74+
total: 100.00,
75+
products: [
76+
{
77+
product_id: '507f1f77bcf86cd799439011',
78+
name: 'Monopoly: 3rd Edition',
79+
price: 19,
80+
quantity: 1
81+
},
82+
{
83+
product_id: '505bd76785ebb509fc183733',
84+
name: 'Uno Card Game',
85+
price: 3,
86+
quantity: 2
87+
}
88+
]
7589
});
7690
```
7791

0 commit comments

Comments
 (0)