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:1
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.
2
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.
3
Filter unavailable products
Products not returned by your webhook or marked as out of stock are filtered out.
4
Show results to customer
Only available products with live prices are displayed to the customer.
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.1
AI searches catalog
AI searches “milk” and finds SKUs:
milk-001, milk-002, milk-003.2
VIZOCHOK calls your webhook
3
Your backend responds with prices
4
VIZOCHOK filters and displays
milk-003 is filtered out (out of stock). milk-001 and milk-002 are shown to the customer with correct prices.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.1
AI decides to add product
AI decides to add
milk-001 to cart.2
VIZOCHOK calls your cart webhook
3
Your backend responds
Success:
{"ok": true} — AI confirms: “Added!”Failure: {"ok": false, "reason": "out_of_stock"} — AI: “Sorry, that’s out of stock. Want to try another brand?”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.
1
New conversation starts
Customer sends first message. VIZOCHOK checks if
cart_get_url is configured.2
VIZOCHOK calls your cart GET webhook
3
Your backend returns current cart
Setup
Admin Panel
1
Open Webhook Settings
Log into the Admin Panel, navigate to Settings > Webhooks.
2
Configure Endpoints
Enter the URLs for your webhook endpoints:
- Products URL:
https://your-api.com/api/vizochok/check-products - Cart URL:
https://your-api.com/api/vizochok/cart - Cart GET URL:
https://your-api.com/api/vizochok/cart/items - Timeout: How long VIZOCHOK waits for your response (default: 5 seconds)
3
Save and Note Your Secret
When you save, VIZOCHOK auto-generates a webhook secret if one doesn’t already exist. This secret is used to sign every webhook request with HMAC-SHA256.You can also provide your own secret or rotate it later.
Testing Webhooks
The Admin Panel includes a built-in webhook test under Settings > Webhooks. Click “Test” to send a test request to your products URL and verify connectivity.Request Signing
Every webhook request includes HMAC-SHA256 signature headers:
The signature covers both the timestamp and the request body to prevent replay attacks. See Signature Verification for implementation details.
Error Handling
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.