The “Notify Purchase Made Event” is used to describe a purchase completed by the customer. It notifies, via JavaScript, when a user makes a purchase using connectif.managed.sendEvents.
How it is used
The purchase information notification uses the entityInfo option of the sendEvents method to enrich the data of the events sent.
Notifying the purchase made
This object represents the Shopping Cart model which includes the following properties:
| Name | Required | Type | Description |
|---|---|---|---|
| purchaseId | Yes | string | Unique identifier of the purchase. |
| cartId | No | string | Unique identifier of the cart from which this purchase originated. |
| totalQuantity | Yes | number | Total number of products in the purchase (including duplicates). For example: if a cart has 3 units of one product and 7 of another, totalQuantity will be 10. |
| totalPrice | Yes | number | Total amount of the purchase. |
| purchaseDate | No | string | Purchase date. Expected format: ISO_8601 format. |
| paymentMethod | No | string | Payment method. |
| products | Yes | Product Basket Item | Items included in the purchase, along with their quantity and amount. |
| source_name | No | string | The source name, to provide context or details about the type of source for the purchase. |
| source_type | No | string |
The name of the source where the purchase was made. Possible values are: "marketplace", "digital-store", "point-of-sale", "third-party" and "other". |
Organization of Source Values (source_type)
Below are explained each of the possible values of the purchase source (source_type):
| Value | Description | Example |
|---|---|---|
| third-party | Sales routed through distributors, retailers, or partner networks (not marketplaces). |
Wholesale, Distributors, Affiliates... |
| other | Edge cases or special channels that don’t fit into the categories above. |
Telesales, Trade shows & events, Social commerce... |
| marketplace | Third‑party eCommerce platforms where you list your products. |
Amazon Marketplace, eBay, Zalando... |
| digital-store | Sales from the retailer’s own eCommerce website or app. |
Direct, Organic Search, Paid Search, Email Marketing... |
| point-of-sale | Sales in physical stores processed through a POS system. |
In‑store checkout, In‑store kiosk, Pop‑up stores... |
Example
The notification will look like this:
connectif.managed.sendEvents([
{
"type": "purchase",
"purchase": {
"cartId": "cart-0098caf9-42f4-44e9-afdd-45eafe892293",
"totalQuantity": 1,
"totalPrice": 51.88,
"products": [{
"name": "My Product",
"productDetailUrl": "https://myshop.com/product/details/59a31949a1a562d4979fbca2",
"productId": "59a31949a1a562d4979fbca2",
"unitPrice": 51.88,
"availability": "outofstock",
"imageUrl": "https://myshop.com/img/59a31949a1a562d4979fbca2.jpg",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"priority": 10,
"rating": 4,
"tags": ["tag1", "tag2", "tag3"],
"relatedExternalProductIds": ["59a31953a1a562d4979fbd90", "59a31b2ba1a562d4979fe5b8"],
"brand": "Jata",
"publishedAt": "2020-05-03T10:15:00Z",
"quantity": 1,
"price": 51.88
}],
"purchaseId": "purchase-e3418b5a-8709-4593-a7c8-d8a7f12df737",
"purchaseDate": "2020-06-26T12:52:51.591Z",
"paymentMethod": "Credit Card"
"source_type": "digital-store"
"source_name": "My online store"
}
},
{
"type": "page-visit"
}], { entityInfo });
Keep learning!
To take full advantage of your Connectif account, we recommend continuing with the following articles:
- Adding Connectif JavaScript to your site, to insert the code and start collecting information about visits to your site.
- Integration using tags, to learn about all the notifications you can send from your eCommerce to Connectif and how they work.
- Integration with Connectif via API, to sync contacts, products, purchases, and coupons.
- Check integration with your eCommerce, to ensure that all data is being properly synchronized in your Connectif account.