This guide explains how to work with individual variant webhooks in our system. These webhooks allow you to receive real-time notifications when changes are made to product variants in your catalog.
Available Events
We support 3 main webhook events for individual variant operations:
variant.created
- Triggered when a single new variant is createdvariant.updated
- Triggered when a single variant is modifiedvariant.deleted
- Triggered when a single variant is removed
Event Details (variant.created)
This webhook fires whenever a single new product variant is created in the system. This could happen through the user interface or via API calls.
How to Trigger the Event
For these steps, ensure that only one variant is created to trigger the expected event. If multiple variants are created, the bulk.variant.created event will be fired instead.
Through the CRM Product UI:
Add an Attribute and Auto-Create Variants (Yes):
Scroll to the variants section.
Click on Actions → Add/Edit Attributes → (Add an attribute) → Save → Auto Create modal → Yes.
Add an Attribute and Customize Variants:
Scroll to the variants section.
Click on Actions → Add/Edit Attributes → (Add an attribute) → Save → Auto Create modal → No, let me customize → Save.
Auto-Create Variants for Unassigned Attributes (Yes):
Ensure the product has unassigned attributes.
Click on Actions → Auto-create Variants → Yes.
Auto-Create Variants and Customize (No):
Ensure the product has unassigned attributes.
Click on Actions → Auto-create Variants → No, let me customize → Save.
Through the APIs:
Use the V2 API to create endpoints:
What Information Will You Receive?
You will receive details about the newly created variant, including its attributes, assigned product, and any default settings applied during creation.
Decrypted JSON Encoded Payload
{
"clientAppKey": "app_key_here",
"type": "variant.created",
"time": "2024-12-18 18:25:33",
"data": {
"id": "16e471d2-d0b0-4fe0-bf04-05dd98e46e8c",
"object": {
"id": 72,
"sku_num": "JDI28438A",
"price": "10.0000",
"quantity": 10,
"images": [],
"attributes": [
{
"id": 83,
"attribute": {
"id": 39,
"name": "color",
"option": {
"id": 42,
"name": "white"
}
}
},
{
"id": 86,
"attribute": {
"id": 43,
"name": "shape",
"option": {
"id": 44,
"name": "square"
}
}
}
]
},
"created": "2024-12-18 18:25:33",
"triggeringEvent": "",
"correlationId": "4c155722-8205-42bd-8902-9e25f1d91c64"
}
}
Event Details (variant.updated
)
This webhook fires whenever a single existing variant is modified in any way.
How to Trigger the Event
For all the UI steps, ensure the operation is performed for a single item to trigger the expected event. If multiple items are updated, it will be considered a bulk action, and a different event may be fired instead.
Through the CRM Product UI:
Edit a Single Variant:
Scroll to the variants section.
Select only one variant from the table.
Click on Actions → Edit Selected → Save.
Edit an Existing Attribute for a Single Variant:
Scroll to the variants section.
Click on Actions → Add/Edit Attributes → (Edit an attribute) → Save.
Add a New Attribute to a Single Variant:
Scroll to the variants section.
Click on Actions → Add/Edit Attributes → (Add an attribute) → Save.
Edit an Attribute and Customize via Auto-Create Modal:
Scroll to the variants section.
Click on Actions → Add/Edit Attributes → (Edit an attribute) → Save.
On the Auto Create modal, select No, let me customize → Save.
Through the APIs:
Use the V2 API to update endpoints:
What Information Will You Receive?
You will receive details about the specific variant that was modified, including the updated attributes or changes made.
Decrypted JSON Encoded Payload
{
"clientAppKey": "app_key_here",
"type": "variant.updated",
"time": "2024-12-18 19:16:23",
"data": {
"id": "e2ac5047-7784-4e92-846e-ac67ba3913a4",
"object": {
"id": 42,
"sku_num": "NMO213M1",
"price": "10.0000",
"quantity": 10,
"images": [],
"attributes": [
{
"id": 83,
"attribute": {
"id": 39,
"name": "color",
"option": {
"id": 42,
"name": "white"
}
}
},
{
"id": 86,
"attribute": {
"id": 43,
"name": "shape",
"option": {
"id": 44,
"name": "square"
}
}
}
]
},
"created": "2024-12-18 19:16:23",
"triggeringEvent": "",
"correlationId": "1b7245e8-3d06-4af9-aa3c-6e84193e7205"
}
}
Event Details (variant.deleted
)
This webhook fires whenever a single variant is deleted from the system, indicating its permanent removal and disassociation.
How to Trigger the Event
Ensure that only one variant is deleted to trigger the expected event. If multiple variants are deleted, the bulk.variant.deleted event will fire instead.
Through the CRM Product UI:
Delete a Single Variant:
Select only one variant from the table.
Click on Actions → Delete Selected → Yes.
Through the APIs:
Use the V2 API to delete endpoints.
What Information Will You Receive?
You will receive confirmation of the deleted variant, including its ID, associated product, and the time of deletion.
Decrypted JSON Encoded Payload
{
"clientAppKey": "app_key_here",
"type": "variant.deleted",
"time": "2024-12-18 19:28:07",
"data": {
"id": "0bb09ca7-28ad-4730-b4c1-a48c33e71689",
"object": {
"id": 73
},
"created": "2024-12-18 19:28:07",
"triggeringEvent": "",
"correlationId": "c6ce1d2d-4442-4631-bd0c-fdc762fdc4fb"
}
}
Understanding the Payload
clientAppKey: Your unique store identifier
type: The type of event that occurred
time: Indicates the exact time the change occurred, recorded in Eastern time.
data: Contains the details of the variant and event
id: A unique identifier for this webhook event
object: The variant data
created: Timestamp of when the event was created
correlationId: A unique identifier to track related events
Note on Bulk Operations
If you're working with multiple variants at once, please refer to our Bulk Variant Webhooks documentation. Any operation that affects multiple variants will trigger bulk webhook events instead of these individual ones.