> For the complete documentation index, see [llms.txt](https://help.sesami.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.sesami.co/it/automazioni/sesami-flows-and-klaviyo/klaviyo-transactional-sms.md). Agents can also search and read this documentation through its [MCP server](https://help.sesami.co/~gitbook/mcp).

# SMS transazionali di Klaviyo

Questa configurazione consente a Sesami di inviare notifiche SMS transazionali tramite Klaviyo per eventi relativi alle prenotazioni, come conferme, promemoria, cancellazioni e riprogrammazioni.

{% hint style="info" %}
**Importante:** Questa configurazione è per **SMS transazionali, non SMS marketing**.
{% endhint %}

### Prerequisiti

Prima di iniziare la configurazione, assicurati che l'account Klaviyo abbia:

* **Un piano SMS Klaviyo a pagamento** — necessario per gli SMS transazionali.
* **SMS abilitato** in Klaviyo.
* **Un numero attivo per l'invio di SMS** che supporti la regione del cliente.
* Un **Chiave API privata** con le autorizzazioni richieste.

{% hint style="info" %}
Klaviyo richiede che gli SMS siano abilitati e che sia configurato un numero di invio adeguato per la regione del cliente.
{% endhint %}

***

### 1. App Sesami → Flussi

Una volta che il [preset di Klaviyo è abilitato](https://help.sesami.co/it/automazioni/sesami-flows-and-klaviyo.md#step-2-choose-a-klaviyo-preset), il corpo del Flow in Sesami **deve includere il numero di telefono del cliente** utilizzando il `phone_number` campo.

Aggiungi quanto segue al corpo del Flow:

```
"profile": {
  "data": {
    "type": "profile",
    "attributes": {
      "email": "{{CustomerEmail}}",
      "phone_number": "{{CustomerPhone}}"
    }
  }
}
```

### 2. Klaviyo → Flusso

Crea un Flow utilizzando la metrica desiderata come trigger. Segui [questo passaggio](https://help.sesami.co/it/automazioni/sesami-flows-and-klaviyo.md#step-1-create-a-flow-in-klaviyo)&#x20;

Esempio: \
**Struttura del Flow:** `Prenotazione Sesami creata → Consenso SMS transazionale → Attendi 5 minuti → Messaggio SMS`

### 3. Consenso SMS transazionale

1\. Aggiungi un **Webhook** come prima azione.

<figure><img src="https://792414832-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnDgiM1CWSLWRIbhORANO%2Fuploads%2FK7d2OYgrdyEy81NmyNAW%2FScreenshot%202026-10-28%20at%2012.04.08.png?alt=media&amp;token=148df9e9-af71-4feb-8617-d3b94c5dd86a" alt=""><figcaption></figcaption></figure>

2\. Configura i **dettagli del webhook** usando le impostazioni seguenti.

<figure><img src="https://792414832-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnDgiM1CWSLWRIbhORANO%2Fuploads%2FclCTHD8fZAwXs24fU6ud%2FScreenshot%202026-10-28%20at%2012.06.18.png?alt=media&amp;token=acba24ca-f1da-4fdd-a61e-e5f8378cdfbd" alt=""><figcaption></figcaption></figure>

* **Nome del webhook:** Inserisci un nome per il webhook, ad esempio `Sesami - SMS transazionali`&#x20;

* **Impostazioni:**
  * **URL di destinazione: copia quanto segue:**

`https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs`

* **Intestazioni**

**Crea i seguenti "Key" e "Value"**

```
Content-Type application/json
revision 2026-07-15
Authorization Klaviyo-API-Key YOUR_PRIVATE_API_KEY
```

<figure><img src="https://792414832-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnDgiM1CWSLWRIbhORANO%2Fuploads%2FaMIfqgjLlugG9b487td2%2FScreenshot%202026-10-28%20at%2012.15.23.png?alt=media&amp;token=f20c0e05-35c7-453e-b682-bea1fd839509" alt=""><figcaption></figcaption></figure>

**Corpo JSON**\
Copia quanto segue:

```
{
  "data": {
    "type": "profile-subscription-bulk-create-job",
    "attributes": {
      "profiles": {
        "data": [
          {
            "type": "profile",
            "attributes": {
              "email": "{{ person.email }}",
              "phone_number": "{{ person.phone_number }}",
              "subscriptions": {
                "sms": {
                  "transactional": {
                    "consent": "SUBSCRIBED"
                  }
                }
              }
            }
          }
        ]
      }
    }
  }
}
```

<figure><img src="https://792414832-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnDgiM1CWSLWRIbhORANO%2Fuploads%2FVyDh22hfdQxWoEyPFaNU%2FScreenshot%202026-10-28%20at%2012.18.18.png?alt=media&amp;token=de7ac4fe-67cc-43d8-872f-5ff2469b681e" alt=""><figcaption></figcaption></figure>

### 4. Messaggio SMS

Dopo il webhook di consenso:

1. Aggiungi una **ritardo di 5 minuti**.
2. Aggiungi l'azione SMS.
3. Configura la notifica di prenotazione.
4. Imposta l'SMS come **stato transazionale**.&#x20;
5. Imposta il Flow come attivo.

<div><figure><img src="https://792414832-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnDgiM1CWSLWRIbhORANO%2Fuploads%2FgVT6xv8dSen0Rg0JzgEd%2FScreenshot%202026-10-28%20at%2012.19.54.png?alt=media&amp;token=6598bdf7-d27a-443b-ba9f-e6c033f171da" alt=""><figcaption></figcaption></figure> <figure><img src="https://792414832-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnDgiM1CWSLWRIbhORANO%2Fuploads%2FmYlOGy0AgC2QnRw7TZ8R%2FScreenshot%202026-10-28%20at%2012.20.28.png?alt=media&amp;token=d0d530f7-24b1-44a7-8c77-458d7b5f3939" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
Il consenso transazionale e lo stato transazionale sono separati:

* **Consenso transazionale** = il permesso del cliente di ricevere SMS transazionali.
* **stato transazionale** = la classificazione del messaggio SMS come transazionale.

Un profilo con solo il consenso transazionale può ricevere SMS transazionali, ma non SMS di marketing.
{% endhint %}

### 5. Test

**Crea una nuova prenotazione in Sesami e verifica:**

* Il webhook di consenso transazionale viene completato
* Profilo → SMS transazionali: **Sottoscritto**
* Il Flow continua dopo il ritardo di 5 minuti
* L'SMS viene ricevuto

L'API di iscrizione di Klaviyo è asincrona, quindi attendi un po' di tempo affinché il risultato dell'iscrizione appaia.

<div><figure><img src="https://792414832-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnDgiM1CWSLWRIbhORANO%2Fuploads%2FYBJh3teX9nGdtObpWCDn%2F1%20webhook%20.png?alt=media&amp;token=917ee541-2e35-4a1a-8160-1e8250fd1714" alt=""><figcaption></figcaption></figure> <figure><img src="https://792414832-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnDgiM1CWSLWRIbhORANO%2Fuploads%2FAQy7tJdnr5jmYIIZwKRS%2F2%20subscribed.png?alt=media&amp;token=d4d84723-1ade-4285-8ec8-0369727e0302" alt=""><figcaption></figcaption></figure> <figure><img src="https://792414832-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnDgiM1CWSLWRIbhORANO%2Fuploads%2FjzLj0OEVJKK4WGw9g3hS%2F3%20delay%20.png?alt=media&amp;token=0c778095-b752-4d7c-b84d-92dc95fbd8bd" alt=""><figcaption></figcaption></figure> <figure><img src="https://792414832-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnDgiM1CWSLWRIbhORANO%2Fuploads%2F8G5SlULFgjuofWHFi4xO%2F4%20Message%20Appointment%20Confirmation-.png?alt=media&amp;token=670ac409-edb2-40c5-ac8a-164eb565cf04" alt=""><figcaption></figcaption></figure></div>

***

### Risoluzione dei problemi

#### HTTP 400 — Regione del numero di telefono

Se Klaviyo segnala che il numero di telefono non è supportato per l'account, controlla: **Klaviyo → Impostazioni → Messaggistica testuale**

Assicurati che l'account abbia un numero di invio attivo per il paese/regione di quel cliente.

#### Il Flow non si attiva

Controlla il **trigger del Flow e i filtri del trigger prima di tutto**.

* Il trigger deve essere una [**metrica di Sesami**](https://help.sesami.co/it/automazioni/sesami-flows-and-klaviyo.md)
* Rimuovi qualsiasi filtro che faccia riferimento a una proprietà dell'evento

#### Gli SMS transazionali non sono disponibili

Conferma che il merchant abbia un **piano SMS Klaviyo a pagamento**.

Il piano Free non supporta l'applicazione dello stato transazionale ai messaggi SMS.

***

### Checklist finale

**Account Klaviyo**

* Piano SMS a pagamento
* SMS abilitato
* Numero di invio configurato
* Il numero di invio supporta la regione del cliente
* Chiave API privata con le autorizzazioni richieste

**Sesami**

* Webhook API eventi configurato
* Numero di telefono incluso

**Flow di Klaviyo**

* Trigger = `Prenotazione Sesami creata`
* Nessun filtro del trigger non valido
* Webhook di consenso SMS transazionale
* `{{ person.phone_number }}`
* `SOTTOSCRITTO` consenso transazionale
* ritardo di 5 minuti
* L'SMS ha lo stato transazionale
* Flow attivo


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.sesami.co/it/automazioni/sesami-flows-and-klaviyo/klaviyo-transactional-sms.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
