Hi there
I’m trying to design an integration from both Magento and Netsuite as the business will have most orders coming through Magento but then a select few orders created directly in Netsuite.
There may be times where certain items do not exist in Magento which will need to be synced from Netsuite and subsequently referenced for Events (Placed Order and Ordered Product).
I’m trying to reference the examples in the Build Custom Platforms documentation but I’m not entirely sure if I’m able to directly reference profiles and items that are already existing in Klaviyo or whether each event is referencing stand-alone profiles/items purely just in the event for data purposes.
{
"data": {
"type": "event",
"attributes": {
"profile": {
"$email": "john.smith@test.com",
"$first_name": "John",
"$last_name": "Smith",
"$phone_number": "5551234567",
"$address1": "123 Abc st",
"$address2": "Suite 1",
"$city": "Boston",
"$zip": "02110",
"$region": "MA",
"$country": "USA"
},
"metric": {
"name": "Placed Order"
},
"properties": {
"OrderId": "1234567890",
"Categories": ["Fiction", "Classics", "Children"],
"ItemNames": ["Winnie the Pooh", "A Tale of Two Cities"],
"Brands": ["Kids Books", "Harcourt Classics"],
"DiscountCode": "Free Shipping",
"DiscountValue": 5,
"Items": [{
"ProductID": "1111",
"SKU": "WINNIEPOOH",
"ProductName": "Winnie the Pooh",
"Quantity": 1,
"ItemPrice": 9.99,
"RowTotal": 9.99,
"ProductURL": "http://www.example.com/path/to/product",
"ImageURL": "http://www.example.com/path/to/product/image.png",
"Categories": ["Fiction", "Children"],
"Brand": "Kids Books"
},
{
"ProductID": "1112",
"SKU": "TALEOFTWO",
"ProductName": "A Tale of Two Cities",
"Quantity": 1,
"ItemPrice": 19.99,
"RowTotal": 19.99,
"ProductURL": "http://www.example.com/path/to/product2",
"ImageURL": "http://www.example.com/path/to/product/image2.png",
"Categories": ["Fiction", "Classics"],
"Brand": "Harcourt Classics"
}
],
"BillingAddress": {
"FirstName": "John",
"LastName": "Smith",
"Company": "",
"Address1": "123 abc street",
"Address2": "apt 1",
"City": "Boston",
"Region": "Massachusetts",
"RegionCode": "MA",
"Country": "United States",
"CountryCode": "US",
"Zip": "02110",
"Phone": "5551234567"
},
"ShippingAddress": {
"FirstName": "John",
"LastName": "Smith",
"Company": "",
"Address1": "123 abc street",
"Address2": "apt 1",
"City": "Boston",
"Region": "Massachusetts",
"RegionCode": "MA",
"Country": "United States",
"CountryCode": "US",
"Zip": "02110",
"Phone": "5551234567"
}
},
"time": "2022-12-05T15:00:00Z",
"value": 9.99,
"unique_id": "1234567890"
}
}
}
In the above example, I don’t see where the profile’s Klaviyo ID or External ID can be referenced. And while the items array does have a reference to ProductID, I’m not confident that that is an actual reference to a Klaviyo Catalog Item.
The Create Event API Documentation seems to be a bit different where it does have the profile references but no examples for Catalog Items.
Is anyone able to provide some clarity on the above and how I would go about referencing items/profiles? Perhaps by just slotting it into the example above.
Thanks in advance!