Why Webhooks?
VIZOCHOK stores your product catalog (names, descriptions, categories) for AI-powered semantic search. However, prices and stock availability change frequently and must come from your system of record. Instead of syncing prices to VIZOCHOK, your backend provides them on-demand when the AI needs them:AI finds matching SKUs
The Catalog DB stores product names, descriptions, and embeddings. When a customer asks for a product, the AI searches and finds matching SKUs.
VIZOCHOK calls your products_url webhook
An HTTP POST request with the matching SKUs is sent to your backend to get current prices and stock.
Filter unavailable products
Products not returned by your webhook or marked as out of stock are filtered out.
Webhook Types
Products Webhook (Required)
Called when the AI needs current prices and availability for specific products. When it fires: After the AI searches the catalog and finds matching products, before showing them to the customer.
Products not returned in the response are treated as unavailable and excluded from results.
See Products Webhook for the complete specification.
Cart Webhook (Recommended)
Called when the AI performs a cart operation (add, remove, update quantity, clear). When it fires: After the AI decides to modify the cart, before confirming the change to the customer.
See Cart Webhook for all four operations.
Cart GET Webhook (Optional)
Called once when a new conversation starts, to load the customer’s existing cart. When it fires: On the first message of a new conversation, ifcart_get_url is configured.
New conversation starts
Customer sends first message. VIZOCHOK checks if
cart_get_url is configured.Request Signing
Every webhook request includes HMAC-SHA256 signature headers:| Header | Value |
|---|---|
X-VIZOCHOK-Signature | sha256=<hex_digest> |
X-VIZOCHOK-Timestamp | Unix timestamp (seconds) |
Content-Type | application/json |
Error Handling
| Scenario | VIZOCHOK Behavior |
|---|---|
| Products webhook timeout/error | All products treated as unavailable |
| Cart webhook timeout/error | {ok: false, reason: "webhook_timeout"} — AI tells customer the operation failed |
| 5xx response | Retries once with 1-second delay |
| Non-200 response | Treats as failure, no retry |
| Products not in response | Filtered out (treated as unavailable) |
Configuration
Webhooks are configured per tenant, either via the admin panel or the API:A webhook secret is auto-generated when you first save webhook settings. You can also provide your own secret or rotate it later. The secret is used for HMAC-SHA256 signing.
Next Steps
Products Webhook
Full request/response specification with handler examples.
Cart Webhook
Handle all four cart operations with validation.
Signature Verification
HMAC-SHA256 verification in Python, Node.js, and Go.