Skip to main content
Bulk Variant Webhooks
P
Written by Product Sticky
Updated over a week ago

This guide explains how to work with bulk variant webhooks in our system. These webhooks are triggered when operations affect multiple variants simultaneously, allowing you to efficiently process batch changes to your product catalog.

Available Events

We support three main webhook events for bulk variant operations:

  1. bulk.variant.created - Triggered when multiple variants are created at once

  2. bulk.variant.updated - Triggered when multiple variants are modified together

  3. bulk.variant.deleted - Triggered when multiple variants are removed simultaneously

Event Details (bulk.variant.created)

This webhook fires whenever multiple variants are created at the same time. This commonly occurs when generating variants from attribute combinations.

How to Trigger the Event

Ensure that multiple variants are created to trigger the bulk event. If only one variant is created, the variant.created event will fire instead.

Through the CRM Product UI:

  • Add Multiple Attributes and Auto-Create (Yes):

    • Actions → Add/Edit Attributes → Save → Auto Create modal → Yes.

  • Add Multiple Attributes and Customize:

    • Actions → Add/Edit Attributes → Save → Auto Create modal → No, let me customize → Save.

  • Autochat-Create Variants for Unassigned Attributes (Yes):

    • Actions → Auto-create Variants → Yes.

  • Auto-Create Variants and Customize:

    • Actions → Auto-create Variants → No, let me customize → Save.

Through the APIs:

  • Use the V2 API to Add Bulk Variant endpoints.

What Information Will You Receive?

You will receive details of all the newly created variants, including their IDs, associated products, attribute combinations, and the timestamp of creation.

Decrypted JSON Encoded Payload

{
"clientAppKey": "app_key_here",
"type": "bulk.variant.created",
"time": "2024-12-18 16:45:57",
"data": {
"id": "d5825ee0-47fc-4b9a-b9fc-f2325f31632a",
"object": [
{
"id": 40,
"sku_num": "JDS1231N",
"price": "12.0000",
"quantity": 10,
"images": [
{
"id": 5,
"uuid": "faaf68d4-4d89-4f88-a93e-db8911ca2323",
"alias": "41-40_fondo",
"created_at": "2024-12-18T21:29:35.000000Z",
"updated_at": "2024-12-18T21:29:35.000000Z",
"path": "https://assets.qa1.sticky.io/images/originals/2024-12-18-16-00-00/NUM3QXVVMLTl1M5GBFLo0npxVeaQSF7JzaTt1S1k.png",
"is_default": 0,
"is_default_email": 0
}
],
"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"
}
}
}
]
},
{
"id": 42,
"sku_num": "JDS98432J",
"price": "10.0000",
"quantity": 10,
"images": [],
"attributes": [
{
"id": 84,
"attribute": {
"id": 40,
"name": "color",
"option": {
"id": 43,
"name": "blue"
}
}
},
{
"id": 87,
"attribute": {
"id": 44,
"name": "shape",
"option": {
"id": 45,
"name": "circle"
}
}
}
]
}
],
"created": "2024-12-18 16:45:57",
"triggeringEvent": "",
"correlationId": "3e285f8c-a060-47a0-80a7-257f4043bd67"
}
}

Event Details (bulk.variant.updated)

This webhook fires whenever multiple variants are modified in a single operation.

How to Trigger the Event

Ensure that multiple variants are updated to trigger the bulk event. If only one variant is updated, the variant.updated event will fire instead.

Through the CRM Product UI:

  • Edit Multiple Variants:

    • Select at least two variants from the table.

    • Click on Actions → Edit Selected → Save.

  • Add an Attribute to Multiple Variants:

    • Click on Actions → Add/Edit Attributes → (Add an attribute) → Save.

  • Edit an Attribute for Multiple Variants:

    • Click on Actions → Add/Edit Attributes → (Edit an attribute) → Save.

What Information Will You Receive?

You will receive details of all the updated variants, including their IDs, associated product, updated attributes, and the timestamp of the update.

Decrypted JSON Encoded Payload

{
"clientAppKey": "app_key_here",
"type": "bulk.variant.updated",
"time": "2024-12-18 19:16:49",
"data": {
"id": "99571522-27ba-4ef3-bb69-e0784735a77b",
"object": [
{
"id": 72,
"sku_num": "QWI19230N",
"price": "10.0000",
"quantity": 11,
"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"
}
}
}
]
},
{
"id": 73,
"sku_num": "UAS9122A",
"price": "10.0000",
"quantity": 10,
"images": [],
"attributes": [
{
"id": 84,
"attribute": {
"id": 40,
"name": "color",
"option": {
"id": 43,
"name": "blue"
}
}
},
{
"id": 87,
"attribute": {
"id": 44,
"name": "shape",
"option": {
"id": 45,
"name": "circle"
}
}
}
]
}
],
"created": "2024-12-18 19:16:49",
"triggeringEvent": "",
"correlationId": "919c92db-ef77-41bb-a5e6-7812b0b0d661"
}
}

Event Details (bulk.variant.deleted)

This webhook fires whenever multiple variants are deleted in a single operation.

How to Trigger the Event

Ensure that multiple variants are deleted to trigger the bulk event. If only one variant is deleted, the variant.deleted event will fire instead.

Through the CRM Product UI:

  • Delete Multiple Variants:

    • Select at least two variants from the table.

    • Click on Actions → Delete Selected → Yes.

What Information Will You Receive?

You will receive details of all the deleted variants, including their IDs, associated product information, and the timestamp of deletion.

Decrypted JSON Encoded Payload

{
"clientAppKey": "app_key_here",
"type": "bulk.variant.deleted",
"time": "2024-12-18 19:28:07",
"data": {
"id": "0bb09ca7-28ad-4730-b4c1-a48c33e71689",
"object": [
{
"id": 73
},
{
"id": 74
}
],
"created": "2024-12-18 19:28:07",
"triggeringEvent": "",
"correlationId": "c6ce1d2d-4442-4631-bd0c-fdc762fdc4fb"
}
}

Understanding the Payload

Each bulk webhook payload contains:

  • clientAppKey: Your unique store identifier

  • type: The type of bulk event that occurred

  • time: When the bulk operation happened

  • data: Contains the details of the variants and event

    • id: A unique identifier for this webhook event

    • object: An array of variant data

    • created: Timestamp of when the event was created

    • correlationId: A unique identifier to track related events

Key Differences from Single Variant Webhooks

The main differences in bulk webhook payloads are:

  • The object field contains an array of variants instead of a single variant

  • The event types are prefixed with bulk.

  • These events only trigger when multiple variants are affected by an operation

Did this answer your question?