Un avviso di nuovo disponibile è un messaggio WhatsApp che dice a un cliente che un prodotto per cui ha chiesto si può di nuovo acquistare. La pagina di categorizzazione di Meta non parla mai di avvisi di riassortimento, e gli esempi più vicini sono marketing. Quindi progetta l’avviso come modello marketing. Invialo solo a chi ha dato l’opt-in per questa categoria, una volta per richiesta, quando il tuo stock passa da zero a più di zero.
Un modulo “Notify me” (Avvisami) registra la richiesta con il testo del consenso. Il webhook inventory_levels/update di Shopify ti dice che lo stock è cambiato. Il tuo servizio invia un modello marketing con un link al carrello e un pulsante “Stop alerts” (Interrompi gli avvisi). Il tocco o il link tornano a te. Un webhook orders/create con quella variante segna la richiesta come convertita.
Cosa dice la pagina di categorizzazione di Meta, e cosa tace
Nessuna di queste parole compare nella pagina di categorizzazione dei modelli di Meta (consultata il 2026-11-27): “stock”, “restock”, “back in stock”, “inventory”, “availability” o “waitlist”. Nessuna pagina di Meta citata qui classifica direttamente questo avviso.
Le regole più vicine indicano tutte il marketing. L’obiettivo di retargeting copre i messaggi che «Promuovono o raccomandano offerte, prodotti o servizi», e Meta aggiunge «Sono marketing anche se richiesti dagli utenti». La sua riga di esempio è un avviso di disponibilità richiesto dall’utente: «Abbiamo trovato un’auto {{car}} che corrisponde alla tua ricerca salvata. Accedi alla nostra app per vederla». Meta classifica quella riga come marketing.
Il test utility chiede più di una richiesta. Un modello utility «Deve essere non promozionale, senza alcun intento promozionale o persuasivo». Deve anche essere «specifico per l’utente o da lui richiesto», «chiaramente legato al suo ordine, account, servizi o transazioni». Un avviso di riassortimento è richiesto, ma il suo scopo è una nuova vendita.
L’unico caso di stock che Meta classifica come utility riguarda un ordine già fatto: «Purtroppo un articolo del tuo ordine {{number}} è in arretrato». Prosegue con «Ti aggiorneremo con una data di spedizione stimata» e offre un rimborso. Una notizia sullo stock relativa a un ordine esistente è utility. Una notizia sullo stock che invita a un nuovo acquisto è marketing.
La Template Library non offre scorciatoie. I modelli della libreria sono «già stati categorizzati come utility o authentication», e nessuno copre i riassortimenti (Template Library, consultato il 2026-11-27).
Registra il consenso insieme alla richiesta
Meta raccomanda di «Ottenere un opt-in separato per ogni categoria di messaggi» (ottenere l’opt-in, consultato il 2026-11-27). Un modulo “Notify me” è il posto naturale per farlo, perché la persona dice esattamente cosa vuole. Nell’etichetta nomina il negozio e il canale: “Scrivimi su WhatsApp da SHOP_NAME quando questo articolo torna disponibile”.
Salva una riga per richiesta con l’ID variante, il telefono in formato internazionale, il testo esatto del consenso, il timestamp, l’URL della pagina e uno stato. Shopify non ha un elenco nativo di iscritti agli avvisi di riassortimento, quindi questa tabella è tua. Altri schemi di raccolta sono in come raccogliere l’opt-in WhatsApp.
Quel consenso copre un avviso su questo prodotto. Non copre la tua newsletter, e termina quando l’avviso è stato inviato.
L’evento di inventario è per sede
Iscriviti a inventory_levels/update. L’elenco dei topic di Shopify dice che «Si verifica ogni volta che un livello di inventario viene aggiornato. Richiede lo scope read_inventory» (topic dei webhook, consultato il 2026-11-27). L’esempio di riferimento di Shopify è questo:
{
"inventory_item_id": 271878346596884015,
"location_id": 24826418,
"available": 10,
"updated_at": "2021-12-31T19:00:00-05:00",
"admin_graphql_api_id": "gid://shopify/InventoryLevel/24826418?inventory_item_id=271878346596884015"
}
available è la quantità in una sede, non nell’intero negozio. Un riassortimento in un magazzino e una vendita in un altro arrivano come due consegne. Se invii un avviso a ogni aggiornamento con available > 0, un cliente riceve un messaggio ogni volta che cambia una qualsiasi sede.
Tieni invece un tuo stato. Salva l’ultimo available per sede, sommalo per articolo di inventario, e agisci solo sul passaggio da un totale di zero a un totale sopra zero. Ignora una consegna il cui updated_at è più vecchio di quello salvato per quella sede, perché le consegne possono arrivare fuori ordine.
Inizializza quello stato al deploy. Il servizio qui sotto parte vuoto e tratta un totale sconosciuto come zero, il che è corretto per un articolo che qualcuno sta aspettando.
Collega l’articolo di inventario a una variante
Il webhook nomina un articolo di inventario, e le tue richieste nominano una variante. Shopify segna InventoryItem.variant come deprecato senza indicare un sostituto. Usa la connection variants, una ProductVariantConnection, con read_inventory o read_products (InventoryItem, consultato il 2026-11-27). Il servizio mette in cache la risposta per ogni articolo.
Il modello e il link
Scrivi un modello MARKETING personalizzato. Il corpo nomina il prodotto e ricorda al cliente che l’ha chiesto. Un pulsante URL apre il carrello, e una risposta rapida permette di interrompere gli avvisi. Sostituisci SHOP_NAME e il dominio prima di eseguirlo.
Il TTL di 12 ore è il minimo per il marketing secondo la pagina sul time-to-live di Meta (consultata il 2026-11-27), e si applica agli invii tramite la Marketing Messages API. È adatto a un avviso, perché un riassortimento può esaurirsi di nuovo nel giro di un giorno.
curl -X POST "https://graph.facebook.com/v26.0/$WABA_ID/message_templates" \
-H "Authorization: Bearer $WA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "restock_alert_v1",
"category": "MARKETING",
"language": "en_US",
"parameter_format": "NAMED",
"message_send_ttl_seconds": 43200,
"components": [
{
"type": "BODY",
"text": "The item you asked about, {{product_name}}, is back in stock at SHOP_NAME. Tap below to open it in your cart.",
"example": { "body_text_named_params": [ { "param_name": "product_name", "example": "Trail jacket - Blue / M" } ] }
},
{
"type": "BUTTONS",
"buttons": [
{ "type": "URL", "text": "Open cart", "url": "https://shop.example.com/r/{{1}}", "example": ["https://shop.example.com/r/q8Rk2LmZ0pXa"] },
{ "type": "QUICK_REPLY", "text": "Stop alerts" }
]
}
]
}'
Il pulsante URL porta l’ID della richiesta e punta al tuo redirect. Il redirect registra il clic e manda il cliente al permalink del carrello di Shopify, https://{shop}/cart/{variant_id}:1?storefront=true. Senza ?storefront=true, il permalink porta direttamente al checkout (permalink del carrello, consultato il 2026-11-27).
Non promettere di tenere da parte l’articolo. Shopify non documenta alcuna API di prenotazione o di blocco del carrello, e un permalink non riserva nulla. Se vuoi una prenotazione morbida, deve stare nella tua logica di stock.
Invialo come marketing, con tutte le regole del marketing
Invia a POST /<PHONE_NUMBER_ID>/marketing_messages. Accetta lo stesso body di /messages e restituisce messages[].id. La Cloud API smette di supportare i messaggi di marketing il 13 ottobre 2027, e gli account creati dal 13 aprile 2027 non possono inviare marketing da lì in nessun caso (panoramica della MM API, consultato il 2026-11-27). L’endpoint e le sue opzioni sono nella guida alla Marketing Messages API.
Le regole del recupero del checkout abbandonato valgono qui senza modifiche. Un limite di marketing per utente fa fallire l’invio con 131049, e Meta dice di «attendere almeno 24 ore prima di tentare di nuovo l’invio». La stessa pagina dice che «WhatsApp al momento non consegna messaggi modello di marketing agli utenti WhatsApp con numeri di telefono degli Stati Uniti» (limiti per utente, consultato il 2026-11-27).
«Da marzo 2027, verrà restituito 131066 al posto di 131049», secondo il changelog della MM API di Meta (consultato il 2026-11-27). Un utente che ha interrotto il marketing fa fallire il tuo invio con 131050, e un webhook user_preferences porta lo stop o il resume.
Un avviso di riassortimento è uno dei pochi invii marketing in cui un singolo nuovo tentativo ha senso. Il cliente vuole ancora l’articolo. Il servizio ritenta una volta, 24 ore dopo un 131049 o un 131066, e solo se l’articolo è ancora disponibile. La memorizzazione degli opt-out è in opt-out dal marketing WhatsApp.
Chi riceve l’avviso, e in che ordine
Su un passaggio di riassortimento, il servizio invia alle richieste in attesa per quella variante nell’ordine in cui sono arrivate. Ogni richiesta vale una sola volta: dopo l’invio passa a notified e non invia più nulla.
Se dieci persone aspettano due unità, tutte e dieci ricevono l’avviso. Alcuni negozi preferiscono limitare ogni passaggio a un multiplo delle unità disponibili e lasciare in attesa gli altri. È una scelta commerciale, e le pagine di Meta non ne parlano. Un progetto con limite ha bisogno di un altro trigger per chi resta in attesa, perché uno stock che rimane sopra zero non produce un nuovo passaggio.
La risposta, il clic e l’ordine
Un tocco su “Stop alerts” arriva come webhook messages con type: "button", un button.payload e un context.id uguale all’ID del messaggio del modello (webhook button, consultato il 2026-11-27). Il servizio imposta il payload a stop_alerts:<request_id> e accetta anche il testo del pulsante. Rimuove ogni richiesta aperta di quel telefono e risponde nella finestra aperta dal tocco. Uno “stop” scritto fa lo stesso.
Un tocco sul pulsante URL raggiunge /r/<request_id>, che registra clickedAt e reindirizza. Un orders/create con quella variante e lo stesso telefono segna la richiesta come converted e applica all’ordine il tag whatsapp-restock-alert. I telefoni degli ordini possono essere vuoti o formattati in modo diverso, quindi aspettati di perdere qualche corrispondenza. I campi telefono di Shopify sono trattati in webhook degli ordini Shopify verso WhatsApp.
Il servizio completo
Questo file per Node 18+ gira con npm install express. Verifica l’HMAC di Shopify e X-Hub-Signature-256 di Meta, deduplica su X-Shopify-Webhook-Id e sugli ID dei messaggi di Meta, e usa la Admin GraphQL API, versione 2026-10. Nell’esempio lo stato vive in memoria. Metti /notify-me dietro una protezione del tuo storefront, per esempio un captcha, prima di andare in produzione.
// back-in-stock.js. Node 18+. npm install express
const crypto = require("crypto");
const express = require("express");
const {
SHOP, SHOPIFY_CLIENT_ID, SHOPIFY_CLIENT_SECRET,
WA_TOKEN, PHONE_NUMBER_ID, APP_SECRET, VERIFY_TOKEN,
SKIP_PREFIXES = "1", DEFAULT_COUNTRY_CODE = "", PORT = "3000",
} = process.env;
const STORE_URL = process.env.STORE_URL || `https://${SHOP}.myshopify.com`;
const ADMIN_URL = `https://${SHOP}.myshopify.com/admin/api/2026-10/graphql.json`;
const GRAPH = `https://graph.facebook.com/v26.0/${PHONE_NUMBER_ID}`;
const DAY_MS = 24 * 60 * 60 * 1000;
const seen = new Set(); // X-Shopify-Webhook-Id and Meta message ids
const requests = new Map(); // request id -> row
const users = new Map(); // phone -> { stopped, prefTs }
const levels = new Map(); // inventory item id -> Map(location id -> { available, at })
const variantCache = new Map(); // inventory item id -> [{ id, name }]
const byWamid = new Map(); // template wamid -> request id
const user = (phone) => {
if (!users.has(phone)) users.set(phone, { stopped: false, prefTs: 0 });
return users.get(phone);
};
const handOff = (reason, detail) => console.log("needs_person", { reason, detail });
const safeEqual = (a, b) => {
const x = Buffer.from(a ?? ""), y = Buffer.from(b ?? "");
return x.length === y.length && crypto.timingSafeEqual(x, y);
};
function normalizePhone(raw) {
if (!raw || /[a-z]/i.test(raw)) return null;
const digits = String(raw).replace(/\D/g, "");
if (String(raw).trim().startsWith("+")) return digits.length >= 8 ? digits : null;
return DEFAULT_COUNTRY_CODE && digits.length >= 6 ? DEFAULT_COUNTRY_CODE + digits.replace(/^0+/, "") : null;
}
let token = { value: null, expiresAt: 0 };
async function shopifyToken() {
if (token.value && Date.now() < token.expiresAt) return token.value;
const res = await fetch(`https://${SHOP}.myshopify.com/admin/oauth/access_token`, {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: new URLSearchParams({ grant_type: "client_credentials", client_id: SHOPIFY_CLIENT_ID, client_secret: SHOPIFY_CLIENT_SECRET }),
});
if (!res.ok) throw new Error(`token ${res.status}`);
const json = await res.json();
token = { value: json.access_token, expiresAt: Date.now() + (json.expires_in - 300) * 1000 };
return token.value;
}
async function admin(query, variables) {
const res = await fetch(ADMIN_URL, {
method: "POST",
headers: { "Content-Type": "application/json", "X-Shopify-Access-Token": await shopifyToken() },
body: JSON.stringify({ query, variables }),
});
const json = await res.json();
if (!res.ok || json.errors) throw new Error(`admin ${res.status}: ${JSON.stringify(json.errors)}`);
return json.data;
}
const VARIANTS = `query variants($id: ID!) {
inventoryItem(id: $id) { variants(first: 10) { nodes { legacyResourceId displayName } } } }`;
const TAGS_ADD = `mutation tagsAdd($id: ID!, $tags: [String!]!) {
tagsAdd(id: $id, tags: $tags) { node { id } userErrors { field message } } }`;
async function variantsFor(itemId) {
if (variantCache.has(itemId)) return variantCache.get(itemId);
const data = await admin(VARIANTS, { id: `gid://shopify/InventoryItem/${itemId}` });
const list = (data.inventoryItem?.variants?.nodes ?? []).map((v) => ({ id: String(v.legacyResourceId), name: v.displayName }));
variantCache.set(itemId, list);
return list;
}
const totalFor = (itemId) => [...(levels.get(itemId)?.values() ?? [])].reduce((n, l) => n + Math.max(0, l.available), 0);
async function graph(path, body) {
const res = await fetch(`${GRAPH}/${path}`, {
method: "POST",
headers: { Authorization: `Bearer ${WA_TOKEN}`, "Content-Type": "application/json" },
body: JSON.stringify({ messaging_product: "whatsapp", recipient_type: "individual", ...body }),
});
const json = await res.json();
if (!res.ok) throw new Error(`Graph ${res.status}: ${JSON.stringify(json.error ?? json)}`);
return json.messages[0].id;
}
const sendText = (to, text) => graph("messages", { to, type: "text", text: { body: text } });
// ---- Inventory edge ----
async function onInventoryLevel(p) {
const itemId = String(p.inventory_item_id), locId = String(p.location_id);
const at = Date.parse(p.updated_at ?? "") || Date.now();
const locs = levels.get(itemId) ?? new Map();
const prev = locs.get(locId);
if (prev && at < prev.at) return; // older delivery for this location
const before = totalFor(itemId);
locs.set(locId, { available: Number(p.available ?? 0), at });
levels.set(itemId, locs);
const after = totalFor(itemId);
if (!(before <= 0 && after > 0)) return; // act only on the zero-to-positive edge
for (const variant of await variantsFor(itemId)) {
const waiting = [...requests.values()]
.filter((r) => r.variantId === variant.id && r.status === "waiting")
.sort((a, b) => a.createdAt - b.createdAt); // first come, first served
for (const row of waiting) await sendAlert(row, variant.name, itemId);
}
}
async function sendAlert(row, productName, itemId) {
row.status = "sending";
Object.assign(row, { productName, itemId });
if (SKIP_PREFIXES.split(",").filter(Boolean).some((p) => row.phone.startsWith(p))) {
return void (row.status = "skipped_us_prefix");
}
if (user(row.phone).stopped) return void (row.status = "removed");
try {
const wamid = await graph("marketing_messages", {
to: row.phone,
type: "template",
template: {
name: "restock_alert_v1",
language: { code: "en_US" },
components: [
{ type: "body", parameters: [{ type: "text", parameter_name: "product_name", text: productName }] },
{ type: "button", sub_type: "url", index: 0, parameters: [{ type: "text", text: row.id }] },
{ type: "button", sub_type: "quick_reply", index: 1, parameters: [{ type: "payload", payload: `stop_alerts:${row.id}` }] },
],
},
});
Object.assign(row, { status: "notified", wamid, sentAt: Date.now(), attempts: row.attempts + 1 });
byWamid.set(wamid, row.id);
} catch (err) {
row.status = "send_error"; // a person decides; no blind resend
handOff("send_failed", { request: row.id, error: err.message });
}
}
// One retry, 24 hours after a per-user limit, only while the item is still in stock.
setInterval(() => {
for (const row of requests.values()) {
if (row.status !== "limited" || row.retryAt > Date.now()) continue;
if (row.attempts >= 2) { row.status = "gave_up"; continue; }
if (totalFor(row.itemId) > 0) sendAlert(row, row.productName, row.itemId);
else row.status = "waiting"; // sold out again: wait for the next edge
}
}, 60 * 1000);
// ---- Meta events ----
function onStatus(s) {
const row = requests.get(byWamid.get(s.id));
if (!row || s.status !== "failed") return;
const codes = (s.errors ?? []).map((e) => Number(e.code));
if (codes.includes(131050)) {
user(row.phone).stopped = true;
row.status = "removed";
} else if (codes.includes(131049) || codes.includes(131066)) {
Object.assign(row, { status: "limited", retryAt: Date.now() + DAY_MS });
} else {
row.status = "failed";
handOff("alert_failed", { request: row.id, codes });
}
}
function onPreference(p) {
if (p.category !== "marketing_messages" || !p.wa_id) return;
const u = user(p.wa_id);
if (Number(p.timestamp) < u.prefTs) return;
u.prefTs = Number(p.timestamp);
u.stopped = p.value === "stop";
}
async function onMessage(msg) {
if (seen.has(msg.id)) return;
seen.add(msg.id);
const row = requests.get(byWamid.get(msg.context?.id));
const typed = msg.type === "text" ? String(msg.text?.body ?? "").trim().toLowerCase() : "";
const tapped = msg.type === "button" &&
(String(msg.button?.payload ?? "").startsWith("stop_alerts:") || msg.button?.text === "Stop alerts");
if (!tapped && typed !== "stop") return handOff("inbound_message", { from: msg.from, type: msg.type });
const phone = row?.phone ?? msg.from;
if (!phone) return handOff("stop_without_phone", { id: msg.id });
for (const r of requests.values()) {
if (r.phone === phone && ["waiting", "limited", "notified"].includes(r.status)) r.status = "removed";
}
await sendText(phone, "Done. We removed your stock alerts and won't message you about them again.");
}
// ---- Orders: conversion ----
async function onOrderCreated(order) {
const phone = normalizePhone(order.phone ?? order.customer?.phone ?? order.shipping_address?.phone);
if (!phone) return;
const variantIds = new Set((order.line_items ?? []).map((li) => String(li.variant_id)));
const hits = [...requests.values()].filter((r) => r.phone === phone && r.status === "notified" && variantIds.has(r.variantId));
if (!hits.length) return;
hits.forEach((r) => (r.status = "converted"));
const data = await admin(TAGS_ADD, { id: order.admin_graphql_api_id, tags: ["whatsapp-restock-alert"] });
if (data.tagsAdd.userErrors.length) handOff("tag_failed", data.tagsAdd.userErrors);
}
// ---- HTTP ----
const app = express();
app.post("/notify-me", express.json(), (req, res) => {
const { variant_id, phone, consent_text, page_url } = req.body ?? {};
const p = normalizePhone(phone);
if (!variant_id || !p || !consent_text) return res.status(400).json({ error: "variant_id, phone and consent_text are required" });
const open = [...requests.values()].find((r) => r.phone === p && r.variantId === String(variant_id) && r.status === "waiting");
if (open) return res.json({ id: open.id }); // a second tap on "Notify me" changes nothing
const row = {
id: crypto.randomBytes(9).toString("base64url"), variantId: String(variant_id), phone: p,
consentText: consent_text, consentAt: new Date().toISOString(), pageUrl: page_url ?? null,
status: "waiting", createdAt: Date.now(), attempts: 0,
};
requests.set(row.id, row);
res.status(201).json({ id: row.id });
});
app.get("/r/:id", (req, res) => {
const row = requests.get(req.params.id);
if (!row) return res.redirect(302, STORE_URL);
row.clickedAt ??= Date.now();
res.redirect(302, `${STORE_URL}/cart/${row.variantId}:1?storefront=true`);
});
app.post("/shopify/webhooks", express.raw({ type: "*/*" }), (req, res) => {
const digest = crypto.createHmac("sha256", SHOPIFY_CLIENT_SECRET).update(req.body).digest("base64");
if (!safeEqual(digest, req.get("x-shopify-hmac-sha256"))) return res.sendStatus(401);
res.sendStatus(200);
const deliveryId = req.get("x-shopify-webhook-id");
if (seen.has(deliveryId)) return;
seen.add(deliveryId);
const topic = req.get("x-shopify-topic");
const payload = JSON.parse(req.body.toString("utf8"));
const job = topic === "inventory_levels/update" ? onInventoryLevel(payload)
: topic === "orders/create" ? onOrderCreated(payload) : Promise.resolve();
job.catch((err) => handOff(`${topic}_failed`, err.message));
});
app.get("/whatsapp/webhook", (req, res) => {
const ok = req.query["hub.mode"] === "subscribe" && req.query["hub.verify_token"] === VERIFY_TOKEN;
return ok ? res.send(req.query["hub.challenge"]) : res.sendStatus(403);
});
app.post("/whatsapp/webhook", express.raw({ type: "application/json" }), (req, res) => {
const expected = "sha256=" + crypto.createHmac("sha256", APP_SECRET).update(req.body).digest("hex");
if (!safeEqual(expected, req.get("x-hub-signature-256"))) return res.sendStatus(401);
res.sendStatus(200);
const body = JSON.parse(req.body.toString("utf8"));
for (const entry of body.entry ?? []) {
for (const change of entry.changes ?? []) {
const value = change.value ?? {};
if (change.field === "user_preferences") (value.user_preferences ?? []).forEach(onPreference);
if (change.field !== "messages") continue;
(value.statuses ?? []).forEach(onStatus);
for (const msg of value.messages ?? []) onMessage(msg).catch((err) => handOff("reply_failed", err.message));
}
}
});
app.listen(Number(PORT), () => console.log(`listening on ${PORT}`));
In un deploy con più processi, due consegne simultanee per lo stesso articolo possono vedere entrambe un totale pari a zero. Esegui il controllo del passaggio sotto un lock di riga, oppure con un solo worker per articolo di inventario. Nel singolo processo qui sopra, lo stato sending impedisce un secondo invio alla stessa riga.
Quando qualcosa fallisce
Se il tuo endpoint è giù, Shopify ritenta 8 volte in 4 ore. Un’iscrizione creata tramite la Admin API viene eliminata dopo 8 errori consecutivi (webhook HTTPS, consultato il 2026-11-27). Un evento di riassortimento perso significa che i clienti in attesa non sentono nulla. Esegui un job periodico che controlla lo stock di ogni variante con richieste in attesa. Recupera anche un passaggio perso quando fallisce la chiamata alla Admin API in variantsFor.
Se l’invio genera un errore, la riga passa a send_error e decide una persona. Il servizio non reinvia da solo, perché la richiesta potrebbe aver raggiunto Meta.
Uno stato failed con un codice diverso da 131049, 131050 o 131066 va a una persona, con i codici allegati. Se nessuno stato delivered arriva entro il TTL di 12 ore, considera il messaggio scartato. Meta non indica alcun codice di errore per questo caso.
Se la pagina del prodotto e il numero WhatsApp appartengono a negozi diversi nel tuo sistema, il testo del consenso deve nominare il negozio che invia. Il consenso di un negozio non copre l’avviso di un altro.
Lo stesso avviso su Telegram
Telegram non ha categorie di modelli. Un bot può scrivere in qualsiasi momento a un cliente che l’ha avviato e ha accettato l’avviso. Usa un deep link nel modulo “Notify me”, così il token di avvio porta l’ID della richiesta. Lo schema è in deep linking dei bot Telegram.
Non costruire tutto questo sui messaggi prodotto di WhatsApp a meno che tu non gestisca già un catalogo Meta, perché ne richiedono uno. I dettagli sono in messaggi prodotto WhatsApp.
Dove si colloca Z-API Omni
Omni non documenta un’integrazione Shopify né uno scheduler, quindi lo stato dell’inventario, il passaggio e il nuovo tentativo restano nel tuo servizio. Per il modello, adatta il suo esempio MARKETING “Cart recovery”, che ha un pulsante URL e una risposta rapida, e invialo con content.type: TEMPLATE. La sua documentazione non dice se i modelli marketing passano da /marketing_messages, e non mostra 131049, 131050, user_preferences o un tocco su un pulsante che arrivano al tuo webhook.
La connessione QR non ha modelli. Lì un messaggio INTERACTIVE_BUTTON porta fino a tre pulsanti, e il consenso vale comunque.
{
"recipient": { "identifier": "5511999999999" },
"content": {
"type": "INTERACTIVE_BUTTON",
"body": { "message": "The item you asked about is back in stock. Reply below." },
"attachments": [
{ "id": "open_cart", "title": "Send me the link" },
{ "id": "stop_alerts", "title": "Stop alerts" }
]
}
}
Un solo abbonamento copre WhatsApp, Messenger, Instagram e Telegram, a US$29 per numero al mese da 1 a 10 numeri, fino a US$20 oltre 100. I webhook sono inclusi senza limite. La connessione QR non ha costi per messaggio, e sull’API ufficiale di Meta le tariffe di Meta vengono riaddebitate.
Il team di Z-API Omni