# Create Your App Source: https://docs.vambe.me/docs/app-platform/create-your-app Register an ecommerce app, configure its OAuth and capabilities, and submit it for review. ## Register an app Create your app with a single authenticated request. Authentication uses your Vambe API key in the `x-api-key` header. ```bash theme={null} curl --request POST 'https://api.vambe.me/api/ecommerce-app' \ --header 'x-api-key: your_api_key_here' \ --header 'Content-Type: application/json' \ --data '{ "name": "My Ecommerce X", "description": "Connects My Ecommerce X stores to Vambe.", "logo_url": "https://cdn.myecommerce.com/vambe/logo.png", "website_url": "https://myecommerce.com", "developer_name": "My Ecommerce X Inc.", "contact_email": "integrations@myecommerce.com", "contact_phone": "+56912345678", "oauth": { "authorize_url": "https://myecommerce.com/oauth/authorize", "token_url": "https://myecommerce.com/oauth/token", "client_id": "vambe-client-id", "client_secret": "vambe-client-secret", "scopes": ["read_orders", "read_products"], "account_info_url": "https://api.myecommerce.com/vambe/account" }, "capabilities": { "inbound_events": ["order", "checkout", "fulfillment", "product"], "outbound": { "order_get": { "url": "https://api.myecommerce.com/vambe/orders" }, "stock_get": { "url": "https://api.myecommerce.com/vambe/stock" }, "checkout_create": { "url": "https://api.myecommerce.com/vambe/checkout" } } } }' ``` The response includes a **`signing_secret`**: ```json theme={null} { "id": "f1e2d3c4-…", "slug": "my-ecommerce-x", "status": "draft", "signing_secret": "9b1f…(64 hex chars)…", "...": "..." } ``` > [!WARNING] > > The `signing_secret` is returned **only on creation** (and on rotation). Store it securely — > you need it to sign every inbound webhook. You can rotate it later, but it is never shown > again on read. ## Fields ### Metadata **name** `string` *required* Display name shown to merchants. **slug** `string` Stable identifier. Auto-derived from `name` if omitted; must be unique. **description** `string` *required* Short description shown in the connect UI. **logo\_url** `string (https)` *required* Public URL of your app logo. **website\_url** `string (https)` Your marketing/site URL. ### Contact (required) The Vambe team uses these to reach you during review and operations. **developer\_name** `string` *required* Your company/organization name. **contact\_email** `string` *required* Contact email. **contact\_phone** `string` *required* Contact phone number. ### OAuth See [OAuth Connection](/docs/app-platform/oauth-connection) for the full flow. **oauth.authorize\_url** `string (https)` *required* Where Vambe redirects the merchant to approve scopes. **oauth.token\_url** `string (https)` *required* Where Vambe exchanges the authorization code for tokens. **oauth.client\_id** `string` *required* The client id you issued for Vambe. **oauth.client\_secret** `string` *required* The client secret you issued for Vambe. Stored encrypted at rest. **oauth.scopes** `string[]` Scopes requested during authorization. **oauth.account\_info\_url** `string (https)` Optional. Lets Vambe fetch the store identity after connection — required for multi-store apps. ### Capabilities **capabilities.inbound\_events** `string[]` Which canonical events you commit to pushing: any of `order`, `checkout`, `fulfillment`, `product`. See [Inbound Webhooks](/docs/app-platform/inbound-webhooks). **capabilities.outbound** `object` URLs Vambe calls on demand. Each entry is `{ "url": "https://..." }`. Supported keys: `order_get`, `stock_get`, `checkout_create`. If you omit a key, Vambe simply won't offer that assistant tool for your app. See [Outbound Capabilities](/docs/app-platform/outbound-capabilities). ## Manage and submit **1. Iterate (draft)** Update the app while it is `draft` or `rejected`: ```bash theme={null} curl --request PATCH 'https://api.vambe.me/api/ecommerce-app/{id}' \ --header 'x-api-key: your_api_key_here' \ --header 'Content-Type: application/json' \ --data '{ "description": "Updated copy" }' ``` **2. Submit for review** ```bash theme={null} curl --request POST 'https://api.vambe.me/api/ecommerce-app/{id}/submit' \ --header 'x-api-key: your_api_key_here' ``` This moves the app to `pending_review` and notifies the Vambe team. **3. Get approved** Once Vambe approves it, the app becomes `approved` and is installable by any account. Until then it is visible only to your account. ### Other endpoints | Method | Path | Purpose | | - | - | - | | `GET` | `/api/ecommerce-app` | List your apps. | | `GET` | `/api/ecommerce-app/{id}` | App detail (no secret). | | `POST` | `/api/ecommerce-app/{id}/rotate-secret` | Generate a new signing secret. | | `DELETE` | `/api/ecommerce-app/{id}` | Delete the app. | | `GET` | `/api/ecommerce-app/available` | Apps installable by the current account. | > [!NOTE] > > Editing an `approved` app is blocked — only `draft`/`rejected` apps are editable. Editing a > `rejected` app moves it back to `draft` so you can resubmit. # Inbound Webhooks Source: https://docs.vambe.me/docs/app-platform/inbound-webhooks Push canonical events (orders, checkouts, fulfillment, products) to Vambe. Vambe ingests them into the same pipeline as native integrations. ## Overview Your platform **pushes** events to Vambe as they happen. Each event is a canonical JSON payload — you map your own data onto Vambe's shape, so there is no per-provider code on Vambe's side. All inbound endpoints are: ``` POST https://api.vambe.me/api/public/apps/{appId}/events/{event} ``` | Event | Path | Purpose | | - | - | - | | Order | `/events/order` | A paid/created order. | | Checkout | `/events/checkout` | An abandoned checkout to recover. | | Fulfillment | `/events/fulfillment` | A shipment created/updated. | | Product upsert | `/events/product` | Create or update a product. | | Product delete | `/events/product/delete` | Remove a product. | ## Authenticating your webhooks Every request must be signed with your app's **signing secret** (the `signing_secret` from [Create Your App](/docs/app-platform/create-your-app)). Compute an HMAC-SHA256 (hex) over the string `{timestamp}.{rawBody}` and send: | Header | Value | | - | - | | `x-vambe-timestamp` | Current time in epoch milliseconds. | | `x-vambe-signature` | `HMAC_SHA256(signing_secret, "{timestamp}.{rawBody}")` as hex. | > [!WARNING] > > Sign and send the **exact same body bytes**. Vambe verifies the signature against the raw > request body — re-serializing differently will fail verification. Requests older than > **5 minutes** are rejected. ```javascript theme={null} import crypto from 'crypto'; function postEvent(appId, event, payload, signingSecret) { const timestamp = Date.now().toString(); const body = JSON.stringify(payload); // sign and send these exact bytes const signature = crypto .createHmac('sha256', signingSecret) .update(`${timestamp}.${body}`) .digest('hex'); return fetch(`https://api.vambe.me/api/public/apps/${appId}/events/${event}`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-vambe-timestamp': timestamp, 'x-vambe-signature': signature, }, body, }); } ``` A `2xx` response means the event was accepted. **Retry on any non-2xx** — Vambe is idempotent on the entity's external id. ## The envelope Every payload is an envelope with two optional routing fields plus the entity: ```json theme={null} { "external_store_id": "store_12345", "event_id": "evt_abc", "order": { "...": "..." } } ``` **external\_store\_id** `string` Your identifier for the merchant store. Used to resolve the installation (see below). **event\_id** `string` Your event id. Advisory today; reserved for explicit de-duplication. ### Resolving the installation A single app can be installed by many merchants, so Vambe must map each webhook to the right installation: * **Multi-store:** send `external_store_id` matching the `external_id` Vambe captured from your [`account_info_url`](/docs/app-platform/oauth-connection). Vambe resolves by `(app, external_id)`. * **Single installation:** if the app has exactly one installation, it resolves automatically even without `external_store_id`. If no installation can be resolved, Vambe responds `404`. ## Order `POST /api/public/apps/{appId}/events/order` ```json theme={null} { "external_store_id": "store_12345", "order": { "external_id": "1001", "external_name": "#1001", "currency": "CLP", "total_price": 29990, "status_url": "https://myecommerce.com/orders/1001/status", "details_url": "https://admin.myecommerce.com/orders/1001", "customer": { "name": "Jane Doe", "phone": "+56912345678", "email": "jane@example.com" }, "line_items": [ { "external_product_id": "sku-001", "quantity": 2 } ], "metadata": { "note": "gift wrap" }, "external_checkout_id": "chk_abc123" } } ``` > [!NOTE] > > The customer **phone** is the most important field: it is how Vambe links the order to the > WhatsApp contact. Send it in E.164 format when possible. Products are matched by > `external_product_id` against the catalog you synced. > [!NOTE] > > **`external_checkout_id` attributes the sale.** When the order was paid through a checkout > Vambe requested via > [`checkout_create`](/docs/app-platform/outbound-capabilities#sale-attribution), include the > same id you returned there. Vambe uses it to credit the sale to the assistant conversation > that produced the checkout. Omit it (or send `null`) for orders that did not come from a > Vambe checkout. ## Checkout (abandoned) `POST /api/public/apps/{appId}/events/checkout` ```json theme={null} { "external_store_id": "store_12345", "checkout": { "external_id": "chk_555", "external_name": "Checkout 555", "currency": "CLP", "total_price": 19990, "recover_url": "https://myecommerce.com/checkout/chk_555", "details_url": "https://admin.myecommerce.com/checkouts/chk_555", "customer": { "name": "Jane Doe", "phone": "+56912345678", "email": "jane@example.com" }, "line_items": [ { "external_product_id": "sku-001", "quantity": 1 } ] } } ``` > [!NOTE] > > `customer.phone` and `recover_url` are required for recovery: Vambe resolves (or creates) the > contact by phone and records the abandoned checkout with its recovery link. For checkouts that > Vambe requested via `checkout_create`, `external_id` must be the same id you returned as > `external_checkout_id` — that is how the abandoned checkout is tied back to the conversation. ## Fulfillment `POST /api/public/apps/{appId}/events/fulfillment` ```json theme={null} { "external_store_id": "store_12345", "fulfillment": { "order_external_id": "1001", "fulfillment_external_id": "ful_900", "tracking_number": "TRACK123", "type": "delivery", "delivery_address": { "recipient_name": "Jane Doe", "phone": "+56912345678", "address_line_1": "Av. Siempre Viva 742", "address_line_2": null, "city": "Santiago", "region": "RM", "country": "CL", "postal_code": "8320000" } } } ``` | Field | Notes | | - | - | | `order_external_id` | Links the shipment to the order. | | `fulfillment_external_id` | Unique id of this fulfillment (Vambe upserts on it). | | `type` | `delivery` or `pickup` (defaults to `delivery`). | ## Products Products are **incremental** — each event affects only the product you send. Vambe never deletes the rest of your catalog from a webhook. ### Upsert (create or update) `POST /api/public/apps/{appId}/events/product` ```json theme={null} { "external_store_id": "store_12345", "product": { "external_id": "sku-001", "name": "Premium Coffee Beans", "description": "Arabica from Colombia, medium roast.", "price": 12990, "currency": "CLP", "sku": "COF-001", "file_url": "https://cdn.myecommerce.com/coffee.jpg", "image_urls": ["https://cdn.myecommerce.com/coffee.jpg"], "metadata": [{ "key": "roast", "value": "medium" }] } } ``` Vambe upserts by `(external_id, store)`: a new `external_id` is created, an existing one is updated. Product embeddings (for AI search and recommendations) run automatically. ### Delete `POST /api/public/apps/{appId}/events/product/delete` ```json theme={null} { "external_store_id": "store_12345", "external_id": "sku-001" } ``` This soft-deletes the product for that store. > [!NOTE] > > Catalog over webhook is the **push** model. If you'd rather have Vambe **pull** your full > catalog instead, that is handled by the `products_list` outbound capability — talk to the > Vambe team about which model fits your platform. # Custom Ecommerce Apps Overview Source: https://docs.vambe.me/docs/app-platform/introduction Build a full ecommerce integration with Vambe by registering an app. You write the code on your side; Vambe never has to write code to integrate with you. ## What are Custom Ecommerce Apps? **Custom Ecommerce Apps** let any ecommerce provider build a first-class integration with Vambe — products, orders, abandoned checkouts, fulfillment and live assistant tools — **without Vambe writing any code for you**. You register an app, implement a small, well-defined contract, and Vambe handles the rest. It works in two directions: > [card] Inbound — you push to Vambe > > Your platform sends canonical webhooks (orders, checkouts, fulfillment, products) > to Vambe. Vambe ingests them into the same pipeline used by native integrations. > [card] Outbound — Vambe calls you > > When the AI assistant needs live data (order status, stock, a checkout link), > Vambe calls URLs you declared, authenticated with the merchant's OAuth token. ## Core model There are two distinct concepts: | Concept | What it is | Who owns it | | - | - | - | | **App** | The integration definition you register once: metadata, OAuth config, and which capabilities you support. | You (the provider) | | **Installation** | A single merchant connecting their store to your app via OAuth. Each installation holds that merchant's access token. | A Vambe account (the merchant) | One approved app can be installed by many merchants. Every webhook and every outbound call is scoped to a single installation. ## How a provider integrates — end to end **1. Register your app** Create the app with your metadata, contact details, OAuth endpoints, and the capabilities you support. You receive a **signing secret** (shown once). **2. Test on your own account** While unapproved, your app is visible only to the account that created it. Install it on your own store and exercise the full flow. **3. Submit for review** Submit the app. The Vambe team is notified and reviews it. Once approved, the app becomes available to every Vambe account. **4. Merchants connect via OAuth** A merchant clicks **Connect** in Vambe and is redirected to your site to approve permissions. Vambe exchanges the code for an access token and stores the installation. **5. Data flows both ways** You push canonical webhooks; Vambe calls your capability URLs on demand. No per-provider code on Vambe's side. ## App lifecycle An app moves through these states: | State | Visible to | Meaning | | - | - | - | | `draft` | Creator only | Being built/edited. | | `pending_review` | Creator only | Submitted; awaiting Vambe approval. | | `approved` | All accounts | Live and installable by any merchant. | | `rejected` | Creator only | Needs changes; edit and resubmit. | | `suspended` | Nobody | Disabled by Vambe; stops receiving events and outbound calls. | > [!NOTE] > > The connection between a merchant and your app is **always OAuth 2.0**. Merchants never > type API keys into Vambe — they approve scopes on your own page. ## Next steps > [card] [Create your app](/docs/app-platform/create-your-app) > > Register the app and get your signing secret. > [card] [OAuth connection](/docs/app-platform/oauth-connection) > > Implement the merchant connection flow. > [card] [Inbound webhooks](/docs/app-platform/inbound-webhooks) > > Push orders, checkouts, fulfillment and products. > [card] [Outbound capabilities](/docs/app-platform/outbound-capabilities) > > Answer the assistant's live data requests. # OAuth Connection Source: https://docs.vambe.me/docs/app-platform/oauth-connection Merchants connect to your app via standard OAuth 2.0. Vambe redirects them to your site, exchanges the code, and stores an access token per installation. ## Why OAuth A merchant connects their store to your app **only through OAuth 2.0 authorization code**. They are redirected to *your* site to approve scopes — Vambe never collects their credentials in a form. The access token you return is the credential Vambe uses for every [outbound call](/docs/app-platform/outbound-capabilities). ## Fixed redirect URI Register this exact callback in your OAuth app: ``` https://api.vambe.me/api/public/apps/oauth/callback ``` ## The flow **1. Merchant starts the connection** In Vambe the merchant clicks **Connect** on your app. Vambe builds the authorization URL from your `oauth.authorize_url` and redirects the merchant's browser to: ``` {authorize_url} ?response_type=code &client_id={your client_id} &redirect_uri=https://api.vambe.me/api/public/apps/oauth/callback &scope={space-separated scopes} &state={opaque, signed by Vambe} ``` > [!WARNING] > > Treat `state` as opaque and echo it back unchanged. It is encrypted by Vambe and binds > the callback to the right app and merchant. **2. Merchant approves on your site** Your authorization page authenticates the merchant and asks them to approve the scopes. **3. You redirect back with a code** Redirect to the fixed `redirect_uri` with the `code` and the original `state`: ``` https://api.vambe.me/api/public/apps/oauth/callback?code={auth_code}&state={state} ``` **4. Vambe exchanges the code** Vambe POSTs your `oauth.token_url` (`application/x-www-form-urlencoded`): ``` grant_type=authorization_code code={auth_code} redirect_uri=https://api.vambe.me/api/public/apps/oauth/callback client_id={your client_id} client_secret={your client_secret} ``` Respond with JSON: ```json theme={null} { "access_token": "the-merchant-access-token", "refresh_token": "optional", "expires_in": 3600, "scope": "read_orders read_products" } ``` > [!NOTE] > > The `access_token` you return is sent back to you as `Authorization: Bearer …` on every > outbound call. Make it a token that authorizes API access for that specific store. **5. (Optional) Vambe fetches the store identity** If you set `oauth.account_info_url`, Vambe immediately calls it (`GET`, with `Authorization: Bearer {access_token}`) and expects: ```json theme={null} { "external_id": "store_12345", "name": "Acme Store" } ``` Vambe stores `external_id` on the installation. This is **required for multi-store apps**: it lets inbound webhooks resolve which merchant an event belongs to (see [Inbound Webhooks → resolving the installation](/docs/app-platform/inbound-webhooks#resolving-the-installation)). ## After connection Vambe creates an installation (an api token) bound to your app, holding the merchant's `access_token` (encrypted) and `external_id`. From here: * You can start pushing [inbound webhooks](/docs/app-platform/inbound-webhooks) for that store. * Vambe can call your [outbound capabilities](/docs/app-platform/outbound-capabilities) for that store. > [!NOTE] > > Token refresh: store the `refresh_token` and `expires_in` you return; managed refresh on > Vambe's side is on the roadmap. For now, return long-lived access tokens or tokens you can > validate server-side on each outbound call. # Outbound Capabilities Source: https://docs.vambe.me/docs/app-platform/outbound-capabilities Expose URLs that Vambe calls on demand so the AI assistant can fetch live order status, stock, and create checkout links. ## Overview Some assistant tools need **live** data that does not arrive via webhooks — "where is my order?", "is this in stock?", "send me a checkout link". For those, Vambe calls URLs you declare in `capabilities.outbound`. You expose an endpoint per capability; Vambe calls it on demand. If you don't declare a capability, Vambe simply won't offer that tool for your app. ## How Vambe calls you Every outbound request is an HTTP `POST` with a JSON body and these headers: | Header | Value | | - | - | | `Authorization` | `Bearer {access_token}` — the merchant's OAuth token from connection. | | `X-Vambe-Store-Id` | The store's `external_id` (from `account_info_url`), when available. | | `Content-Type` | `application/json` | Use the bearer token (and store id) to scope the response to the right merchant. > [!WARNING] > > **Security requirements.** Capability URLs must be **HTTPS** and must resolve to a public IP — > Vambe blocks requests to private, loopback, and link-local addresses. Respond within **\~15 > seconds**; on timeout or error Vambe degrades gracefully (the tool returns no data). ## `order_get` — live order status Vambe calls this when the assistant is asked about an order's status. **Request** ```json theme={null} { "order_id": "vambe-internal-uuid", "order_external_id": "1001" } ``` **Response** — the canonical order status shape: ```json theme={null} { "fulfillmentStatus": "fulfilled", "statusPageUrl": "https://myecommerce.com/orders/1001/status", "financialStatus": "paid", "tags": [], "shippingLine": { "title": "Standard", "deliveryCategory": "shipping" }, "createdAt": "2026-06-10T12:00:00Z", "cancelledAt": null, "closedAt": null, "cancelReason": null, "fulfillments": [ { "status": "delivered", "deliveredAt": "2026-06-12T09:30:00Z", "fulfillmentAt": "2026-06-10T18:00:00Z", "estimatedDeliveryAt": "2026-06-12T00:00:00Z", "trackingInfo": [ { "company": "Correos", "number": "TRACK123", "url": "https://track/TRACK123" } ], "items": [{ "quantity": 2, "variantName": "Premium Coffee Beans" }] } ] } ``` All fields except `fulfillmentStatus`, `tags`, and `fulfillments` are optional. ## `stock_get` — stock by location Vambe calls this when the assistant needs live inventory. **Request** ```json theme={null} { "product_external_ids": ["sku-001", "sku-002"] } ``` **Response** — an array, one entry per product: ```json theme={null} [ { "externalId": "sku-001", "locations": [ { "locationName": "Main Warehouse", "locationAddress": "Santiago, CL", "stockQuantity": 12 }, { "locationName": "Store #2", "locationAddress": "Valparaíso, CL", "stockQuantity": 0 } ] } ] ``` ## `checkout_create` — create a checkout link Vambe calls this when the assistant builds a cart and needs a payable link to send the customer. **Request** ```json theme={null} { "items": [ { "external_product_id": "sku-001", "quantity": 2 } ], "customer": { "checkoutEmail": "jane@example.com", "name": "Jane", "lastName": "Doe", "address": "Av. Siempre Viva 742", "city": "Santiago" }, "ai_contact_id": "contact-uuid", "assistant_id": "assistant-uuid", "marketplace_source": "whatsapp" } ``` **Response** — the checkout link (full URL; Vambe shortens it before sending) and the id of the checkout you created: ```json theme={null} { "link": "https://myecommerce.com/checkout/abc123", "external_checkout_id": "chk_abc123", "stockAdjustments": [ { "productExternalId": "sku-001", "requestedQuantity": 2, "availableStock": 1, "adjustedQuantity": 1 } ] } ``` `external_checkout_id` is **required**: it is your own id for the checkout behind the link. Vambe records at this moment which conversation produced the checkout, keyed by that id — see [Sale attribution](#sale-attribution) below. If your ids are numeric, send them as numbers or as strings — Vambe accepts both here and on the order and checkout webhooks, and stores them in their string form. Ids above JSON's safe integer range (2^53 - 1, i.e. `9007199254740991`) **must** be sent as strings: above that, JSON parsers silently round the value and two different checkouts can collapse onto the same id, so Vambe rejects them. `stockAdjustments` is optional — include it if you clamped quantities to available stock. Return `{ "link": null }` if a link cannot be created; you may add an optional `error` string explaining why (it is logged on Vambe's side, never shown to the shopper). ### Sale attribution When the shopper later pays, your [order webhook](/docs/app-platform/inbound-webhooks) must include the same id as `external_checkout_id`. That is the only thing Vambe needs to credit the sale to the assistant conversation that produced it: 1. You respond to `checkout_create` with `external_checkout_id`. 2. Vambe stores the attribution (conversation ↔ checkout) on its side. 3. Your order webhook repeats `external_checkout_id`; Vambe looks the checkout up and attributes the order. If the response omits `external_checkout_id`, the link still reaches the shopper but the sale can never be attributed — the app checklist fails the `checkout_create` check for this reason. One checkout attributes at most one order. ## Reserved capability — `products_list` If you prefer Vambe to **pull** your full catalog instead of pushing product webhooks, the `products_list` capability key is reserved for that model. Coordinate with the Vambe team before relying on it. # Reference Source: https://docs.vambe.me/docs/app-platform/reference Security model, lifecycle, event types, supported currencies and operational notes for Custom Ecommerce Apps. ## Security model | Direction | Auth | Detail | | - | - | - | | Inbound (you → Vambe) | HMAC-SHA256 | Sign `{timestamp}.{rawBody}` with your `signing_secret`; send `x-vambe-signature` + `x-vambe-timestamp`. 5-minute freshness window. | | Outbound (Vambe → you) | Bearer token | Vambe sends `Authorization: Bearer {merchant access_token}` + `X-Vambe-Store-Id`. | | OAuth state | Encrypted | The `state` parameter is encrypted by Vambe; echo it back unchanged. | | Secrets at rest | AES-256 | Your `client_secret` and the app `signing_secret` are encrypted at rest. | > [!NOTE] > > Rotate your signing secret anytime with `POST /api/ecommerce-app/{id}/rotate-secret`. The new > secret is returned once; update your webhook signer before the old one stops being used. ### Outbound URL requirements * **HTTPS only.** * Must resolve to a **public IP** — private, loopback and link-local addresses are blocked (SSRF protection). * Respond within **\~15 seconds**. ## App lifecycle | State | Visible to | Editable | Receives events | | - | - | - | - | | `draft` | Creator | Yes | Yes (creator's own installs) | | `pending_review` | Creator | No | Yes | | `approved` | All accounts | No | Yes | | `rejected` | Creator | Yes (→ draft) | No | | `suspended` | Nobody | No | No | ## Event types ### Inbound (`capabilities.inbound_events`) | Event | Endpoint | | - | - | | `order` | `POST /api/public/apps/{appId}/events/order` | | `checkout` | `POST /api/public/apps/{appId}/events/checkout` | | `fulfillment` | `POST /api/public/apps/{appId}/events/fulfillment` | | `product` | `POST /api/public/apps/{appId}/events/product` and `…/product/delete` | ### Outbound (`capabilities.outbound`) | Capability | Tool it powers | | - | - | | `order_get` | Live order status ("where is my order?") | | `stock_get` | Stock by location | | `checkout_create` | Checkout link generation + sale attribution (via `external_checkout_id`) | | `products_list` | Reserved — catalog pull (coordinate with Vambe) | ## Supported currencies ISO codes accepted in `currency` / `total_price` / `price` fields: ``` CLP, USD, MXN, BRL, UF, ARS, COP, UYU, PEN, EUR, HNL, BOB, PYG, GTQ, NIO, PAB, CRC, DOP, VES, BZD, SRD, GYD ``` ## Operational notes * **Idempotency.** Orders, checkouts, fulfillments and products upsert on their external id — safe to retry. Always retry on non-2xx; webhooks may be redelivered. * **Product sync is incremental.** A product webhook only affects the product it carries; it never deletes the rest of your catalog. * **Multi-store resolution** depends on `account_info_url` populating `external_id`. Without it, only single-installation apps resolve automatically. * **Graceful degradation.** If an outbound capability is missing, slow, or errors, the corresponding assistant tool simply returns no data — it does not break the conversation. ## Endpoint cheat-sheet | Method | Path | Auth | Who | | - | - | - | - | | `POST` | `/api/ecommerce-app` | `x-api-key` | Provider | | `PATCH` | `/api/ecommerce-app/{id}` | `x-api-key` | Provider | | `POST` | `/api/ecommerce-app/{id}/submit` | `x-api-key` | Provider | | `POST` | `/api/ecommerce-app/{id}/rotate-secret` | `x-api-key` | Provider | | `GET` | `/api/ecommerce-app/available` | `x-api-key` | Merchant | | `GET` | `/api/public/apps/oauth/callback` | OAuth state | Provider redirect | | `POST` | `/api/public/apps/{appId}/events/{event}` | HMAC | Provider | # Connect your first channel Source: https://docs.vambe.me/docs/connect-channel Set up WhatsApp, Instagram, Webchat, or Messenger to start receiving customer messages in Vambe. ## 🌐 What you'll build You'll connect at least one communication channel to Vambe so customers can reach you through their preferred platform. > [!TIP] > > Channels are where your customers will interact with your AI assistants and > human agents. You can connect multiple channels to the same pipeline. *** ## Why Connect Channels? Without connected channels, your AI assistants and pipelines can't receive real customer messages. Channels are the entry points where customers start conversations that flow through your sales funnels. ### Supported Channels > [card] WhatsApp > > **Most popular for direct communication** > > * Personal, instant messaging > * High engagement rates > * Support for media, documents > * Business API integration > [card] Instagram > > **Perfect for social media engagement** > > * Comments and direct messages > * Visual content support > * Young demographic reach > * Business profile integration > [card] Webchat > > **Essential for website visitors** > > * Embedded on your website > * Real-time visitor support > * No app installation required > * Professional appearance > [card] Messenger > > **Great for Facebook users** > > * Facebook ecosystem integration > * Automated responses > * Rich media support > * Business page connection *** ## Prerequisites Before connecting channels, ensure you have: * ✅ Completed the [Quickstart guide](/docs/quickstart) * ✅ A Vambe account with **Owner** role * ✅ Business accounts for the platforms you want to connect > [!WARNING] > > **Important:** You'll need business/professional accounts for WhatsApp > Business API and Instagram Business. Personal accounts have limited > functionality. *** ## Channel Setup Guides Choose the channel that best fits your business needs and follow the detailed setup guide: > [accordion] Platform Settings & Account Management > > **Start here** - Learn how to manage your account and basic platform settings before connecting specific channels. > > > [card] [Account Setup Guide](https://www.skool.com/vambe/classroom/c8a9223e?md=4275437de7cd49e695abcb0fa1805e81) > > > > Comprehensive guide for managing your Vambe account, user permissions, and platform configuration. > > **What you'll learn:** > > * Account and user management > * Permission and role configuration > * Basic platform navigation > * Security settings > [accordion] WhatsApp Business API (Dual Numbers) > > **Advanced WhatsApp setup** - Connect multiple WhatsApp numbers to the same Vambe account for larger operations. > > > [card] [Dual WhatsApp API Setup](https://www.skool.com/vambe/classroom/b9d85b56?md=8c0cf6cff5304cc2867752346ad661a6) > > > > Step-by-step guide for connecting two WhatsApp Business numbers to increase capacity and coverage. > > **Best for:** > > * Large businesses with high message volume > * Multiple departments or regions > * Redundancy and load distribution > * A/B testing different approaches > [accordion] WhatsApp Business API (Single Number) > > **Standard WhatsApp setup** - Connect one WhatsApp Business number for most businesses. > > > [card] [Single WhatsApp API Setup](https://www.skool.com/vambe/classroom/b9d85b56?md=78852de8849b4e039fe88411db8a2571) > > > > Complete guide for connecting your WhatsApp Business API to Vambe with full automation features. > > **Best for:** > > * Small to medium businesses > * Single customer service team > * Straightforward messaging needs > * Getting started with WhatsApp automation > [accordion] Instagram Business Integration > > **Social media engagement** - Connect Instagram to capture leads from comments and direct messages. > > > [card] [Instagram Connection Guide](https://www.skool.com/vambe/classroom/b9d85b56?md=2a6c6a138faa4082ba7cbf3d0b7d5266) > > > > Learn how to link your Instagram Business account for automated comment responses and DM management. > > **Features:** > > * Automatic comment responses > * Direct message automation > * Lead capture from social posts > * Integration with your sales pipeline > [accordion] WhatsApp QR Code (Quick Setup) > > **Fastest setup option** - Get started immediately by scanning a QR code with your WhatsApp. > > > [card] [QR Code Setup Guide](https://www.skool.com/vambe/classroom/b9d85b56?md=49ca73a0cb8143a3a681e0dd59f4f8af) > > > > Quick setup method using QR code scanning - perfect for testing and small-scale operations. > > **Best for:** > > * Quick testing and setup > > * Small businesses > > * Personal WhatsApp numbers > > * Temporary or trial setups > > > [!NOTE] > > > > QR code setup has some limitations compared to Business API. For production use, consider the Business API options. *** ## Setup Process Overview Regardless of which channel you choose, the general process follows these steps: **1. Prepare Your Accounts** * Ensure you have business accounts for your chosen platforms * Gather necessary credentials and permissions * Verify account ownership and admin access **2. Access Channel Settings** Navigate to your Vambe dashboard and find the channel configuration section. **3. Follow Platform-Specific Guide** Use the detailed guides above for your chosen channel. Each platform has unique requirements and steps. **4. Test Your Connection** * Send a test message to verify the connection works - Confirm messages appear in your Vambe dashboard - Test basic AI responses if you have a pipeline configured **5. Configure Channel Settings** * Set up welcome messages * Configure business hours * Customize automatic responses * Connect to your pipeline (if created) *** ## Multi-Channel Strategy > [!NOTE] > > **Pro Tip:** You can connect multiple channels to the same pipeline, allowing > customers to reach you through their preferred platform while maintaining > consistent service. ### Channel Selection Guide | Business Type | Recommended Channels | Priority Order | | - | - | - | | **E-commerce** | WhatsApp + Webchat + Instagram | 1. Webchat 2. WhatsApp 3. Instagram | | **B2B Services** | WhatsApp + Webchat | 1. WhatsApp 2. Webchat | | **Local Business** | WhatsApp + Facebook Messenger | 1. WhatsApp 2. Messenger | | **Content Creator** | Instagram + WhatsApp | 1. Instagram 2. WhatsApp | | **SaaS/Tech** | Webchat + WhatsApp | 1. Webchat 2. WhatsApp | ### Best Practices > [card] Consistent Messaging > > * Use the same AI assistant across all channels > * Maintain consistent tone and responses > * Ensure brand voice is uniform > * Train assistants with the same knowledge base > [card] Channel-Specific Optimization > > * Customize welcome messages per channel - Adjust response timing for platform > norms - Use platform-specific features (e.g., Instagram Stories) - Respect > platform communication styles > [card] Performance Monitoring > > * Track engagement rates per channel - Monitor response times and quality - > Analyze conversion rates by source - Optimize based on channel performance > [card] Customer Experience > > * Allow customers to choose their preferred channel > * Provide consistent service quality everywhere > * Maintain conversation history across sessions > * Offer seamless handoffs between channels *** ## Troubleshooting Common Issues > [accordion] Connection Failed > > **If your channel won't connect:** > > * Verify you have admin/owner permissions on the platform account > * Check that business verification is complete (for WhatsApp/Instagram Business) > * Ensure you're using the correct credentials > * Try disconnecting and reconnecting > * Contact support if issues persist > [accordion] Messages Not Appearing > > **If messages aren't showing in Vambe:** > > * Confirm the channel connection is active (green status) > * Check webhook configurations are correct > * Verify message permissions are granted > * Test with a simple text message first > * Review platform API status pages > [accordion] AI Not Responding > > **If your AI assistant isn't replying:** > > * Ensure you have a pipeline configured and connected > * Check that your AI assistant has training data > * Verify API key permissions are sufficient > * Test with simple, clear messages > * Review your pipeline trigger conditions *** ## Get Your Channel IDs Once your channels are connected, you can retrieve their IDs using the Vambe API. This is useful for integrations, webhooks, and analytics tracking. ```bash cURL theme={null} curl -X GET \ -H "x-api-key: YOUR_API_KEY" \ https://api.vambe.me/api/public/channels/{channelType} ``` ```javascript JavaScript theme={null} const response = await fetch( 'https://api.vambe.me/api/public/channels/whatsapp', { headers: { 'x-api-key': process.env.VAMBE_API_KEY }, }, ); const channel = await response.json(); ``` ```python Python theme={null} import requests response = requests.get( 'https://api.vambe.me/api/public/channels/whatsapp', headers={'x-api-key': os.environ['VAMBE_API_KEY']} ) channel = response.json() ``` ### Available Channel Types | Channel Type | Description | API Parameter | | - | - | - | | WhatsApp | WhatsApp Business API or QR | `whatsapp` | | Instagram | Instagram Business | `instagram` | | Webchat | Website embedded chat | `web-whatsapp` | | Messenger | Facebook Messenger | `playground` | ### Expected Response ```json theme={null} { "id": "channel_abc123", "type": "whatsapp", "name": "WhatsApp Business", "status": "connected", "created_at": "2025-01-01T12:00:00Z", "settings": { "phone_number": "+1234567890", "business_verified": true } } ``` > [!TIP] > > Save your channel IDs - you'll need them for webhook configurations, analytics > tracking, and API integrations. *** ## Next Steps > [!TIP] > > Congratulations! Your channel is now connected and ready to receive customer > messages. Now you can: > [card] [Create Your First Pipeline](/docs/create-pipeline) > > Build AI-powered sales funnels to automatically handle customer conversations > [card] [Configure AI Assistants](/docs/create-pipeline) > > Train your AI with company knowledge and sales processes > [card] [Set Up Webhooks](/docs/webhooks) > > Get real-time notifications when customers message you > [card] [Monitor Analytics](/docs/analytics) > > Track performance and optimize your customer interactions > [!NOTE] > > **Need help?** Each platform guide includes troubleshooting steps and common > solutions. For additional support, contact our team or check the community > forums. # Connect WhatsApp Business API Source: https://docs.vambe.me/docs/connect-whatsapp-api Set up official Meta WhatsApp Business API integration with Vambe for scalable messaging. ## 🚀 What you'll build You'll connect your WhatsApp Business API account with Vambe to send official WhatsApp messages, templates, and automated responses at scale. > [!TIP] > > WhatsApp Business API is Meta's official solution for businesses to > communicate with customers. It provides higher limits, better reliability, and > advanced features compared to WhatsApp QR. *** ## Prerequisites Before connecting WhatsApp Business API, ensure you have: * ✅ A **Meta Business Account** (formerly Facebook Business Manager) * ✅ **WhatsApp Business API** access approved by Meta * ✅ A verified **phone number** for your business * ✅ Completed [Quickstart guide](/docs/quickstart) with valid API key > [!WARNING] > > **Important:** WhatsApp Business API requires approval from Meta and has > different requirements than regular WhatsApp Business. The verification > process can take several days. *** ## Understanding WhatsApp Business API ### API vs QR Connection > [card] WhatsApp Business API > > **Official Meta integration for businesses** > > * Higher message limits (1000+ per day) > * Template message support > * Webhook integrations > * Business verification required > * Costs per message > * Advanced automation features > [card] WhatsApp QR Setup > > **Quick scan-and-go setup** > > * Limited daily messages (\~250) > * Personal/small business use > * Free to use > * No templates required > * Basic automation > * Easy setup in minutes ### When to Use Business API Choose WhatsApp Business API when you need: * **High volume messaging** (>250 messages/day) * **Template messages** for notifications, confirmments, updates * **Official business presence** with green checkmark verification * **Advanced automation** with webhooks and integrations * **Customer support at scale** with multiple agents * **E-commerce integrations** with order updates and confirmations *** ## Prerequisites Before starting the setup, ensure you have: > [card] Required Items > > * **Phone number** that can receive SMS or calls - **Available number** - > not currently linked to any WhatsApp account - **Active Meta Business > Portfolio** - same account where you manage Facebook ads - **Admin access** > to your Meta Business Manager account > [!WARNING] > > **Important:** The phone number must not be currently associated with any > WhatsApp account (personal or business). You'll need to use a completely new > number. *** ## Step-by-Step Vambe Setup Based on the official Vambe guide from [`Skool - WhatsApp API Setup`](https://www.skool.com/vambe/classroom/b9d85b56?md=78852de8849b4e039fe88411db8a2571), follow these steps: **1. Add WhatsApp API in Vambe** In your Vambe dashboard: * Click **"Platform Settings"** in the upper right corner * Go to **Channels** section * Click **"Add Channel"** button at the bottom * Select **"WhatsApp API"** * Choose **"Register Phone Number"** **2. Meta Business Login** A new tab will open: * **Sign in** with your Facebook Business account * Click **"Continue"** * Click **"Get Started"** > [!NOTE] > > Make sure you're using the same Meta account where you manage your business ads and have admin access. **3. Complete Business Information** Fill out your company details: * **Select** your business commercial portfolio * **Enter** your company name * **Provide** your company website URL * **Select** your country > [!TIP] > > Use the same business information that's verified in your Meta Business Manager to avoid approval delays. **4. Create WhatsApp Business Profile** Set up your WhatsApp Business account: **If you already have a WhatsApp Business account:** * Select your existing account from the dropdown **If you need to create a new profile:** * Choose **"Create new profile"** * Enter **WhatsApp Business account name** * Set **display name** (visible to customers) * Select your **business category** **5. Associate Phone Number** Link your phone number: * **Enter** the phone number you want to link * **Select** option to receive verification code via **SMS** > [!WARNING] > > **CRITICAL:** You'll receive a code in format **XXX XXX**. Save this code - you'll need to enter it **twice** during the process. **6. Verify the Code** Complete the verification: * **Enter** the received verification code * **Review** all information for accuracy * Click **"Continue"** * Click **"Finish"** > [!NOTE] > > The verification code format is XXX XXX (with space). Make sure to enter it exactly as received. **7. Connect with Vambe** Return to Vambe platform: * You'll **automatically return** to Vambe dashboard * **Re-enter** the verification code (format: XXX XXX) * **Select the pipeline** where you want to associate this phone number > [!TIP] > > Success! Your WhatsApp API number is now linked to Vambe and ready to automate conversations. *** ## Verify Your Connection Once setup is complete, test your WhatsApp API connection: ```bash Test via Vambe API theme={null} curl -X GET \ -H "x-api-key: YOUR_API_KEY" \ https://api.vambe.me/api/public/channels/whatsapp ``` ```javascript Check Connection Status theme={null} const response = await fetch( 'https://api.vambe.me/api/public/channels/whatsapp', { headers: { 'x-api-key': process.env.VAMBE_API_KEY }, }, ); const channel = await response.json(); console.log('WhatsApp Status:', channel.status); ``` ```python Verify Setup theme={null} import requests response = requests.get( 'https://api.vambe.me/api/public/channels/whatsapp', headers={'x-api-key': os.environ['VAMBE_API_KEY']} ) if response.status_code == 200: channel = response.json() print(f"WhatsApp API connected: {channel['status']}") ``` > [!TIP] > > You can also send a test message from a personal WhatsApp to your business > number to verify that messages appear in your Vambe dashboard. *** ## Troubleshooting Common Issues > [accordion] Phone Number Already in Use > > **If you get an error that the number is already linked:** > > * Ensure the number isn't connected to any other WhatsApp account > * Check if it's linked to personal WhatsApp or WhatsApp Business app > * Try using a completely new, unused phone number > * Contact Meta support if you believe this is an error > [accordion] Verification Code Issues > > **If you don't receive the XXX XXX verification code:** > > * Check your phone can receive SMS messages > * Verify the phone number was entered correctly with country code > * Wait a few minutes and try requesting the code again > * Ensure the number has good cellular coverage > * Try the voice call option if SMS doesn't work > [accordion] Meta Business Account Problems > > **If you can't access Meta Business Manager:** > > * Ensure you have admin permissions on the business account > * Verify your Meta account is not restricted or suspended > * Check that your business is verified in Meta Business Manager > * Make sure you're using the correct Facebook account > * Clear browser cache and cookies, try incognito mode > [accordion] Connection Failed in Vambe > > **If the final Vambe connection doesn't work:** > > * Double-check you entered the verification code correctly (XXX XXX format) > * Ensure you selected the correct pipeline for association > * Try refreshing the Vambe page and re-entering the code > * Contact Vambe support if the issue persists > * Verify your Vambe account has proper permissions *** ## Message Limits & Pricing ### Messaging Tiers WhatsApp Business API uses a tier system that increases with verified phone numbers: | Tier | Messages per 24h | How to Increase | | - | - | - | | **Tier 1** | 1,000 | Start with 10 verified recipients | | **Tier 2** | 10,000 | Message 10 unique users | | **Tier 3** | 100,000 | Message 100 unique users | | **Tier 4** | Unlimited | Message 1,000 unique users | ### Message Categories > [card] Utility Messages > > **Business-critical updates** > > * Order confirmations > * Appointment reminders > * Account alerts > * Payment confirmations > > **Cost: Lower rates** > [card] Authentication > > **Security codes and verification** > > * Login codes > * Password resets > * Account verification > * Two-factor authentication > > **Cost: Lowest rates** > [card] Marketing Messages > > **Promotional content** > > * Product announcements > * Special offers > * Newsletter updates > * Event invitations > > **Cost: Higher rates** > [!NOTE] > > **Pricing varies by country.** Check [Meta's pricing > page](https://developers.facebook.com/docs/whatsapp/pricing) for current rates > in your region. *** ## Next Steps > [!TIP] > > Congratulations! Your WhatsApp Business API is now connected to Vambe. Now you can: > [card] [Create Message Templates](/docs/create-template) > > Design approved templates for notifications and marketing messages > [card] [Send Template Messages](/docs/send-template-message) > > Learn how to send template messages through the API > [card] [Set Up Automated Flows](/docs/create-pipeline) > > Create AI-powered conversations and automated responses > [card] [Monitor Message Analytics](/docs/analytics) > > Track delivery rates, response times, and engagement metrics > [!WARNING] > > **Important:** Always comply with WhatsApp Business Policy. Sending spam or > unsolicited messages can result in account suspension or permanent ban. # Connect WhatsApp QR Source: https://docs.vambe.me/docs/connect-whatsapp-qr Quick setup guide to connect your personal or business WhatsApp using QR code scanning. ## 🚀 What you'll build You'll connect your WhatsApp number to Vambe using QR code scanning - the fastest way to start automating your WhatsApp conversations. > [!TIP] > > WhatsApp QR connection works like WhatsApp Web. It's perfect for personal > numbers, small businesses, or quick testing before setting up Business API. *** ## QR vs Business API > [card] WhatsApp QR (This Guide) > > **Quick scan-and-go setup** > > * ✅ Setup in under 5 minutes > * ✅ Works with personal WhatsApp > * ✅ Free to use > * ✅ No Meta approval needed > * ⚠️ Limited to \~250 messages/day > * ⚠️ Basic automation features > [card] WhatsApp Business API > > **Official Meta integration** > > * ✅ Unlimited messaging (with tiers) > * ✅ Template message support > * ✅ Advanced automation > * ✅ Business verification > * ⚠️ Requires Meta approval > * ⚠️ Setup can take days > [!NOTE] > > **Choose QR if:** You want to test Vambe quickly, have a personal/small business WhatsApp, or need immediate setup. > > **Choose Business API if:** You need high-volume messaging, template messages, or official business presence. *** ## Prerequisites Before connecting WhatsApp QR, ensure you have: * ✅ **WhatsApp installed** on your mobile device * ✅ **Active WhatsApp account** with the number you want to connect * ✅ **Vambe account** with Owner role * ✅ **Pipeline created** (optional, but recommended) > [!WARNING] > > **Important:** The WhatsApp number cannot be simultaneously connected to > WhatsApp Web and Vambe QR. You'll need to disconnect from WhatsApp Web first > if you're using it. *** ## Step-by-Step QR Setup Based on the official Vambe guide from [`Skool - WhatsApp QR Setup`](https://www.skool.com/vambe/classroom/b9d85b56?md=49ca73a0cb8143a3a681e0dd59f4f8af): **1. Access Platform Settings** In your Vambe dashboard: * Click **"Platform Settings"** in the upper right corner * Go to **Channels** section * Click **"Add Channel"** button at the bottom * Select **"WhatsApp"** as the channel type **2. Prepare Your Phone** Get your mobile device ready: * **Open WhatsApp** on your phone * Ensure you have the **same number** you want to connect * Make sure your phone has a **stable internet connection** * **Close WhatsApp Web** if you're using it elsewhere **3. Scan QR Code** Connect using QR scanning: * A **QR code will appear** on your Vambe screen * **Open WhatsApp** on your phone * Tap the **three dots (⋮)** or **Settings** * Select **"Linked Devices"** (Dispositivos vinculados) * Tap **"Link a Device"** (Vincular un dispositivo) * **Point your camera** at the QR code on Vambe * **Wait for confirmation** of successful connection **4. Select Pipeline** Link to your automation: * A **dropdown menu will appear** in Vambe * **Select the specific Pipeline** (Embudo) where you want to link this WhatsApp number * This determines which AI assistant will handle conversations **5. Finish Configuration** Complete the setup: * Click **"Finish"** or **"Finalizar"** to complete configuration * Verify the connection shows as **active** in your channels list * Your WhatsApp QR is now connected to Vambe **6. Link Channel to Pipeline** Ensure messages reach your AI: * **Navigate to your Pipeline** (Embudo) * Click the **green phone icon** in the upper right corner * **Select channels to link** to the pipeline * **Save the configuration** > [!TIP] > > Success! Your pipeline will now automatically receive all messages sent to your WhatsApp number. *** ## Understanding the Connection ### How QR Connection Works > [card] WhatsApp Web Protocol > > **Vambe uses the same technology as WhatsApp Web:** > > * Your phone remains the **primary device** > * Vambe acts as a **linked device** (like WhatsApp Web) > * Messages sync between your phone and Vambe > * Your phone must stay connected to internet > * All WhatsApp features work normally on your phone ### Pipeline Integration Once connected, here's how messages flow: **1. Customer Messages You** * Customer sends WhatsApp message to your number * Message appears on your phone (as normal) * Message also syncs to Vambe platform **2. AI Takes Control** * Vambe AI assistant receives the message - AI analyzes content and customer intent - AI generates appropriate response based on your pipeline configuration **3. Automated Response** * AI sends response through Vambe * Response appears as sent from your WhatsApp number * Customer sees normal WhatsApp conversation * You can see the full conversation in Vambe dashboard > [!NOTE] > > **Phone Dependency:** Your phone must remain connected to internet for the QR > connection to work. If your phone goes offline, the Vambe connection will > pause until your phone reconnects. *** ## Verify Your Connection Test your WhatsApp QR setup: ```bash Check QR Connection theme={null} curl -X GET \ -H "x-api-key: YOUR_API_KEY" \ https://api.vambe.me/api/public/channels/web-whatsapp ``` ```javascript Verify Status theme={null} const response = await fetch( 'https://api.vambe.me/api/public/channels/web-whatsapp', { headers: { 'x-api-key': process.env.VAMBE_API_KEY }, }, ); const channel = await response.json(); console.log('WhatsApp QR Status:', channel.status); ``` ```python Check Connection theme={null} import requests response = requests.get( 'https://api.vambe.me/api/public/channels/web-whatsapp', headers={'x-api-key': os.environ['VAMBE_API_KEY']} ) if response.status_code == 200: channel = response.json() print(f"WhatsApp QR connected: {channel['status']}") ``` > [!TIP] > > You can also test by sending a message to your WhatsApp number from another > phone and verifying it appears in your Vambe dashboard. *** ## Troubleshooting > [accordion] QR Code Won't Scan > > **If the QR code scanning fails:** > > * Ensure your phone's **camera has good lighting** > * **Move closer or farther** from the screen > * Try **refreshing the QR code** in Vambe > * Check that **WhatsApp is updated** to the latest version > * Verify you're using the **correct WhatsApp account** > [accordion] Connection Keeps Dropping > > **If the QR connection is unstable:** > > * Ensure your **phone has stable internet** connection > * Check that your phone **doesn't go to sleep** mode > * Verify **WhatsApp background app refresh** is enabled > * Avoid connecting to **multiple devices** simultaneously > * Try **reconnecting** the QR code if issues persist > [accordion] Messages Not Appearing > > **If messages aren't showing in Vambe:** > > * Verify the **channel is linked to your pipeline** > * Check that your **pipeline is active and configured** > * Ensure the **green phone icon** shows linked channels > * Test with a simple message from another phone > * Refresh your Vambe dashboard > [accordion] AI Not Responding > > **If your AI assistant isn't replying:** > > * Ensure your **pipeline has AI stages configured** > * Check that your **AI assistant has training data** > * Verify **pipeline triggers are set up correctly** > * Test with simple, clear messages > * Review your pipeline configuration *** ## QR vs Business API Comparison | Feature | WhatsApp QR | Business API | | - | - | - | | **Setup Time** | 5 minutes | 1-5 days | | **Approval Required** | No | Yes (Meta approval) | | **Message Limits** | \~250/day | 1,000+ (tiered) | | **Template Messages** | No | Yes | | **Phone Dependency** | Yes (phone must be online) | No | | **Cost** | Free | Paid per message | | **Business Verification** | No | Yes (green checkmark) | | **Advanced Features** | Basic | Full automation | > [!NOTE] > > **Migration Path:** You can start with QR for testing and later upgrade to > Business API for production use without losing your pipeline configuration. *** ## Next Steps > [!TIP] > > Congratulations! Your WhatsApp QR is now connected and ready to receive > automated responses. Now you can: > [card] [Send QR Messages](/docs/send-qr-message) > > Learn how to send messages through your QR-connected WhatsApp > [card] [Configure AI Assistant](/docs/create-pipeline) > > Train your AI with company knowledge and conversation flows > [card] [Monitor Conversations](/docs/analytics) > > Track customer interactions and AI performance > [card] [Upgrade to Business API](/docs/connect-whatsapp-api) > > Scale up with official Meta integration for higher limits > [!WARNING] > > **Remember:** Keep your phone connected to internet and avoid logging into > WhatsApp Web on other devices while using Vambe QR connection. # Create your first pipeline Source: https://docs.vambe.me/docs/create-pipeline Learn how to build a sales funnel with AI assistants and human agents using Vambe Mercur. ## 🎯 What you'll build You'll create your first sales pipeline in Vambe Mercur with AI assistants and human agents to automate customer interactions, qualify leads, and drive conversions. > [!TIP] > > Pipelines in Vambe are called "Embudos" (funnels) - structured flows that > guide customers from first contact to conversion. *** ## Understanding Vambe Mercur Vambe Mercur transforms your customer service by automating responses, scheduling appointments, and processing payments while you sleep. Everything starts with your **pipeline (embudo)**. ### What is a Pipeline? A pipeline is a visual representation of your sales process where potential customers move through different stages before converting. Each stage can be handled by: > [card] AI Assistants > > **Blue stages** - Automated virtual assistants powered by AI > > * Answer FAQs about products/services > * Qualify initial prospects > * Schedule appointments > * Collect customer data > * Process standard sales > * Provide 24/7 support > [card] Human Agents > > **Orange stages** - Your team members for complex interactions > > * Handle special negotiations > * Resolve complex cases/complaints > * Close high-value sales > * Provide detailed proposal customization > * Manage exceptions and edge cases > [!NOTE] > > AI assistants learn about your company through configuration "blocks" where > you teach them your sales process, products, and communication style. *** ## How Pipeline Flow Works When a customer starts chatting with your assistant, here's what happens: **1. Contact Card Creation** The system automatically generates a contact card containing all conversation history between the AI and your customer. **2. Intelligent Processing** The AI analyzes each message and generates appropriate responses based on your configuration, deciding whether to: - Continue the conversation - Move to another AI assistant stage - Transfer to a human agent **3. Real-time Monitoring** You can see in real-time where each customer is in your sales process based on their responses. **4. Automatic Stage Progression** When customers show interest, the AI detects keywords or behavior patterns and automatically moves them to the next stage using configured "triggers." ### Multi-Channel Support Connect multiple channels simultaneously while maintaining consistent communication: | Channel | Use Case | Integration | | - | - | - | | **WhatsApp** | Direct, personal communication | Business API | | **Instagram** | Social media lead capture | Comments, DMs | | **Webchat** | Website visitors | Embedded chat widget | | **Messenger** | Facebook users | Business integration | > [!NOTE] > > All channels use the same assistant configuration, ensuring consistent > messaging regardless of where customers contact you. *** ## Pipeline Use Cases > [accordion] Appointment Scheduling > > **Perfect for consultations, demos, or service bookings** > > * AI qualifies the customer and schedules directly in your calendar > * Collects pre-appointment information > * Sends automatic reminders > * Handles rescheduling requests > > **Flow:** Initial contact → Qualification → Calendar integration → Confirmation → Reminders > [accordion] E-commerce Sales > > **Ideal for online stores and product catalogs** > > * Helps customers find products > * Answers product questions > * Processes basic orders > * Handles shipping inquiries > * Escalates complex issues to humans > > **Flow:** Product inquiry → Recommendations → Order processing → Payment → Fulfillment > [accordion] Lead Qualification > > **Great for B2B services and high-ticket items** > > * Identifies qualified leads > * Collects contact information > * Segments customers by needs > * Filters out non-ideal prospects > * Prioritizes high-quality leads > > **Flow:** First contact → Qualification questions → Scoring → Segmentation → Human handoff > [accordion] Customer Support > > **Perfect for handling common inquiries** > > * Resolves frequent questions instantly > * Collects issue details > * Routes complex problems to specialists > * Provides 24/7 basic support > * Escalates urgent matters > > **Flow:** Issue identification → Self-service options → Data collection → Routing → Resolution *** ## Creating Your Pipeline ### Prerequisites Before building your pipeline, ensure you have: * ✅ Completed the [Quickstart guide](/docs/quickstart) * ✅ At least one communication channel connected * ✅ Clear understanding of your sales process * ✅ Defined customer journey stages > [!WARNING] > > **Important:** Review the lead management guides before creating automated systems: > > * [Sales Funnel Management](https://www.skool.com/vambe/classroom/64c0a2ad?md=cfbc84fa2d7e486b80bea5e00cd670ee) > * [Pipeline Flow Understanding](https://www.skool.com/vambe/classroom/64c0a2ad?md=d970ac4e0b7649ebb317e25d256003c9) ### Step-by-Step Creation **1. Access Vambe Mercur** Navigate to your Vambe dashboard and locate the pipeline section. You'll see vertical rectangles (stages) in blue and orange representing your funnel. **2. Design Your Stages** Plan your customer journey: 1. **Entry point** - How customers first contact you 2. **Qualification** - What information you need to collect 3. **Engagement** - How you nurture interest 4. **Conversion** - Your sales or appointment process 5. **Follow-up** - Post-conversion care **3. Configure AI Assistants** For each blue stage, configure your AI assistant: * **Training blocks** - Teach about your company, products, and processes * **Response style** - Define tone and communication approach * **Triggers** - Set conditions for moving to next stage * **Data collection** - Specify what information to gather **4. Set Up Human Handoffs** For orange stages, configure when and how to transfer to your team: * **Handoff triggers** - Define conditions requiring human intervention * **Team assignment** - Route to appropriate specialists * **Context transfer** - Ensure smooth conversation continuity **5. Test and Refine** Before going live: * Test all conversation paths * Verify trigger conditions work correctly * Ensure data collection is complete * Confirm human handoffs function properly *** ## Get Your Pipeline ID Once your pipeline is created, you can retrieve its ID using the Vambe API: ```bash cURL theme={null} curl -X GET \ -H "x-api-key: YOUR_API_KEY" \ https://api.vambe.me/api/public/pipeline ``` ```javascript JavaScript theme={null} const response = await fetch('https://api.vambe.me/api/public/pipeline', { headers: { 'x-api-key': process.env.VAMBE_API_KEY }, }); const pipelines = await response.json(); ``` ```python Python theme={null} import requests response = requests.get( 'https://api.vambe.me/api/public/pipeline', headers={'x-api-key': os.environ['VAMBE_API_KEY']} ) pipelines = response.json() ``` ### Expected Response ```json theme={null} { "pipelines": [ { "id": "pipeline_abc123", "name": "Sales Funnel", "stages": [ { "id": "stage_1", "name": "Initial Contact", "type": "ai_assistant" }, { "id": "stage_2", "name": "Qualification", "type": "ai_assistant" }, { "id": "stage_3", "name": "Sales Consultation", "type": "human_agent" } ] } ] } ``` > [!TIP] > > Save your pipeline ID - you'll need it for API integrations, webhooks, and > analytics tracking. *** ## Best Practices > [card] AI Assistant Optimization > > * Keep training blocks focused and specific > * Use clear, conversational language > * Test edge cases and unexpected inputs > * Regularly update knowledge base > * Monitor conversation quality > [card] Human Handoff Strategy > > * Define clear handoff criteria - Provide context to human agents - Set > response time expectations - Train team on AI-generated leads - Maintain > conversation continuity > [card] Pipeline Performance > > * Track conversion rates by stage - Monitor drop-off points - Analyze customer > journey data - A/B test different approaches - Optimize based on results > [card] Customer Experience > > * Ensure natural conversation flow > * Personalize interactions when possible > * Provide clear next steps > * Respect customer preferences > * Offer human option when needed *** ## Next Steps > [!TIP] > > Congratulations! You now understand how to create and manage pipelines in > Vambe Mercur. Ready to build more advanced automations? > [card] [Advanced Pipeline Features](/docs/create-pipeline) > > Learn about complex routing, conditions, and integrations > [card] [Webhook Integration](/docs/webhooks) > > Set up real-time notifications for pipeline events > [card] [Analytics Dashboard](/docs/analytics) > > Monitor performance and optimize your funnels > [card] [Team Management](https://app.vambeai.com/team) > > Configure roles and permissions for your pipeline > [!NOTE] > > Need help setting up your first pipeline? Check out our detailed video guides > or contact support for personalized assistance. # Create your first template Source: https://docs.vambe.me/docs/create-template Design and submit WhatsApp message templates for approval to send notifications, confirmations, and marketing messages. ## 🎯 What you'll build You'll create your first WhatsApp message template, submit it for Meta approval, and learn how to use it for business communications. > [!TIP] > > WhatsApp templates are pre-approved message formats required for sending > messages outside the 24-hour customer service window. They're essential for > notifications, reminders, and marketing. *** ## Understanding WhatsApp Templates ### Why Templates Are Required WhatsApp Business API requires templates for: * **Messages outside 24-hour window** after customer's last message * **Proactive notifications** (order updates, appointment reminders) * **Marketing messages** (promotions, announcements) * **Automated sequences** (welcome series, follow-ups) ### Template Categories > [card] Utility Templates > > **Business-critical updates** > > * Order confirmations > * Shipping notifications > * Appointment reminders > * Payment alerts > > **Approval: Usually fast (24-48h)** > [card] Authentication > > **Security and verification** > > * Login codes > * Password resets > * Account verification > * OTP messages > > **Approval: Fastest (few hours)** > [card] Marketing Templates > > **Promotional content** > > * Product launches > * Special offers > * Event invitations > * Newsletter updates > > **Approval: Slower (2-7 days)** *** ## Template Structure ### Basic Components Every WhatsApp template consists of: **1. Header (Optional)** **Text, Image, Video, or Document** * Maximum 60 characters for text headers * Media headers for rich content * Can include variables `{{1}}`, `{{2}}`, etc. **2. Body (Required)** **Main message content** * Maximum 1,024 characters * Can include variables `{{1}}`, `{{2}}`, etc. * Must provide clear value to recipients **3. Footer (Optional)** **Additional context or branding** * Maximum 60 characters * No variables allowed * Often used for company name or unsubscribe info **4. Buttons (Optional)** **Call-to-action buttons** * Up to 3 buttons * Types: URL, Phone, Quick Reply * Can include variables in URL buttons ### Variable Parameters Templates support dynamic content through variables: * `{{1}}` - First variable (customer name, order number, etc.) * `{{2}}` - Second variable (date, amount, etc.) * `{{3}}` - Third variable (and so on...) > [!NOTE] > > Variables must be used in sequential order (`{{1}}`, then `{{2}}`, then `{{3}}`). You cannot skip numbers. *** ## Creating Your First Template in Vambe Templates are predefined messages you can send to your prospects. In WhatsApp, they allow you to start new conversations or reopen closed ones. From the Templates section, you can view all created templates, their categories, and enabled channels. ### Template Categories > [card] Marketing > > **Promotional content** > > * Product promotions > * Advertising announcements > * Product launches > * Customer base campaigns > > **Use:** Reaching customer base with offers > [card] Utility > > **Internal business purposes** > > * Appointment reminders > * Reactivate inactive conversations > * Order confirmations > * Service notifications > > **Use:** Business operations and customer service > [card] Authentication > > **Verification and security** > > * Verification codes > * Login confirmations > * Security alerts > * Account access > > **Use:** Identity verification processes > [!NOTE] > > Each template type has specific rates charged directly by **Meta**. Check > [Meta's official pricing > page](https://developers.facebook.com/docs/whatsapp/pricing) for current > costs. *** ## Step-by-Step Template Creation **1. Access Templates Section** In your Vambe dashboard: * Navigate to the **Templates** section * Click the blue **"+Crear"** button in the upper right corner > [!NOTE] > > Templates are managed through Platform Settings along with other channel configurations. Reference: [`Skool - Platform Settings Templates`](https://www.skool.com/vambe/classroom/c8a9223e?md=656dc09c2f984a10a0a464114270742f) **2. Select Channels** Choose which channels will use this template: * **WhatsApp API** - For Business API templates * **WhatsApp QR** - For QR-connected numbers * **Other channels** - As available in your account > [!TIP] > > You can select multiple channels if you want the same template available across different communication methods. **3. Configure Basic Information** Set up the template fundamentals: * **Name**: Choose a descriptive, unique identifier * **Category**: Select Marketing, Utility, or Authentication * **Language**: Define the language for the template content > [!WARNING] > > **Template names cannot be changed** after creation. Use clear, descriptive names like `appointment_reminder` or `product_launch`. **4. Customize Content** Design your template structure: **Header (Optional):** * Text header (max 60 characters) * Image, video, or document * Can include variables for personalization **Body (Required):** * Main message content (max 1,024 characters) * Include variables to personalize automatically (e.g., customer name) * Use `{{1}}`, `{{2}}`, `{{3}}` for dynamic content **Footer (Optional):** * Additional message footer * Usually used for company branding or disclaimers **Quick Reply Buttons (Optional):** * Add response options like "¿Quieres comprar este producto? Sí / No" * Up to 3 quick reply buttons * URL or phone number buttons also available **5. Submit for Approval** Complete the template creation: * Review all content for accuracy * Click **Create** or **Submit** * Template is automatically sent to Meta for approval * Approval process typically completes almost immediately * Only approved templates can be used in conversations > [!TIP] > > Once approved, your template will be available for use in your Vambe campaigns and automated flows. *** ## Template Design Example Let's create an order confirmation template: ```text Header theme={null} Order Confirmed! 📦 ``` ```text Body theme={null} Hi `{{1}}`, Great news! Your order #`{{2}}` has been confirmed and is being prepared. Order Details: • Total: $`{{3}}` • Estimated delivery: `{{4}}` We'll send you tracking information once your order ships. Thank you for shopping with us! ``` ```text Footer theme={null} MyStore - Your trusted partner ``` ### Step 4: Add Interactive Buttons (Optional) > [accordion] URL Button > > **Track Order Button** > > * Button Text: "Track Order" > * URL: `https://mystore.com/track/{{2}}` > * Uses variable `{{2}}` for order number > [accordion] Phone Button > > **Call Support Button** > > * Button Text: "Call Support" > * Phone Number: "+1234567890" > * No variables allowed in phone buttons > [accordion] Quick Reply > > **Quick Response Options** > > * "Need Help?" > * "Change Address" > * "Cancel Order" > > These appear as clickable options for customers *** ## Template Examples by Use Case ### 1. Appointment Reminder > [card] Healthcare Appointment Reminder > > **Category:** UTILITY > > **Body:** > > ``` > Hi `{{1}}`, > > This is a reminder that you have an appointment with Dr. `{{2}}` tomorrow at `{{3}}`. > > Location: `{{4}}` > > Please arrive 15 minutes early. If you need to reschedule, please call us at least 24 hours in advance. > ``` > > **Buttons:** > > * URL: "Get Directions" → `https://maps.google.com/?q={{4}}` > * Phone: "Call to Reschedule" → `+1234567890` ### 2. Welcome Message > [card] New Customer Welcome > > **Category:** UTILITY > > **Header:** Welcome to `{{1}}`! 🎉 > > **Body:** > > ``` > Hi `{{2}}`, > > Welcome to our community! We're excited to have you on board. > > Here's what you can expect: > • Exclusive offers and updates > • 24/7 customer support > • Easy returns and exchanges > > Your customer ID is: `{{3}}` > ``` > > **Buttons:** > > * URL: "Explore Products" → `https://mystore.com/products` > * Quick Reply: "Contact Support" ### 3. Payment Confirmation > [card] Payment Received > > **Category:** UTILITY > > **Body:** > > ``` > Hi `{{1}}`, > > We've successfully received your payment of $`{{2}}` for invoice #`{{3}}`. > > Payment Details: > • Method: `{{4}}` > • Date: `{{5}}` > • Transaction ID: `{{6}}` > > Thank you for your business! > ``` > > **Footer:** Questions? Reply to this message *** ## Template Approval Process ### Submission Guidelines **1. Review Template Content** * Ensure clear business value * Use proper grammar and spelling * Include relevant variables * Follow WhatsApp Commerce Policy **2. Submit for Review** * Click **Submit** in Template Manager - Templates enter Meta's review queue - Initial status shows as "PENDING" **3. Approval Timeline** * **Authentication:** Few hours - **Utility:** 24-48 hours - **Marketing:** 2-7 days - Complex templates may take longer **4. Handle Results** * **Approved:** Status changes to "APPROVED" * **Rejected:** Review feedback and resubmit * **Pending:** Wait or contact Meta support ### Common Rejection Reasons > [accordion] Content Issues > > **Common problems:** > > * Vague or unclear messaging > * Missing context for variables > * Grammatical errors or typos > * Non-business related content > * Misleading information > [accordion] Policy Violations > > **WhatsApp policy violations:** > > * Requesting personal information unnecessarily > * Threatening or aggressive language > * Adult content or illegal activities > * Spam-like characteristics > * Misleading offers or claims > [accordion] Technical Problems > > **Format and structure issues:** > > * Invalid variable usage > * Broken or suspicious URLs > * Incorrect button configurations > * Character limit exceeded > * Missing required components *** ## Best Practices > [card] Content Quality > > * **Be clear and concise** - Get to the point quickly > * **Provide value** - Every message should benefit the customer > * **Use friendly tone** - Professional but approachable > * **Include context** - Explain why you're messaging them > * **Add clear CTAs** - Make next steps obvious > [card] Technical Optimization > > * **Test variables** - Ensure all scenarios work - **Optimize length** - > Shorter templates perform better - **Use buttons wisely** - Don't overwhelm > with options - **Plan for localization** - Consider multiple languages - > **Monitor performance** - Track open and click rates > [card] Compliance > > * **Follow WhatsApp policies** - Read and understand guidelines - **Respect > opt-outs** - Honor unsubscribe requests - **Be transparent** - Identify your > business clearly - **Avoid spam tactics** - Focus on genuine value - **Keep > records** - Document approval processes > [card] User Experience > > * **Personalize content** - Use customer names and data > * **Time messages well** - Consider customer time zones > * **Provide support** - Make it easy to get help > * **Test thoroughly** - Verify all links and variables > * **Gather feedback** - Learn from customer responses *** ## Managing Templates ### Template Status Monitoring Check template status regularly: ```bash Check Templates via API theme={null} curl -X GET \ -H "x-api-key: YOUR_API_KEY" \ https://api.vambe.me/api/public/templates ``` ```javascript Get Templates via Vambe API theme={null} const response = await fetch('https://api.vambe.me/api/public/templates', { headers: { 'x-api-key': process.env.VAMBE_API_KEY }, }); const templates = await response.json(); ``` ```python List Approved Templates theme={null} import requests response = requests.get( 'https://api.vambe.me/api/public/templates', headers={'x-api-key': os.environ['VAMBE_API_KEY']} ) templates = response.json() ``` ### Template Maintenance * **Regular audits** - Review template performance monthly * **Update content** - Refresh outdated information * **Archive unused** - Remove templates you no longer need * **Version control** - Keep track of template changes * **Performance tracking** - Monitor delivery and engagement rates *** ## Next Steps > [!TIP] > > Congratulations! You've created your first WhatsApp message template. Once your template is approved, you can: > [card] [Send Template Messages](/docs/send-template-message) > > Learn how to send your approved templates via API > [card] [Automate with Pipelines](/docs/create-pipeline) > > Integrate templates into your automated conversation flows > [card] [Track Performance](/docs/analytics) > > Monitor template delivery rates and customer engagement > [card] [Advanced Templates](/docs/create-template) > > Learn about media templates, carousels, and interactive elements > [!NOTE] > > **Pro Tip:** Start with simple utility templates to get familiar with the > approval process before creating complex marketing templates. # E-commerce Integration Guide Source: https://docs.vambe.me/docs/ecommerce-guide Learn how to integrate your product catalog with Vambe AI assistants. Manage products, sync inventory, and enable AI-powered product recommendations. ## Overview Vambe's e-commerce integration allows your AI assistants to recommend and discuss products with customers. Products are organized in **Product Blocks** (also called Prompt Blocks), which are containers that hold related products. ## Key Concepts ### Product Blocks * **Container**: A product block is a container that holds related products * **AI Context**: AI assistants use product blocks to understand available products * **Organization**: Organize products by category, brand, or use case * **Multiple Blocks**: You can have multiple product blocks for different purposes ### Product Structure Each product has: * **Basic Info**: Name, description, price, currency * **Type**: PRODUCT (physical/digital) or SERVICE * **External ID**: Your unique identifier for tracking * **Metadata**: Custom key-value pairs for additional data * **AI Description**: Natural language description for AI understanding ## Getting Started ### Step 1: Get Your Product Block IDs Before managing products, you need to know which product blocks are available: ```bash theme={null} curl --request GET \ 'https://api.vambe.me/api/public/product/product-blocks' \ --header 'x-api-key: your_api_key_here' ``` **Response**: ```json theme={null} [ { "id": "block-abc123", "name": "Main Product Catalog", "count": 150 }, { "id": "block-def456", "name": "Seasonal Products", "count": 25 } ] ``` Save these IDs - you'll need them for all product operations! ### Step 2: Choose Your Product Management Strategy Depending on your needs, choose the right endpoint: | Endpoint | Use When | Behavior | | - | - | - | | **Create** | Adding new products or updating specific ones | Keeps existing products | | **Upsert** | Full catalog synchronization | Deletes products not in request | | **Delete** | Removing specific products | Deletes only specified products | ## Complete Workflows ### Workflow 1: Initial Product Catalog Setup ```javascript theme={null} // 1. Get product block ID const blocksResponse = await fetch( 'https://api.vambe.me/api/public/product/product-blocks', { headers: { 'x-api-key': 'your_api_key_here' }, }, ); const blocks = await blocksResponse.json(); const mainBlockId = blocks.find((b) => b.name === 'Main Product Catalog')?.id; // 2. Create initial products const createResponse = await fetch( `https://api.vambe.me/api/public/product/create/${mainBlockId}`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-api-key': 'your_api_key_here', }, body: JSON.stringify([ { name: 'Premium Coffee Beans', description: 'High-quality arabica coffee from Colombia. Rich flavor with chocolate notes. Perfect for espresso.', price: 24.99, currency: 'USD', type: 'PRODUCT', external_id: 'coffee-001', file_url: 'https://shop.com/coffee.jpg', metadata: [ { key: 'origin', value: 'Colombia' }, { key: 'roast', value: 'Medium' }, { key: 'weight', value: '500g' }, ], }, { name: 'Express Delivery', description: 'Fast delivery service. Next-day delivery for orders placed before 2 PM. Available nationwide.', price: 5.0, currency: 'USD', type: 'SERVICE', external_id: 'delivery-express', metadata: [ { key: 'delivery_time', value: '1 day' }, { key: 'coverage', value: 'Nationwide' }, ], }, ]), }, ); console.log('Products created successfully!'); ``` ### Workflow 2: Nightly Catalog Sync ```javascript theme={null} // Complete catalog sync from your e-commerce platform const syncCatalog = async (productBlockId) => { // 1. Get products from your e-commerce platform const shopProducts = await yourEcommercePlatform.getAllProducts(); // 2. Transform to Vambe format const vambeProducts = shopProducts.map((product) => ({ name: product.title, description: `${product.description}. ${product.features.join('. ')}`, price: parseFloat(product.price), currency: 'USD', type: 'PRODUCT', external_id: `shop-${product.id}`, file_url: product.image_url, metadata: [ { key: 'sku', value: product.sku }, { key: 'category', value: product.category }, { key: 'brand', value: product.brand }, { key: 'in_stock', value: product.in_stock.toString() }, ], })); // 3. Upsert to Vambe (full sync - removes discontinued products) const response = await fetch( `https://api.vambe.me/api/public/product/upsert/${productBlockId}`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-api-key': 'your_api_key_here', }, body: JSON.stringify(vambeProducts), }, ); const result = await response.json(); console.log(`Synced ${vambeProducts.length} products`); console.log(`Created: ${result.created}, Updated: ${result.updated}`); return result; }; // Run nightly // cron.schedule('0 2 * * *', () => syncCatalog('block-abc123')); ``` ### Workflow 3: Add New Product ```javascript theme={null} // Add a single new product without affecting others const addNewProduct = async (productBlockId, newProduct) => { const response = await fetch( `https://api.vambe.me/api/public/product/create/${productBlockId}`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-api-key': 'your_api_key_here', }, body: JSON.stringify([ { name: newProduct.name, description: newProduct.description, price: newProduct.price, currency: 'USD', type: 'PRODUCT', external_id: `new-${Date.now()}`, file_url: newProduct.imageUrl, metadata: [ { key: 'category', value: newProduct.category }, { key: 'new_arrival', value: 'true' }, ], }, ]), }, ); console.log('New product added!'); return await response.json(); }; ``` ### Workflow 4: Remove Discontinued Products ```javascript theme={null} // Remove products that are no longer available const removeDiscontinued = async (productBlockId, externalIds) => { const response = await fetch( `https://api.vambe.me/api/public/product/delete/${productBlockId}`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-api-key': 'your_api_key_here', }, body: JSON.stringify(externalIds.map((id) => ({ external_id: id }))), }, ); const result = await response.json(); console.log(`Deleted ${result.deleted} products`); return result; }; // Usage removeDiscontinued('block-abc123', ['old-product-001', 'discontinued-002']); ``` ## Best Practices ### 1. Writing Good Product Descriptions The description field is crucial for AI understanding. Follow these guidelines: **✅ Good Description**: ``` "Premium wireless headphones with active noise cancellation. Over-ear design provides comfort for long listening sessions. 30-hour battery life. Perfect for travel, work, and music lovers who demand high-quality audio." ``` **❌ Poor Description**: ``` "Model: WH-1000XM4. Price: $349.99. Buy now at https://shop.com. SKU: WH1000XM4." ``` **Tips**: * Use natural language that describes features and benefits * Avoid URLs, prices (already in price field), or SKU codes * Focus on what makes the product unique * Include use cases and who it's for * Mention key features in conversational language ### 2. Use Meaningful External IDs ```javascript theme={null} // Good: Trackable, meaningful IDs external_id: 'sku-WH1000XM4'; external_id: 'shopify-6789012345'; external_id: 'coffee-premium-colombia-500g'; // Avoid: Hard to track external_id: '1'; external_id: 'product'; ``` ### 3. Organize with Metadata ```javascript theme={null} metadata: [ { key: 'category', value: 'Electronics' }, { key: 'subcategory', value: 'Audio' }, { key: 'brand', value: 'Sony' }, { key: 'in_stock', value: 'true' }, { key: 'warehouse_location', value: 'A-12' }, { key: 'seasonal', value: 'false' }, ]; ``` ### 4. Handle Large Catalogs For catalogs with 1000+ products: ```javascript theme={null} // Batch products into chunks for reliability const BATCH_SIZE = 500; const uploadInBatches = async (products, blockId) => { for (let i = 0; i < products.length; i += BATCH_SIZE) { const batch = products.slice(i, i + BATCH_SIZE); await fetch(`https://api.vambe.me/api/public/product/create/${blockId}`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-api-key': 'your_api_key_here', }, body: JSON.stringify(batch), }); console.log(`Uploaded batch ${Math.floor(i / BATCH_SIZE) + 1}`); // Small delay between batches await new Promise((resolve) => setTimeout(resolve, 1000)); } }; ``` ## Product Types ### PRODUCT Physical or digital items that customers purchase: * Physical products (clothes, electronics, etc.) * Digital products (ebooks, software, etc.) * Consumables (food, drinks, etc.) ### SERVICE Services or subscriptions: * Delivery services * Consulting services * Subscriptions * Warranties * Installation services ## Currency Codes Supported currencies include: * **USD**: US Dollar * **EUR**: Euro * **GBP**: British Pound * **CLP**: Chilean Peso * **MXN**: Mexican Peso * **COP**: Colombian Peso * **ARS**: Argentine Peso * **PEN**: Peruvian Sol * **BRL**: Brazilian Real And many more! ## API Endpoints Reference ### Product Management 1. **[GET /api/public/product/product-blocks](/reference/product/get-product-blocks)** - List available product blocks 2. **[POST /api/public/product/create/](/reference/product/create-products)** - Add/update products (keeps others) 3. **[POST /api/public/product/upsert/](/reference/product/upsert-products)** - Full sync (deletes unlisted) 4. **[POST /api/public/product/delete/](/reference/product/delete-products)** - Delete specific products ### Order Information 5. **[GET /api/public/order//product](/reference/product/get-order-products)** - Get products in an order ## Common Scenarios ### Scenario 1: E-commerce Platform Integration ```javascript theme={null} // Daily sync from Shopify/WooCommerce/etc const dailySync = async () => { // 1. Get block ID const blocks = await getProductBlocks(); const blockId = blocks[0].id; // 2. Get products from your platform const products = await shopifyAPI.getProducts(); // 3. Transform and sync const vambeProducts = products.map(transformToVambeFormat); // 4. Upsert (removes products no longer in your catalog) await upsertProducts(blockId, vambeProducts); console.log('Daily sync complete!'); }; ``` ### Scenario 2: Real-time Updates ```javascript theme={null} // When a product is added/updated in your system const onProductChange = async (product) => { const blockId = 'block-abc123'; // Use create (doesn't affect other products) await createProducts(blockId, [transformProduct(product)]); console.log('Product updated in AI knowledge'); }; // When a product is discontinued const onProductDiscontinued = async (productId) => { const blockId = 'block-abc123'; await deleteProducts(blockId, [{ external_id: productId }]); console.log('Product removed from AI knowledge'); }; ``` ### Scenario 3: Multi-category Management ```javascript theme={null} // Different product blocks for different categories const setupCategories = async () => { const blocks = await getProductBlocks(); const electronicsBlock = blocks.find((b) => b.name === 'Electronics'); const clothingBlock = blocks.find((b) => b.name === 'Clothing'); // Sync electronics await upsertProducts(electronicsBlock.id, electronicsProducts); // Sync clothing await upsertProducts(clothingBlock.id, clothingProducts); console.log('All categories synced!'); }; ``` ## Troubleshooting ### Product Not Showing in AI Responses 1. **Check Description**: Ensure description uses natural language 2. **Verify Block**: Confirm product is in the correct block 3. **Check AI Configuration**: Ensure assistant has access to product block 4. **Wait for Processing**: Allow a few minutes for AI indexing ### Products Being Deleted Unexpectedly * **Using Upsert?**: Remember upsert deletes products not in request * **Solution**: Use `create` endpoint for partial updates * **Or**: Include all products in upsert request ### Metadata Not Appearing * **Check Format**: Metadata must be array of `{key, value}` objects * **Verify Keys**: Keys should be simple strings * **Check Response**: Verify metadata was saved ## Related Resources * [Product Endpoints](/reference/product/get-product-blocks) - Full API reference * [Create Pipeline](/docs/create-pipeline) - Set up AI assistant to use products * [Analytics](/docs/analytics) - Track product recommendation performance ## Next Steps 1. **Get Your Block IDs**: Call GET /product-blocks 2. **Upload Products**: Use create or upsert endpoint 3. **Configure AI Assistant**: Link product block to your assistant 4. **Test**: Chat with your AI and ask about products 5. **Monitor**: Track which products are being recommended # Quickstart Source: https://docs.vambe.me/docs/quickstart Get started with Vambe: account setup, channels, API keys, and your first request. ## 🚀 What you'll build You'll set up your Vambe account and channel, create an API key, and make your first API request. > [!TIP] > > This guide takes about 10 minutes to complete. By the end, you'll have made > your first successful API call to Vambe. *** ## 1) Prerequisites Before you start, you'll need: * A Vambe account with the role **Owner** > [!NOTE] > > Don't have an account yet? Create one at > [`app.vambeai.com/login`](https://app.vambeai.com/login) > [!NOTE] > > **Want to connect channels?** Check out our [Connect your first > channel](/docs/connect-channel) guide to set up WhatsApp, Instagram, Webchat, > or Messenger for receiving customer messages. *** ## 2) Create your API key **1. Navigate to Developers** Go to [`app.vambeai.com/developers`](https://app.vambeai.com/developers) and open the **API Keys** section. **2. Create New Key** Click the **New API Key** button to open the creation dialog. **3. Configure Key Details** * **Name**: Give it a descriptive name (e.g., "Server", "Zapier", "Development") - **Role**: Choose the appropriate permission level **4. Select Role** Choose the appropriate role for your use case: | Role | Description | Use Case | | - | - | - | | `OWNER` | Full organization control | Initial testing, admin tasks | | `ADMIN` | Administrative access | Team management | | `SUPER_ADMIN` | Extended system access | Advanced operations | | `AGENT` | Standard operations | Daily tasks, integrations | **5. Create and Store** Click **Create**, then reveal and copy your API key. Store it securely in your environment variables or secret manager. > [!WARNING] > > **Security Best Practices:** - Treat API keys like passwords—never commit them > to git - Use environment variables: `VAMBE_API_KEY=your_key_here` - Rotate or > delete unused keys from the Developers page - Prefer least-privilege roles for > production keys *** ## 3) Your first API call Vambe authenticates server-side requests via the `x-api-key` header. Replace `YOUR_API_KEY` with your newly created key. ```bash cURL theme={null} curl -X GET \ -H "x-api-key: YOUR_API_KEY" \ https://api.vambe.me/health/ping ``` ```javascript JavaScript (fetch) theme={null} await fetch('https://api.vambe.me/health/ping', { headers: { 'x-api-key': process.env.VAMBE_API_KEY }, }); ``` ```python Python (requests) theme={null} import os, requests resp = requests.get( 'https://api.vambe.me/health/ping', headers={'x-api-key': os.environ['VAMBE_API_KEY']} ) ``` ### Expected Response ```json theme={null} { "status": "ok", "message": "pong", "date": "2025-01-01T12:00:00.000Z" } ``` > [accordion] Testing Tips > > * **Latency simulation**: Add `?sleep=500` to test response times: > `.../health/ping?sleep=500` - **Database health check**: Use `GET /health` for > a full system check including database connectivity - **Postman setup**: Add a > header `x-api-key: YOUR_API_KEY` to your request *** ## 4) Next steps > [!TIP] > > Congratulations! You've successfully made your first API call to Vambe. Here's what to explore next: > [card] [API Reference](/reference) > > Explore all available endpoints for channels, contacts, and webhooks > [card] [Integration Guide](/docs/integration-to-the-api) > > Learn how to integrate Vambe into your existing workflows > [card] [Team Management](https://app.vambeai.com/team) > > Invite teammates and configure role-based access > [card] [Webhooks](/docs/webhooks) > > Set up real-time notifications for events > [!NOTE] > > Need help? Contact our support team or check the **API Reference** section for > detailed endpoint documentation. # Send verification codes (OTP) Source: https://docs.vambe.me/docs/send-otp-message Send one-time passwords over WhatsApp with authentication templates through the Vambe API. ## 🔐 What you'll build You'll send a one-time verification code (OTP) to a customer over WhatsApp, using an **authentication template** and the Vambe API, and follow its delivery. > [!TIP] > > Authentication templates are the WhatsApp format for login codes, account > verification and password resets. WhatsApp renders the copy, adds a **Copy > code** button and, for one-tap and zero-tap templates, can autofill the code > in your Android app. *** ## Prerequisites * ✅ [Connected WhatsApp Business API](/docs/connect-whatsapp-api) * ✅ An **approved authentication template** on the number you send from * ✅ Valid Vambe API key from the [developers page](https://app.vambeai.com/developers) ### Getting an authentication template You can create it in either place: * **In Vambe:** Templates → create a template with the **Authentication** category. Choose whether to add the security recommendation ("For your security, do not share this code.") and how many minutes the code is valid. * **In WhatsApp Manager (Meta):** create it there and sync your templates in Vambe. Vambe imports it with its security recommendation, expiration and button type, ready to send. Then copy its ID from `GET /api/public/templates`. > [!WARNING] > > An authentication template only carries the code. WhatsApp writes the rest of > the copy, so you can't add your own text, links or media to it. *** ## Choose an endpoint | Endpoint | Use it when | | - | - | | `POST /api/public/whatsapp/message/send/{phone}/template/{templateId}` | You send one code and want the structured format: the phone in the path and the code as the first variable. | | `POST /api/public/whatsapp/message/send/template/{templateId}` | You already call the smart endpoint for your other templates and want the same flow. | | `POST /api/public/whatsapp/message/send/template/{templateId}/many` | You send codes to several recipients in one request. | The code is never rewritten or extracted by AI. The structured endpoint sends `variables[0]` as is; the smart endpoints only trim spaces around it (`" 482913 "` is sent as `482913`), so store the trimmed value if you compare it later. *** ## Send a code > [tab] Structured > > The phone goes in the path (country code, digits only) and the code is the only variable: > > ```bash theme={null} > curl -X POST \ > -H "x-api-key: YOUR_API_KEY" \ > -H "Content-Type: application/json" \ > -d '{ "variables": ["482913"] }' \ > https://api.vambe.me/api/public/whatsapp/message/send/56912345678/template/{templateId} > ``` > > **Response (201):** > > ```json theme={null} > { > "messageId": "f1e2d3c4-b5a6-4978-8899-aabbccddeeff", > "aiContactId": "b7c9a9e2-4a4b-4f4e-9d2a-1c2d3e4f5a6b", > "ticketId": "0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d", > "contactPhoneNumber": "56912345678", > "channelPhoneNumber": "56211111111", > "variables": [ ... ] > } > ``` > [tab] Smart > > Put the recipient and the code in the body: > > ```bash theme={null} > curl -X POST \ > -H "Content-Type: application/json" \ > -d '{ "phone": "+56 9 1234 5678", "code": "482913" }' \ > "https://api.vambe.me/api/public/whatsapp/message/send/template/{templateId}?x-api-key=YOUR_API_KEY" > ``` > > The body keys can be named in any of these ways: > > | Value | Accepted keys | > | - | - | > | Recipient phone | `phone`, `phone_number`, `phoneNumber`, `to` | > | Code | `code`, `otp`, `otp_code`, `otpCode` | > > Spaces, `+`, parentheses and dashes in the phone are removed. The code can be a string or a number. > > **Response (201):** > > ```json theme={null} > { > "contactId": "b7c9a9e2-4a4b-4f4e-9d2a-1c2d3e4f5a6b", > "messageId": "f1e2d3c4-b5a6-4978-8899-aabbccddeeff", > "contactPhoneNumber": "56912345678", > "channelPhoneNumber": "56211111111" > } > ``` > [tab] Bulk > > Send an array; each item needs its own phone and code: > > ```bash theme={null} > curl -X POST \ > -H "x-api-key: YOUR_API_KEY" \ > -H "Content-Type: application/json" \ > -d '[ > { "phone": "56912345678", "code": "482913" }, > { "phone": "56987654321", "code": "190274" } > ]' \ > https://api.vambe.me/api/public/whatsapp/message/send/template/{templateId}/many > ``` > > Before anything is queued, every item is checked for a usable phone and code. If any item fails that check, the whole request is rejected with the position of each failing item and **nothing is queued**: > > ```json theme={null} > { > "message": "Authentication templates need the recipient and the code in the body, e.g. {\"phone\": \"56912345678\", \"code\": \"123456\"}", > "errors": [ > { "index": 1, "error": "Missing the OTP code. Authentication templates need the recipient and the code in the body, e.g. {\"phone\": \"56912345678\", \"code\": \"123456\"}" } > ] > } > ``` > > When every item passes, the response is `{ "success": true }` and each code is sent in the background, **independently**. A problem with one recipient found while sending (for example, a blocked contact or a number WhatsApp rejects) only affects that item, and the others may already have been sent. The response carries no message IDs. ### Optional parameters * `from-phone-number` (query): the number to send from, when you have more than one, written exactly as it is registered in Vambe (digits with country code, e.g. `56211111111`). * **Structured endpoint:** if the number isn't one the template is approved on, the request fails with `Template cant be sent from this phone number`. * **Smart endpoints:** if it doesn't match any WhatsApp number of your account (mistyped, or formatted differently), the request fails with `from-phone-number … is not a WhatsApp number of this account`. If it's one of your numbers but the template isn't approved on it, it fails with `Template is not valid for this channel`. Either way nothing is sent from another number. * `stage` (query, smart endpoints) or `stageId` (body, structured endpoint): the pipeline stage to put the contact in. *** ## Track delivery For single sends (structured and smart), use the `messageId` from the response with [GET /api/public/whatsapp/message/status/](/reference/whatsapp-message/get-the-delivery-status-of-a-sent-message). It starts as `accepted` and moves through `sent`, `delivered` and `read`, or ends in `failed` with WhatsApp's reason. A `404` right after sending means the message is still being registered: retry after a few seconds. Bulk sends don't return message IDs. If you need to follow each code, send them one by one. *** ## Rules to keep in mind > [accordion] Codes are up to 15 characters > > That is WhatsApp's limit for authentication templates. Longer codes are rejected with `OTP code must be 15 characters or less`. > [accordion] Repeating a request does not resend the code > > The smart endpoints are idempotent: a request identical to a previous one within **10 minutes** counts as one send and returns the original response. "Identical" means the same template, the **whole body**, `stage` and `from-phone-number`: > > * Retrying the exact same request sends nothing new, so to resend a code to the same phone inside that window, generate a new code. > * Any other difference, such as a timestamp or request ID in the body, a different `stage` or another `from-phone-number`, makes it a new request and **sends the code again**. If you rely on this protection against duplicate sends, retry with exactly the same body. > > The structured endpoint is not idempotent: every call sends a message. > [accordion] The recipient needs a phone number > > WhatsApp only delivers authentication templates to phone numbers. A contact Vambe knows only by its WhatsApp username (BSUID), without a phone, can't receive one. > [accordion] Treat the code as a secret > > Generate a new random code for every attempt, keep its expiration short (it should match the minutes set on the template) and never log it in plain text on your side. *** ## Error reference | Status | Message | What to do | | - | - | - | | 400 | `OTP code is required for authentication templates` | Structured endpoint: send the code as the first variable, `{"variables": ["482913"]}`. | | 400 | `Missing the OTP code. …` | Smart endpoints: add the code to the body (`code`, `otp`, `otp_code` or `otpCode`). | | 400 | `Missing the recipient phone. …` | Smart endpoints: add the phone to the body (`phone`, `phone_number`, `phoneNumber` or `to`). | | 400 | `Invalid recipient phone "…"` | Send digits with country code; spaces, `+`, parentheses and dashes are fine. | | 400 | `OTP code must be 15 characters or less` | Shorten the code. | | 400 | `Template cant be sent from this phone number` | Structured endpoint: use a `from-phone-number` the template is approved on, or omit it. | | 400 | `from-phone-number … is not a WhatsApp number of this account` | Smart endpoints: write the number exactly as registered in Vambe (digits with country code), or omit it. | | 400 | `Template is not valid for this channel` | Smart endpoints: use a `from-phone-number` the template is approved on, or omit it. | | 400 | `Authentication templates cannot be sent to BSUID-only contacts. A phone number is required.` | Send to the customer's phone number. | | 401 | `Unauthorized` | Check the API key. | | 429 | `An identical send is already being processed. …` | An identical request is still in flight; retry shortly to get its result. | *** ## Next steps > [card] [Send template messages](/docs/send-template-message) > > Send your other templates with variables. > [card] [Create templates](/docs/create-template) > > Design and submit templates for approval. # Send QR message Source: https://docs.vambe.me/docs/send-qr-message Learn how to send WhatsApp messages through your QR-connected number using Vambe API. ## 🚀 What you'll build You'll send messages through your QR-connected WhatsApp number using the Vambe API. Choose between AI-generated messages or manual control. > [!TIP] > > QR messaging works like WhatsApp Web but with AI automation. Perfect for > personal numbers and quick setup. *** ## Prerequisites * ✅ [Connected WhatsApp QR](/docs/connect-whatsapp-qr) to your Vambe account * ✅ **Phone connected to internet** and WhatsApp QR active * ✅ Valid Vambe API key from [developers page](https://app.vambeai.com/developers) *** ## Two Ways to Send Messages ### Option 1: AI-Generated Messages (Recommended) Let Vambe AI create intelligent messages for you: **1. Get QR Channel ID** ```bash theme={null} curl -X GET \ -H "x-api-key: YOUR_API_KEY" \ https://api.vambe.me/api/public/channels/web-whatsapp ``` Save the `id` field as your phoneId for the ticket endpoint. **2. Get Pipeline Stage ID** ```bash theme={null} curl -X GET \ -H "x-api-key: YOUR_API_KEY" \ https://api.vambe.me/api/public/pipeline ``` Save the stage ID where you want to start the conversation. **3. Create AI-Generated Message** ```bash theme={null} curl -X POST \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "to_phone_number": "+1234567890", "contact_name": "John Doe", "stage_id": "stage_initial_001", "contact_metadata": { "source": "api", "priority": "normal" }, "ticket_metadata": { "topic": "product_inquiry" } }' \ https://api.vambe.me/api/public/ticket/open/web-whatsapp/{phoneId} ``` > [!TIP] > > AI automatically creates appropriate message content and initiates the conversation based on your pipeline configuration. ### Option 2: Manual Message Control For when you want full control over message content: **1. Get QR Channel ID** ```bash theme={null} curl -X GET \ -H "x-api-key: YOUR_API_KEY" \ https://api.vambe.me/api/public/channels/web-whatsapp ``` Save the `id` field as your phoneId. **2. Get Pipeline Stage ID** ```bash theme={null} curl -X GET \ -H "x-api-key: YOUR_API_KEY" \ https://api.vambe.me/api/public/pipeline ``` Save the stage ID where you want to send the message. **3. Send Your Custom Message** ```bash theme={null} curl -X POST \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "message": "Hello! This is a custom message from Vambe.", "stage": "stage_initial_001", "toPhoneNumber": "+1234567890", "contactName": "John Doe", "metaData": {} }' \ https://api.vambe.me/api/public/web-whatsapp-message/send/1001/message ``` *** ## What Happens Behind the Scenes When you send a message through QR API, Vambe automatically: > [card] AI Processing > > * **Extracts contact data** using GPT > * **Creates or updates** contact records > * **Generates intelligent content** (ticket mode) > * **Validates data format** automatically > [card] Conversation Management > > * **Links contact to pipeline** stage > * **Preserves conversation** history > * **Tracks customer journey** progression > * **Enables AI responses** for incoming messages *** ## API Comparison | Feature | AI-Generated (Ticket) | Manual Message | | - | - | - | | **Setup** | 3 steps | 3 steps | | **Message Creation** | AI creates content | You write content | | **Required Fields** | Minimal | All manual | | **Best For** | Automation | Full control | *** ## Error Handling > [accordion] Phone Offline (503) > > **If your phone is disconnected:** > > * Check phone internet connection > * Ensure WhatsApp is running > * Reconnect QR in Vambe dashboard > [accordion] Invalid Stage (400) > > **If stage ID doesn't exist:** > > * Get stage ID from pipeline API > * Verify pipeline is active > * Check stage belongs to your account > [accordion] Rate Limit (429) > > **If too many messages:** > > * QR limit: \~250 messages/day > * Add delays between messages > * Consider Business API for higher volume *** ## Next Steps > [!TIP] > > You're now ready to send messages through your WhatsApp QR connection. > [card] [Configure AI Assistant](/docs/create-pipeline) > > Train your AI to handle customer responses automatically > [card] [Monitor Analytics](/docs/analytics) > > Track message performance and customer engagement > [card] [Create Pipelines](/docs/create-pipeline) > > Build conversation flows for automated customer journeys > [card] [Upgrade to Business API](/docs/connect-whatsapp-api) > > Scale to higher limits with official Meta integration > [!NOTE] > > **Pro Tip:** Start with AI-generated messages for easier setup, then use > manual control when you need specific content formatting. # Send a template message Source: https://docs.vambe.me/docs/send-template-message Learn how to send WhatsApp template messages via Vambe API for notifications, confirmations, and marketing campaigns. ## 🚀 What you'll build You'll send your first WhatsApp template message using the Vambe API with the correct 3-step flow to gather required IDs. > [!TIP] > > Template messages allow you to reach customers outside the 24-hour window and > send structured, pre-approved content for notifications and marketing. *** ## Prerequisites Before sending template messages, ensure you have: * ✅ [Connected WhatsApp Business API](/docs/connect-whatsapp-api) * ✅ [Created and approved templates](/docs/create-template) * ✅ Valid Vambe API key from [developers page](https://app.vambeai.com/developers) * ✅ Customer phone numbers (must have opted in to receive messages) > [!WARNING] > > **Important:** Only send template messages to customers who have explicitly > opted in. Sending unsolicited messages violates WhatsApp's policies and can > result in account suspension. *** ## Complete API Flow for Sending Templates To send a template message, you need to make 3 API calls in sequence to get the required IDs: **1. Get Channel Information** First, retrieve your channel details: ```bash theme={null} curl -X GET \ -H "x-api-key: YOUR_API_KEY" \ https://api.vambe.me/api/public/channels/whatsapp ``` **Sample Response:** ```json theme={null} { "phone_number": "56211111111", "client_id": "339e9487-8168-4e14-b1d8-3dce22d07760", "id": 1951, "name": "Test" } ``` > [!TIP] > > This endpoint retrieves the channel configuration by type. Use `whatsapp`, `instagram`, `web-whatsapp`, or `playground` as channel types. Save the `phone_number` and `client_id` for the template call. **2. Get Pipeline and Stage IDs** Retrieve your pipeline configuration to get stage IDs: ```bash theme={null} curl -X GET \ -H "x-api-key: YOUR_API_KEY" \ https://api.vambe.me/api/public/pipeline ``` **Sample Response:** ```json theme={null} [ { "id": "6c9804e2-0b8d-4df1-98f7-7e5be7f69ddb", "name": "Support Iris", "description": "Este embudo califica leads que ten", "stages": [ { "id": "72ba8482-5c1c-4bed-8a6e-16fdb1495776", "name": "Inicial", "description": "En esta etapa la IA de Vambe i" }, { "id": "3690b160-3c79-45f2-b88f-b640d96a36aa", "name": "Asistencia Humana", "description": "Si es que en cualquier punto d" } ] } ] ``` > [!WARNING] > > **Save the stage ID** where you want to send the message. You'll need this `stageId` parameter for the template call. **3. Get Template ID** Find your approved template ID: ```bash theme={null} curl -X GET \ -H "x-api-key: YOUR_API_KEY" \ https://api.vambe.me/api/public/templates ``` **Look for your template name and copy its ID for the final call.** **4. Send the Template Message** Now send your template using the collected IDs: ```bash theme={null} curl -X POST \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "contactName": "John Doe", "variables": ["John Doe", "ORD-12345", "89.99"], "meta_data": {}, "stageId": "72ba8482-5c1c-4bed-8a6e-16fdb1495776" }' \ https://api.vambe.me/api/public/whatsapp/message/send/{phone}/template/{templateId} ``` > [!NOTE] > > **The recipient goes in the path:** `{phone}` is the destination number with country code, digits only (e.g. `56912345678`). > > **Body fields:** > > * `contactName`: Customer name > * `variables`: Array of values for template variables (in order) > * `stageId`: Stage ID from pipeline response > * `meta_data`: Additional metadata object (can be empty) > * `agent_id`: (Optional) Agent ID to assign to the conversation **5. Handle the Response** Process the API response to confirm delivery: ```json theme={null} { "messageId": "f1e2d3c4-b5a6-4978-8899-aabbccddeeff", "aiContactId": "b7c9a9e2-4a4b-4f4e-9d2a-1c2d3e4f5a6b", "ticketId": "0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d", "contactPhoneNumber": "56912345678", "channelPhoneNumber": "56211111111", "variables": [ ... ] } ``` The message is queued for delivery. Use `messageId` with [GET /api/public/whatsapp/message/status/](/reference/whatsapp-message/get-the-delivery-status-of-a-sent-message) to follow it until it is delivered or read. **Response codes:** * `201`: Message sent successfully * `400`: Bad request (check required fields) * `401`: Unauthorized (verify API key) *** > [!NOTE] > > **Sending verification codes?** Authentication (OTP) templates only take the code. See [Send verification codes (OTP)](/docs/send-otp-message). *** ## Vambe Template Examples ### Simple Template (No Variables) ```bash Welcome Message theme={null} curl -X POST \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "contactName": "John Doe", "variables": [], "meta_data": {}, "stageId": "72ba8482-5c1c-4bed-8a6e-16fdb1495776" }' \ https://api.vambe.me/api/public/whatsapp/message/send/1234567890/template/welcome_message_id ``` ```javascript JavaScript theme={null} const response = await fetch( 'https://api.vambe.me/api/public/whatsapp/message/send/1234567890/template/welcome_message_id', { method: 'POST', headers: { 'x-api-key': process.env.VAMBE_API_KEY, 'Content-Type': 'application/json', }, body: JSON.stringify({ contactName: 'John Doe', variables: [], meta_data: {}, stageId: '72ba8482-5c1c-4bed-8a6e-16fdb1495776' }), }, ); ``` ```python Python theme={null} import requests response = requests.post( 'https://api.vambe.me/api/public/whatsapp/message/send/1234567890/template/welcome_message_id', headers={ 'x-api-key': os.environ['VAMBE_API_KEY'], 'Content-Type': 'application/json' }, json={ "contactName": "John Doe", "variables": [], "meta_data": {}, "stageId": "72ba8482-5c1c-4bed-8a6e-16fdb1495776" } ) ``` ### Template with Variables ```bash Order Confirmation theme={null} curl -X POST \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "contactName": "Sarah Johnson", "variables": ["Sarah Johnson", "ORD-12345", "$159.99", "December 28, 2024"], "meta_data": { "order_id": "ORD-12345", "customer_type": "premium", "payment_method": "credit_card" }, "stageId": "72ba8482-5c1c-4bed-8a6e-16fdb1495776" }' \ https://api.vambe.me/api/public/whatsapp/message/send/1234567890/template/order_confirmation_id ``` ```javascript Appointment Reminder theme={null} const response = await fetch( 'https://api.vambe.me/api/public/whatsapp/message/send/1234567890/template/appointment_reminder_id', { method: 'POST', headers: { 'x-api-key': process.env.VAMBE_API_KEY, 'Content-Type': 'application/json', }, body: JSON.stringify({ contactName: 'Dr. Smith', variables: [ 'Dr. Smith', 'January 15, 2024', '2:30 PM', 'Downtown Medical Center', ], meta_data: { appointment_id: 'APT-789', department: 'cardiology', patient_id: 'PAT-456', }, stageId: '3690b160-3c79-45f2-b88f-b640d96a36aa' }), }, ); ``` ```python Payment Reminder theme={null} import requests response = requests.post( 'https://api.vambe.me/api/public/whatsapp/message/send/1234567890/template/payment_reminder_id', headers={ 'x-api-key': os.environ['VAMBE_API_KEY'], 'Content-Type': 'application/json' }, json={ "contactName": "Mike Wilson", "variables": ["Mike Wilson", "INV-2024-001", "$250.00", "January 20, 2024"], "meta_data": { "invoice_id": "INV-2024-001", "payment_method": "bank_transfer", "due_date": "2024-01-20" }, "stageId": "72ba8482-5c1c-4bed-8a6e-16fdb1495776" } ) ``` ### Carousel Template Carousel templates allow you to send multiple product cards with images, descriptions, and action buttons in a single message. > [!NOTE] > > The `from-phone-number` query parameter specifies which WhatsApp Business number to send from. This is useful when you have multiple phone numbers connected to your account. ```bash Product Carousel theme={null} curl -X POST \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "variables": ["Customer Name", "Store Name"], "meta_data": {}, "carouselVariables": [ { "cardIndex": 0, "headerVariable": "https://example.com/product1.jpg", "bodyVariables": ["15000"], "buttonVariables": ["https://store.com/product1"] }, { "cardIndex": 1, "headerVariable": "https://example.com/product2.jpg", "bodyVariables": ["16000"], "buttonVariables": ["https://store.com/product2"] }, { "cardIndex": 2, "headerVariable": "https://example.com/product3.jpg", "bodyVariables": ["13000"], "buttonVariables": ["https://store.com/product3"] } ] }' \ "https://api.vambe.me/api/public/whatsapp/message/send/+1234567890/template/{templateId}?from-phone-number=+1987654321" ``` ```javascript Product Carousel theme={null} const response = await fetch( 'https://api.vambe.me/api/public/whatsapp/message/send/+1234567890/template/{templateId}?from-phone-number=+1987654321', { method: 'POST', headers: { 'x-api-key': process.env.VAMBE_API_KEY, 'Content-Type': 'application/json', }, body: JSON.stringify({ variables: ['Customer Name', 'Store Name'], meta_data: {}, carouselVariables: [ { cardIndex: 0, headerVariable: 'https://example.com/product1.jpg', bodyVariables: ['15000'], buttonVariables: ['https://store.com/product1'], }, { cardIndex: 1, headerVariable: 'https://example.com/product2.jpg', bodyVariables: ['16000'], buttonVariables: ['https://store.com/product2'], }, { cardIndex: 2, headerVariable: 'https://example.com/product3.jpg', bodyVariables: ['13000'], buttonVariables: ['https://store.com/product3'], }, ], }), }, ); ``` ```python Product Carousel theme={null} import requests import os response = requests.post( 'https://api.vambe.me/api/public/whatsapp/message/send/+1234567890/template/{templateId}?from-phone-number=+1987654321', headers={ 'x-api-key': os.environ['VAMBE_API_KEY'], 'Content-Type': 'application/json' }, json={ "variables": ["Customer Name", "Store Name"], "meta_data": {}, "carouselVariables": [ { "cardIndex": 0, "headerVariable": "https://example.com/product1.jpg", "bodyVariables": ["15000"], "buttonVariables": ["https://store.com/product1"] }, { "cardIndex": 1, "headerVariable": "https://example.com/product2.jpg", "bodyVariables": ["16000"], "buttonVariables": ["https://store.com/product2"] }, { "cardIndex": 2, "headerVariable": "https://example.com/product3.jpg", "bodyVariables": ["13000"], "buttonVariables": ["https://store.com/product3"] } ] } ) ``` *** ## Understanding Vambe Template Format The destination number goes in the path (`/send/{phone}/template/{templateId}`). These are the body fields: | Field | Type | Required | Description | | - | - | - | - | | `contactName` | string | Optional | Customer's name for personalization | | `variables` | string\[] | Required | Array of values for template variables in order | | `meta_data` | object | Optional | Additional metadata (key-value pairs) | | `stageId` | string | Optional | Pipeline stage ID where to send the message | | `carouselVariables` | object\[] | Optional | Variables for carousel template cards (see below) | > [!NOTE] > > **Variable Order:** The `variables` array must match the order of variables in your template. If your template has `{{1}}` for name and `{{2}}` for order number, then `variables: ["John Doe", "ORD-123"]`. ### Carousel Card Variables When sending carousel templates, each card in the `carouselVariables` array has the following structure: | Field | Type | Required | Description | | - | - | - | - | | `cardIndex` | number | Required | Zero-based index of the carousel card (0, 1, 2, ...) | | `headerVariable` | string | Required | URL for the card's header image or video | | `bodyVariables` | string\[] | Optional | Array of variables for the card's body text | | `buttonVariables` | string\[] | Optional | Array of variables for the card's buttons (e.g., URLs) | > [!TIP] > > **Carousel Templates** allow you to send multiple cards with images/videos in a single message. Each card can have its own header media, body text variables, and button actions. Cards are indexed starting from 0. *** ## Alternative Endpoint: Body-based V2 There's an alternative endpoint that accepts all parameters in the request body, including the phone number and template name: **Endpoint:** `POST /api/public/whatsapp/message/send` ### V2 Request Body Schema | Field | Type | Required | Description | | - | - | - | - | | `phone` | string | Required | Phone number to send the template to | | `template_name` | string | Required | Name of the template to send | | `contact_name` | string | Optional | Customer's name for personalization | | `variables` | string\[] | Required | Array of values for template variables in order | | `meta_data` | object | Optional | Additional metadata (key-value pairs) | | `stage_id` | string | Optional | Pipeline stage ID where to send the message | | `agent_id` | string | Optional | Agent ID to assign to the conversation | | `from_phone_number` | string | Optional | Phone number to send the template from | | `carouselVariables` | object\[] | Optional | Variables for carousel template cards (same as above) | ### V2 Carousel Template Example ```bash V2 Product Carousel theme={null} curl -X POST \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "phone": "+1234567890", "template_name": "product_carousel", "contact_name": "John Doe", "variables": ["John Doe", "Store Name"], "meta_data": {}, "from_phone_number": "+1987654321", "carouselVariables": [ { "cardIndex": 0, "headerVariable": "https://example.com/product1.jpg", "bodyVariables": ["15000"], "buttonVariables": ["https://store.com/product1"] }, { "cardIndex": 1, "headerVariable": "https://example.com/product2.jpg", "bodyVariables": ["16000"], "buttonVariables": ["https://store.com/product2"] } ] }' \ https://api.vambe.me/api/public/whatsapp/message/send ``` ```javascript V2 Product Carousel theme={null} const response = await fetch( 'https://api.vambe.me/api/public/whatsapp/message/send', { method: 'POST', headers: { 'x-api-key': process.env.VAMBE_API_KEY, 'Content-Type': 'application/json', }, body: JSON.stringify({ phone: '+1234567890', template_name: 'product_carousel', contact_name: 'John Doe', variables: ['John Doe', 'Store Name'], meta_data: {}, from_phone_number: '+1987654321', carouselVariables: [ { cardIndex: 0, headerVariable: 'https://example.com/product1.jpg', bodyVariables: ['15000'], buttonVariables: ['https://store.com/product1'], }, { cardIndex: 1, headerVariable: 'https://example.com/product2.jpg', bodyVariables: ['16000'], buttonVariables: ['https://store.com/product2'], }, ], }), }, ); ``` ```python V2 Product Carousel theme={null} import requests import os response = requests.post( 'https://api.vambe.me/api/public/whatsapp/message/send', headers={ 'x-api-key': os.environ['VAMBE_API_KEY'], 'Content-Type': 'application/json' }, json={ "phone": "+1234567890", "template_name": "product_carousel", "contact_name": "John Doe", "variables": ["John Doe", "Store Name"], "meta_data": {}, "from_phone_number": "+1987654321", "carouselVariables": [ { "cardIndex": 0, "headerVariable": "https://example.com/product1.jpg", "bodyVariables": ["15000"], "buttonVariables": ["https://store.com/product1"] }, { "cardIndex": 1, "headerVariable": "https://example.com/product2.jpg", "bodyVariables": ["16000"], "buttonVariables": ["https://store.com/product2"] } ] } ) ``` > [!NOTE] > > The V2 endpoint uses `template_name` instead of `templateId` in the URL path, and uses snake\_case for field names (`contact_name`, `stage_id`, `from_phone_number`) instead of camelCase. *** ## Advanced Use Cases ### Bulk Template Sending Send templates to multiple customers efficiently: ```javascript Bulk Send theme={null} const customers = [ { name: "John Doe", phone: "1234567890", orderId: "ORD-001" }, { name: "Jane Smith", phone: "1987654321", orderId: "ORD-002" }, { name: "Bob Johnson", phone: "1555123456", orderId: "ORD-003" } ]; const results = await Promise.allSettled( customers.map(async (customer) => { const response = await fetch( `https://api.vambe.me/api/public/whatsapp/message/send/${customer.phone}/template/order_confirmation_id`, { method: 'POST', headers: { 'x-api-key': process.env.VAMBE_API_KEY, 'Content-Type': 'application/json' }, body: JSON.stringify({ contactName: customer.name, variables: [customer.name, customer.orderId], meta_data: { order_id: customer.orderId }, stageId: '72ba8482-5c1c-4bed-8a6e-16fdb1495776' }) } ); return { customer: customer.name, result: await response.json() }; }) ); console.log('Bulk send results:', results); ``` ```python Batch Processing theme={null} import requests import time from concurrent.futures import ThreadPoolExecutor def send_template_message(customer): try: response = requests.post( f"https://api.vambe.me/api/public/whatsapp/message/send/{customer['phone']}/template/order_confirmation_id", headers={ 'x-api-key': os.environ['VAMBE_API_KEY'], 'Content-Type': 'application/json' }, json={ "contactName": customer['name'], "variables": [customer['name'], customer['order_id']], "meta_data": {"order_id": customer['order_id']}, "stageId": "72ba8482-5c1c-4bed-8a6e-16fdb1495776" } ) return {"customer": customer['name'], "success": response.status_code == 201} except Exception as e: return {"customer": customer['name'], "error": str(e)} # Rate-limited batch sending customers = [ {"phone": "1234567890", "name": "John Doe", "order_id": "ORD-001"}, {"phone": "1987654321", "name": "Jane Smith", "order_id": "ORD-002"} ] with ThreadPoolExecutor(max_workers=5) as executor: results = list(executor.map(send_template_message, customers)) print("Batch results:", results) ``` *** ## Error Handling ### Common Error Responses > [accordion] Template Not Found (404) > > ```json theme={null} > { > "error": "Template not found", > "code": "TEMPLATE_NOT_FOUND", > "details": "Template ID 'invalid_template_id' does not exist or is not approved" > } > ``` > > **Solutions:** > > * Verify template ID is correct > * Check template approval status in Vambe dashboard > * Ensure template exists for your account > [accordion] Invalid Stage ID (400) > > ```json theme={null} > { > "error": "Invalid stage ID", > "code": "INVALID_STAGE_ID", > "details": "Stage ID does not exist in your pipelines" > } > ``` > > **Solutions:** > > * Check stage ID from pipeline API response > * Verify stage belongs to your account > * Ensure pipeline is active and configured > [accordion] Invalid Phone Number (400) > > ```json theme={null} > { > "error": "Invalid recipient", > "code": "INVALID_PHONE_NUMBER", > "details": "Phone number must include country code" > } > ``` > > **Solutions:** > > * Include country code (e.g., +1 for US) > * Validate phone number format > * Ensure number is active on WhatsApp > [accordion] Rate Limit Exceeded (429) > > ```json theme={null} > { > "error": "Rate limit exceeded", > "code": "RATE_LIMIT_EXCEEDED", > "retry_after": 3600 > } > ``` > > **Solutions:** > > * Implement exponential backoff retry logic > * Check your messaging tier limits > * Spread messages over longer time periods ### Robust Error Handling Example ```javascript Error Handling theme={null} async function sendVambeTemplate(contactName, variables, stageId, toPhoneNumber, templateId) { try { const response = await fetch( `https://api.vambe.me/api/public/whatsapp/message/send/${toPhoneNumber}/template/${templateId}`, { method: 'POST', headers: { 'x-api-key': process.env.VAMBE_API_KEY, 'Content-Type': 'application/json' }, body: JSON.stringify({ contactName, variables, meta_data: {}, stageId }) } ); if (!response.ok) { const error = await response.json(); throw new Error(`API Error: ${error.code} - ${error.details}`); } const result = await response.json(); console.log('Message sent successfully:', result.messageId); return result; } catch (error) { console.error('Failed to send template message:', error.message); // Handle specific error cases if (error.message.includes('RATE_LIMIT_EXCEEDED')) { console.log('Rate limit hit, retrying in 1 hour...'); // Implement retry logic } else if (error.message.includes('TEMPLATE_NOT_FOUND')) { console.log('Template needs to be created or approved'); } throw error; } } // Usage with error handling try { await sendVambeTemplate( "John Doe", ["John Doe", "ORD-12345"], "72ba8482-5c1c-4bed-8a6e-16fdb1495776", "1234567890", "order_confirmation_template_id" ); } catch (error) { console.error('Template message failed:', error); } ``` ```python Error Handling theme={null} import requests import time from typing import List, Dict def send_vambe_template( contact_name: str, variables: List[str], stage_id: str, to_phone: str, template_id: str ) -> Dict: url = f"https://api.vambe.me/api/public/whatsapp/message/send/{to_phone}/template/{template_id}" payload = { "contactName": contact_name, "variables": variables, "meta_data": {}, "stageId": stage_id } headers = { 'x-api-key': os.environ['VAMBE_API_KEY'], 'Content-Type': 'application/json' } try: response = requests.post(url, json=payload, headers=headers) if response.status_code == 429: # Rate limit retry_after = response.headers.get('Retry-After', 3600) print(f"Rate limited. Retrying after {retry_after} seconds") time.sleep(int(retry_after)) return send_vambe_template(contact_name, variables, stage_id, to_phone, template_id) response.raise_for_status() result = response.json() print(f"Message sent successfully: {result.get('messageId')}") return result except requests.exceptions.HTTPError as e: error_data = e.response.json() if e.response.content else {} error_code = error_data.get('code', 'UNKNOWN_ERROR') error_details = error_data.get('details', str(e)) print(f"HTTP Error {e.response.status_code}: {error_code} - {error_details}") if error_code == 'TEMPLATE_NOT_FOUND': print("Check if template exists and is approved") elif error_code == 'INVALID_STAGE_ID': print("Verify stage ID from pipeline API") raise except requests.exceptions.RequestException as e: print(f"Request failed: {e}") raise # Usage try: send_vambe_template( "Jane Smith", ["Jane Smith", "ORD-67890"], "72ba8482-5c1c-4bed-8a6e-16fdb1495776", "1234567890", "order_confirmation_template_id" ) except Exception as e: print(f"Failed to send template: {e}") ``` *** ## Best Practices > [card] Message Timing > > * **Respect time zones** - Send during business hours > * **Consider urgency** - Use appropriate delivery timing > * **Batch wisely** - Spread bulk sends over time > * **Avoid peak hours** - Prevent rate limiting > [card] Content Optimization > > * **Personalize content** - Use customer data effectively - **Keep variables > relevant** - Don't include unnecessary data - **Test thoroughly** - Verify all > variable combinations - **Monitor performance** - Track delivery and > engagement > [card] Compliance > > * **Verify opt-ins** - Only message consenting customers - **Honor opt-outs** > * Respect unsubscribe requests - **Follow policies** - Adhere to WhatsApp > guidelines - **Document consent** - Keep records of permissions > [card] Technical Excellence > > * **Handle errors gracefully** - Implement proper error handling > * **Use rate limiting** - Respect API limits > * **Monitor delivery** - Track message status > * **Log thoroughly** - Maintain audit trails *** ## Next Steps > [!TIP] > > Congratulations! You've successfully sent your first WhatsApp template > message. Now you can: > [card] [Automate with Pipelines](/docs/create-pipeline) > > Integrate template messages into automated conversation flows > [card] [Track Performance](/docs/analytics) > > Monitor delivery rates, engagement, and customer responses > [card] [Webhook Integration](/docs/webhooks) > > Set up real-time notifications for message status updates > [card] [Channel Management](/docs/connect-channel) > > Connect additional channels for multi-platform messaging > [!NOTE] > > **Remember:** Template messages are powerful tools for customer communication. > Use them responsibly and always prioritize customer value and consent. # Webchat Integration Guide Source: https://docs.vambe.me/docs/webchat-integration Learn how to integrate Vambe Webchat into your website. Add AI-powered customer support directly to your web pages in minutes. ## Overview The Vambe Webchat is a powerful tool that allows customers to interact with your AI assistant directly from your website, enabling real-time communication and instant support. ## Quick Start ### Prerequisites * Active Vambe account * Access to your website's HTML code * Your Vambe API credentials ### Installation Steps **1. Access Your Vambe Account** Log in to your Vambe account at [app.vambeai.com](https://app.vambeai.com) **2. Navigate to Channels & Accounts** Go to **Settings** → **Channels & Accounts** You can access this directly at: [app.vambeai.com/settings?q=channels](https://app.vambeai.com/settings?q=channels) **3. Add Webchat Channel** 1. Click **"Add Channel"** 2. Select **"Webchat"** from the available options 2. Give your webchat channel a descriptive name (internal use only, not visible to customers) **4. Get Your Integration Code** 1. Click on the newly created Webchat channel 2. Click the three dots menu (⋮) 3. Select the code icon (`<>`) 4. Copy the provided script code **5. Add Code to Your Website** Paste the copied code into the `
` section of your website's HTML, preferably just before the closing `` tag. ```html theme={null}