# Avviso WhatsApp di tecnico in arrivo, con le risposte del cliente

> Invia un modello utility WhatsApp quando un intervento passa a en_route, raccogli codici d'accesso e richieste di spostamento, annotali e avvisa il tecnico.

Published 2026-11-27. Z-API Omni team.

Un messaggio di tecnico in arrivo è un modello utility inviato quando un tecnico sul campo parte verso un intervento prenotato, con il nome del tecnico e un orario di arrivo stimato (ETA). Attivalo quando il record dell'intervento passa a `en_route`. Offri tre risposte rapide: "Gate code / access info" (Codice del cancello / info di accesso), "Running late" (Sono in ritardo) e "Need to reschedule" (Devo spostare l'appuntamento). Scrivi ogni risposta in `job_notes`, e inoltrala al tecnico assegnato su Telegram o su un numero WhatsApp con opt-in. Dai al modello un TTL breve, perché un avviso «sto arrivando» un'ora dopo non serve a nulla.

Il nucleo eseguibile qui sotto è la tua tabella degli interventi, perché la controlli tu qualunque strumento di dispatch usi. Un adattatore per Housecall Pro collega il suo webhook `job.on_my_way` allo stesso stato, con le parti non verificate segnalate. Lo schema gemello per i pacchi è in [avviso di consegna mancata con pulsanti per riprogrammare](/academy/it/articles/whatsapp-delivery-update-not-home-reschedule/).

## L'evento: un intervento passa a en_route

La tua app di dispatch sa già quando un tecnico parte. Fai di quel singolo cambio di stato il trigger, e tieni telefono, opt-in e contatto del tecnico su righe che sono tue:

```sql
CREATE TABLE jobs (
  id               text PRIMARY KEY,
  external_id      text UNIQUE,            -- the job id in Housecall Pro, if you use it
  customer_name    text NOT NULL,
  phone            text NOT NULL,          -- digits with country code
  whatsapp_opt_in  boolean NOT NULL DEFAULT false,
  time_zone        text NOT NULL DEFAULT 'UTC',
  scheduled_start  timestamptz NOT NULL,
  status           text NOT NULL DEFAULT 'scheduled',  -- scheduled, en_route, in_progress, done, canceled, reschedule_requested
  eta              timestamptz,
  eta_updates      int NOT NULL DEFAULT 0,
  tech_name        text NOT NULL,
  tech_telegram_chat_id bigint
);

CREATE TABLE job_notes (
  id          bigserial PRIMARY KEY,
  job_id      text NOT NULL REFERENCES jobs(id),
  kind        text NOT NULL,               -- access_info, running_late, reschedule, message
  body        text NOT NULL,
  sensitive   boolean NOT NULL DEFAULT false,
  source_wamid text UNIQUE,                -- the inbound WhatsApp message id, so a retry inserts nothing
  created_at  timestamptz NOT NULL DEFAULT now()
);
```

Passa da `scheduled` a `en_route` con un update condizionale, e invia solo quando una riga è cambiata. Così un evento en-route ripetuto per lo stesso intervento non cambia nulla, e questa è la tua deduplica. L'unica eccezione è una nuova ETA, trattata più sotto in Quando qualcosa fallisce.

### Housecall Pro come sorgente

Il centro assistenza di Housecall Pro elenca `job.on_my_way` tra i suoi eventi webhook, insieme a `job.started`, `job.completed`, `job.canceled` e `job.appointment.rescheduled` ([How to Enable Webhooks, consultato il 2026-11-27](https://help.housecallpro.com/en/articles/5683520-how-to-enable-webhooks)). Li attivi in My Apps > All Apps > Webhooks, inserendo l'URL e scegliendo gli eventi. L'articolo aggiunge che «dopo il salvataggio, Housecall Pro restituisce un signing secret». Dice anche che «i webhook sono disponibili solo con il piano MAX», e la [panoramica della API](https://help.housecallpro.com/en/articles/8505035-api-overview) (consultata il 2026-11-27) dice lo stesso della API.

L'adattatore tratta tre parti come incognite, perché nessuna è stata verificabile. La prima è lo schema di firma. La documentazione per sviluppatori su docs.housecallpro.com è un'app a pagina singola che non ha restituito testo leggibile. Un estratto di ricerca della sua [pagina sui webhook](https://docs.housecallpro.com/docs/housecall-public-api/46e9e1be07621-webhooks) descrive gli header `Api-Timestamp` e `Api-Signature`, con HMAC-SHA256 su timestamp e payload. Altre fonti citano un header diverso.

Anche la struttura del payload e la politica dei tentativi non sono documentate in forma leggibile. L'adattatore presume `{ event, job: { id } }` e non usa nient'altro del body. Nessun endpoint per le note dell'intervento è stato verificabile, quindi la nota resta nella tua tabella `job_notes`.

L'adattatore registra tutti gli header alla prima consegna, così puoi leggere lo schema reale. Il controllo della firma è attivo per default. Imposta `HCP_ENFORCE_SIGNATURE=0` solo in una finestra di test con interventi di prova.

## Il messaggio: un modello utility con ETA

Una visita prenotata dal cliente supera il test utility di Meta. Il contenuto deve essere «non promozionale» e «specifico per l'utente o da lui richiesto (chiaramente legato al suo ordine, account, servizi o transazioni)» ([categorizzazione dei modelli, consultato il 2026-11-27](https://developers.facebook.com/documentation/business-messaging/whatsapp/templates/template-categorization)). La pagina di Meta non nomina i tecnici sul campo, ma «servizi» copre una visita prenotata. Tieni fuori le offerte: proporre un piano di manutenzione nello stesso messaggio lo rende marketing.

Nessun tipo della Template Library è adatto. `DELIVERY_UPDATE` è per le spedizioni, quindi scrivi un modello personalizzato. I parametri con nome evitano che tecnico ed ETA si scambino di posto. Tieni le variabili lontane dall'inizio e dalla fine del corpo. La revisione di Meta rifiuta un modello che inizia o finisce con un parametro, come spiega [motivi di rifiuto dei modelli](/academy/it/articles/whatsapp-template-rejected-common-reasons/).

Imposta `message_send_ttl_seconds` a un valore breve. Per i modelli utility il valore predefinito è 30 giorni, e il campo accetta da 30 a 43.200 secondi. Meta «scarta i messaggi che non possono essere consegnati entro il TTL predefinito o personalizzato» ([time-to-live, consultato il 2026-11-27](https://developers.facebook.com/documentation/business-messaging/whatsapp/templates/time-to-live)). I 1.800 secondi qui sotto sono una nostra scelta. Meta non raccomanda alcun valore.

```bash
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": "tech_en_route",
  "category": "UTILITY",
  "language": "en_US",
  "parameter_format": "NAMED",
  "message_send_ttl_seconds": 1800,
  "components": [
    {
      "type": "BODY",
      "text": "Hi {{customer_name}}, {{tech_name}} is on the way to your appointment and should arrive around {{eta}}. Reply below if anything changes.",
      "example": {
        "body_text_named_params": [
          { "param_name": "customer_name", "example": "Ana" },
          { "param_name": "tech_name", "example": "Marco" },
          { "param_name": "eta", "example": "2:40 PM" }
        ]
      }
    },
    {
      "type": "BUTTONS",
      "buttons": [
        { "type": "QUICK_REPLY", "text": "Gate code / access info" },
        { "type": "QUICK_REPLY", "text": "Running late" },
        { "type": "QUICK_REPLY", "text": "Need to reschedule" }
      ]
    }
  ]
}'
```

Invialo solo ai clienti che hanno dato l'opt-in agli aggiornamenti WhatsApp al momento della prenotazione. L'opt-in deve nominare la tua azienda, come spiegato in [come raccogliere l'opt-in WhatsApp](/academy/it/articles/whatsapp-opt-in-how-to-collect-consent/).

## La risposta: tocchi e codici del cancello scritti

Ogni risposta rapida riceve un payload al momento dell'invio, per esempio `access:J-2291`. Un tocco arriva come `type: "button"` con `button.payload`, `button.text` e `context.id`, il wamid del tuo modello. La struttura completa e l'avvertenza sugli username sono in [conferma d'ordine con i pulsanti Confirm e Cancel](/academy/it/articles/whatsapp-order-confirmation-confirm-cancel-buttons/). Abbina prima su `context.id`.

Il tocco apre la finestra di 24 ore, quindi il servizio può rispondere in testo libero. A "Gate code / access info" risponde «Scrivi qui il codice del cancello o le informazioni di accesso». Il messaggio successivo del cliente arriva come `type: "text"` con il codice in `text.body`. Non ha `context.id`, a meno che il cliente non citi il tuo messaggio, quindi il servizio lo abbina per telefono all'intervento che sta aspettando le info di accesso.

## La scrittura: una nota sull'intervento e un avviso al tecnico

Ogni risposta diventa una riga in `job_notes`, con chiave il wamid in arrivo, così un nuovo tentativo di Meta non inserisce nulla. Poi il tecnico deve riceverla prima di arrivare. Housecall Pro non documenta alcuna chiamata che invii un messaggio all'app del tecnico, quindi usa un canale che controlli tu.

Telegram è adatto a un avviso interno. Il tecnico avvia il tuo bot una volta, il che ti dà il suo `chat_id` privato, e Telegram non ha una finestra di 24 ore. Collegare una chat a un utente è spiegato in [deep linking di Telegram](/academy/it/articles/telegram-bot-deep-linking-start-parameter/) e, per gli account di un'app, in [collegare una chat Telegram all'utente della tua app](/academy/it/articles/telegram-bot-link-account-order-notifications/). Funziona anche un messaggio WhatsApp al numero del tecnico, se ha dato l'opt-in. Fuori da una finestra serve un suo modello utility.

Tratta i codici del cancello come dati sensibili. Salvali con `sensitive = true`, inviali solo alla chat privata del tecnico assegnato, e non ripeterli mai in un gruppo o in un canale del dispatch. Non ripetere il codice nemmeno al cliente. Elimina o oscura la nota dopo la chiusura dell'intervento, secondo la tua politica di conservazione.

"Need to reschedule" cambia l'intervento, quindi va a una persona. Il servizio imposta `reschedule_requested`, dice al tecnico di attendere e passa l'intervento al dispatch. "Running late" aggiunge solo una nota e un avviso.

## Il servizio completo

Questo file per Node 18+ gira con `npm install express`. Riceve i cambi di stato dalla tua app, accetta `job.on_my_way` di Housecall Pro, invia il modello, verifica `X-Hub-Signature-256` di Meta e scrive le note. Lo stato vive in memoria; collegalo alle tabelle qui sopra.

```js
// tech-en-route.js. Node 18+. npm install express
const crypto = require("crypto");
const express = require("express");

const {
  WA_TOKEN, PHONE_NUMBER_ID, APP_SECRET, VERIFY_TOKEN,
  TELEGRAM_BOT_TOKEN, INTERNAL_TOKEN,
  HCP_SIGNING_SECRET = "", HCP_ENFORCE_SIGNATURE = "1", PORT = "3000",
} = process.env;

const GRAPH_URL = `https://graph.facebook.com/v26.0/${PHONE_NUMBER_ID}/messages`;
const TG_URL = `https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage`;

const jobs = new Map();          // jobs table: id -> job
const byExternalId = new Map();  // Housecall Pro job id -> job id
const byWamid = new Map();       // template wamid -> job id
const jobNotes = [];             // job_notes table
const noteWamids = new Set();    // job_notes.source_wamid UNIQUE
const seenEvents = new Set();    // `${jobId}:${eventType}` from Housecall Pro
const seenMessages = new Set();  // Meta messages[].id
const optOuts = new Set();       // phones and BSUIDs that sent STOP
let hcpHeadersLogged = false;

const safeEqual = (a, b) => {
  const x = Buffer.from(a ?? ""), y = Buffer.from(b ?? "");
  return x.length === y.length && crypto.timingSafeEqual(x, y);
};
const handOff = (jobId, reason, detail) => console.log("needs_person", { jobId, reason, detail });

function formatEta(iso, timeZone) {
  return new Intl.DateTimeFormat("en-US", { hour: "numeric", minute: "2-digit", timeZone }).format(new Date(iso));
}

async function waSend(body) {
  const res = await fetch(GRAPH_URL, {
    method: "POST",
    headers: { Authorization: `Bearer ${WA_TOKEN}`, "Content-Type": "application/json" },
    body: JSON.stringify({ messaging_product: "whatsapp", ...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 waText = (to, text) => waSend({ to, type: "text", text: { body: text } });

async function pushToTech(job, text) {
  if (!job.techTelegramChatId) { handOff(job.id, "tech_not_linked", null); return false; } // never log the text: it may hold a gate code
  const res = await fetch(TG_URL, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ chat_id: job.techTelegramChatId, text }),
  });
  const json = await res.json();
  if (!json.ok) handOff(job.id, "tech_push_failed", json.description);
  return json.ok === true;
}

function addNote(job, kind, body, sourceWamid, sensitive = false) {
  if (sourceWamid && noteWamids.has(sourceWamid)) return false;
  if (sourceWamid) noteWamids.add(sourceWamid);
  jobNotes.push({ jobId: job.id, kind, body, sensitive, sourceWamid, createdAt: new Date().toISOString() });
  return true;
}

const canMessage = (job) => job.whatsappOptIn && !optOuts.has(job.phone) && !(job.userId && optOuts.has(job.userId));

async function sendEnRoute(job) {
  const p = (k, v) => ({ type: "text", parameter_name: k, text: String(v) });
  const qr = (index, payload) => ({ type: "button", sub_type: "quick_reply", index, parameters: [{ type: "payload", payload }] });
  const wamid = await waSend({
    to: job.phone, type: "template",
    template: {
      name: "tech_en_route", language: { code: "en_US" },
      components: [
        { type: "body", parameters: [
          p("customer_name", job.customerName), p("tech_name", job.techName), p("eta", formatEta(job.eta, job.timeZone)),
        ] },
        qr(0, `access:${job.id}`), qr(1, `late:${job.id}`), qr(2, `resched:${job.id}`),
      ],
    },
  });
  byWamid.set(wamid, job.id);
}

// UPDATE jobs SET status = 'en_route' ... WHERE id = $1 AND status = 'scheduled'
async function setEnRoute(job, etaIso) {
  if (job.status === "en_route") {
    if (!etaIso || etaIso === job.eta || job.etaUpdates >= 1) return "ignored"; // at most one ETA update
    job.etaUpdates += 1;
  } else if (job.status === "scheduled") {
    job.status = "en_route";
  } else {
    return "ignored"; // canceled, done or already being rescheduled
  }
  job.eta = etaIso ?? job.eta ?? job.scheduledStart;
  if (!canMessage(job)) return "no_opt_in";
  try {
    await sendEnRoute(job);
    return "sent";
  } catch (err) {
    handOff(job.id, "en_route_send_failed", err.message);
    return "send_failed";
  }
}

function findWaitingJob(msg) {
  const id = byWamid.get(msg.context?.id);
  if (id) return jobs.get(id);
  for (const job of jobs.values()) {
    if (job.status === "en_route" && (job.phone === msg.from || (job.userId && job.userId === msg.from_user_id))) return job;
  }
  return null;
}

async function onWhatsAppMessage(msg) {
  if (seenMessages.has(msg.id)) return;
  seenMessages.add(msg.id);
  const text = msg.type === "text" ? String(msg.text?.body ?? "").trim() : "";
  if (/^stop$/i.test(text)) {
    [msg.from, msg.from_user_id].filter(Boolean).forEach((v) => optOuts.add(v));
    if (msg.from) await waText(msg.from, "Done. You will not get more visit updates here.");
    return;
  }
  const job = findWaitingJob(msg);
  if (!job) return handOff(null, "unmatched_message", { id: msg.id, type: msg.type });
  if (msg.from_user_id) job.userId = msg.from_user_id;

  if (msg.type === "button") {
    const [verb] = String(msg.button?.payload ?? "").split(":");
    const label = String(msg.button?.text ?? "").toLowerCase();
    const action = ["access", "late", "resched"].includes(verb) ? verb
      : label.startsWith("gate") ? "access" : label.startsWith("running") ? "late"
      : label.includes("reschedule") ? "resched" : "";
    if (action === "access") {
      job.awaitingAccessInfo = true;
      return waText(job.phone, "Please type the gate code or access details here. Only your technician will see them.");
    }
    if (action === "late") {
      if (!addNote(job, "running_late", "Customer is running late", msg.id)) return;
      await pushToTech(job, `Job ${job.id}: the customer says they are running late.`);
      return waText(job.phone, `Thanks. We told ${job.techName}.`);
    }
    if (action === "resched") {
      if (!addNote(job, "reschedule", "Customer asked to reschedule", msg.id)) return;
      if (job.status === "en_route") job.status = "reschedule_requested";
      await pushToTech(job, `Job ${job.id}: the customer asked to reschedule. Hold until dispatch confirms.`);
      handOff(job.id, "reschedule_requested", null);
      return waText(job.phone, "Thanks. Our team will message you here with new times.");
    }
    return handOff(job.id, "unreadable_button", msg.button);
  }

  if (msg.type !== "text") return handOff(job.id, "unsupported_type", msg.type);
  if (job.awaitingAccessInfo) {
    job.awaitingAccessInfo = false;
    if (!addNote(job, "access_info", text, msg.id, true)) return;
    const delivered = await pushToTech(job, `Job ${job.id} access info from the customer: ${text}`); // private chat only
    return waText(job.phone, delivered ? `Thanks. ${job.techName} has it.` : "Thanks. We saved it for your technician.");
  }
  if (!addNote(job, "message", text, msg.id)) return;
  await pushToTech(job, `Job ${job.id}, customer message: ${text}`);
}

// TODO:test: Housecall Pro signature scheme. A search snippet of its docs describes Api-Timestamp and
// Api-Signature, HMAC-SHA256 over the timestamp and the payload. The joining format and the hex encoding are guesses.
function verifyHcp(req) {
  const ts = req.get("api-timestamp"), given = req.get("api-signature");
  if (!HCP_SIGNING_SECRET || !ts || !given) return false;
  return [Buffer.from(`${ts}.`), Buffer.from(ts)].some((prefix) => {
    const hex = crypto.createHmac("sha256", HCP_SIGNING_SECRET).update(Buffer.concat([prefix, req.body])).digest("hex");
    return safeEqual(hex, given);
  });
}

const app = express();
const internal = (req, res, next) =>
  safeEqual(req.get("authorization"), `Bearer ${INTERNAL_TOKEN}`) ? next() : res.sendStatus(401);

// Your app upserts jobs here, or you read them from the jobs table directly.
app.post("/internal/jobs", express.json(), internal, (req, res) => {
  const j = req.body ?? {};
  if (!j.id || !j.phone || !j.scheduledStart || !j.techName) return res.sendStatus(400);
  const job = Object.assign(jobs.get(j.id) ?? { status: "scheduled", etaUpdates: 0, eta: null }, {
    id: j.id, externalId: j.externalId ?? null, customerName: j.customerName ?? "there",
    phone: String(j.phone).replace(/\D/g, ""), whatsappOptIn: j.whatsappOptIn === true,
    timeZone: j.timeZone ?? "UTC", scheduledStart: j.scheduledStart,
    techName: j.techName, techTelegramChatId: j.techTelegramChatId ?? null,
  });
  jobs.set(job.id, job);
  if (job.externalId) byExternalId.set(String(job.externalId), job.id);
  res.sendStatus(204);
});

// Your dispatch app posts { status: "en_route", eta: ISO string } when the technician leaves.
app.post("/internal/jobs/:id/status", express.json(), internal, async (req, res) => {
  const job = jobs.get(req.params.id);
  if (!job) return res.sendStatus(404);
  const { status, eta } = req.body ?? {};
  if (status === "en_route") return res.json({ result: await setEnRoute(job, eta) });
  if (["in_progress", "done", "canceled"].includes(status)) {
    job.status = status;
    job.awaitingAccessInfo = false;
    return res.json({ result: "updated" });
  }
  res.sendStatus(400);
});

app.post("/hcp/webhook", express.raw({ type: "*/*" }), async (req, res) => {
  if (!hcpHeadersLogged) {
    hcpHeadersLogged = true;
    console.log("hcp_first_delivery_headers", req.headers); // read the real signature scheme here
  }
  const verified = verifyHcp(req);
  if (!verified && HCP_ENFORCE_SIGNATURE === "1") return res.sendStatus(401);
  if (!verified) console.warn("hcp_signature_unverified");
  res.sendStatus(200);

  let body;
  try { body = JSON.parse(req.body.toString("utf8")); } catch { return; }
  // TODO:test: payload shape. Assumed { event, job: { id } }. Only the id is used.
  const jobId = byExternalId.get(String(body.job?.id ?? ""));
  const job = jobId && jobs.get(jobId);
  if (!job || !body.event) return;
  const key = `${job.id}:${body.event}`;
  if (seenEvents.has(key)) return;
  seenEvents.add(key);
  if (body.event === "job.on_my_way") return void (await setEnRoute(job, null));
  if (body.event === "job.started") job.status = "in_progress";
  if (body.event === "job.canceled") job.status = "canceled";
  if (body.event === "job.started" || body.event === "job.canceled") job.awaitingAccessInfo = false;
});

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 ?? []) {
      for (const msg of change.value?.messages ?? []) {
        onWhatsAppMessage(msg).catch((err) => handOff(null, "reply_failed", err.message));
      }
    }
  }
});

app.listen(Number(PORT), () => console.log(`listening on ${PORT}`));
```

Per gli interventi di Housecall Pro, l'ETA ripiega su `scheduled_start`, perché i campi ETA dell'evento non sono noti. Quando l'endpoint per le note di Housecall Pro sarà confermato nella sua documentazione, aggiungi la scrittura dopo `addNote`. Fino ad allora le note vivono nella tua tabella, e il dispatch copia ciò che conta. Una visita riprenotata ha bisogno di un nuovo ID intervento o di un ritorno a `scheduled`. Un codice scritto senza il tocco viene salvato come messaggio normale, quindi segnalo come sensibile in revisione.

## Quando qualcosa fallisce

Se il cliente non risponde mai, non cambia nulla. Il tecnico arriva, e `job.started` chiude l'attesa delle info di accesso. Se il telefono resta spento per 30 minuti, il TTL scarta il messaggio, così un avviso scaduto non arriva mai.

Se il tecnico ritarda, ricalcola l'ETA e invia lo stesso modello un'altra volta. Il servizio consente un aggiornamento per intervento e ignora gli altri. Non serve un modello separato del tipo «sto ancora arrivando».

Il passaggio condizionale da `scheduled` a `en_route`, la chiave ID intervento più tipo di evento per Housecall Pro e il `source_wamid` univoco sulle note assorbono i duplicati. Una risposta STOP aggiunge il telefono e `from_user_id` a un elenco di opt-out che ogni invio controlla.

Una chiamata Graph fallita va a una persona invece che in un ciclo di tentativi, perché un «sto arrivando» in ritardo non aiuta nessuno. Anche un avviso Telegram fallito va a una persona, perché il tecnico potrebbe trovarsi davanti a un cancello chiuso. La politica dei tentativi di Housecall Pro non è documentata in forma leggibile, quindi osserva le prime consegne per vedere se ci sono ripetizioni.

## Dove si colloca Z-API Omni

Sull'API ufficiale di Meta, Omni invia `tech_en_route` tramite `POST https://api.omni.z-api.io/v1/channels/{channelId}/messages` con una Secret Key `Bearer`, e la creazione dei modelli accetta `message_send_ttl_seconds`. Le risposte in testo libero, come un codice del cancello scritto, arrivano come `MESSAGE_RECEIVED` con `contents[0].type: "TEXT"`. La documentazione non mostra ancora la struttura in arrivo di un tocco su una risposta rapida. Non è documentata alcuna integrazione per il field service, quindi il servizio qui sopra resta il ponte.

L'avviso al tecnico può passare da un canale Telegram nello stesso abbonamento, che copre anche WhatsApp, Messenger e Instagram. Il prezzo è di US$29 per numero al mese da 1 a 10 numeri, e scende a scaglioni fino a US$20 oltre 100. I webhook sono inclusi senza limite, e sulla connessione ufficiale le tariffe di Meta vengono riaddebitate.

<!-- TODO:test Omni snippet: send tech_en_route on a META_WHATSAPP channel; whether named body params need parameter_name; the inbound JSON of a quick-reply tap -->
```bash
curl -X POST "https://api.omni.z-api.io/v1/channels/$CHANNEL_ID/messages" \
  -H "Authorization: Bearer $OMNI_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"recipient":{"identifier":"5511999999999"},"content":{"type":"TEMPLATE","attachments":[{"template":{"name":"tech_en_route","language":{"policy":"deterministic","code":"en_US"},"components":[{"type":"body","parameters":[{"type":"text","text":"Ana"},{"type":"text","text":"Marco"},{"type":"text","text":"2:40 PM"}]}]}}]}}'
```

[Vedi la documentazione](https://developer.omni.z-api.io/en)

*Il team di Z-API Omni*
