...
Configurare un webhook
To add a new webhook, select Settings > Account Settings > Developer's Corner > Webhooks and click on Add new webhook.
As mentioned in our brief overview of webhooks, they're highly customizable. That's why, when you create or edit a webhook, there are several settings that you can configure. Let's review them one by one.
- Name: enter a descriptive name for the webhook (for internal purposes only)
- Callback URL: the URL of the page that will receive the "call" when the webhook is triggered
- Event: the type of webhook: there are currently 4 events that can trigger a the execution of a webhook:
- Subscribe: a recipient subscribed to the List
- Unsubscribe: a recipient unsubscribed from the List
- Changeprofile: a recipient's profile was updated. A modification in the groups that a recipient is assigned to counts as a profile change.
- Delete: a recipient was removed from the List
- Source: the event can originate from three different sources:
- API: the event occurred to due an API call. For example, a recipient was registered in MailUp from a form that executed an API call to MailUp
- Console: the event occurred due to some operation being executed in the admin console. For example, a new recipient was added manually as a subscriber in the admin console.
- Recipient: the event occurred due an action that a recipient took. For example, a recipient unsubscribed.
- Method: the method in which the callback is technically executed. It can be a POST or a GET.
- Active: whether the webhook is active or inactive.
- Encrypted: whether the callback is encrypted. If so, you will need to specify a key.
- Parameters: the parameters sent in the callback. See below for details.
Parameters
...
Per cerare un nuovo webhook, vai alla pagina Configurazioni > Gestione console > Avanzate > Webhooks e clicca sul pulsante Aggiungi nuovo webhook.
I webhook, come abbiamo accennato nell'introduzione ai webhooks, sono facilmente personalizzabili e quindi, quando ne crei uno nuovo, puoi configurarne diversi aspetti:
- Nome: inserisci un nome facilmente comprensibile sull'uso di quel webhook (utilizzato solo internamente) e
- URL: si tratta del Callback URL, l'URL della pagina che riceve la "chiamata" quando viene inviato un messaggio automatico dal webhook
- Tipo: al momento sono disponibili 4 eventi che fanno scattare l'esecuzione di un webhook:
- Subscribe: un destinatario si è iscritto alla Lista
- Unsubscribe: un destinatario si è disiscritto alla Lista
- Changeprofile: i dati di un destinatario nel suo profilo sono stati modificati incluso, per esempio, il Gruppo di appartenenza
- Delete: un destinatario è stato rimosso dalla Lista
- Sorgente: un evento può accadere in 3 ambienti (sorgenti) diversi:
- API: l'evento è avvenuto grazie a una chiamata API (esempio: un destinatario si è registrato da un modulo che ha eseguito una chiamata API alla console per eseguire la modifica al database)
- Console: l'evento è stato eseguito da qualcuno direttamente dalla console (esempio: un destinatario è stato aggiunto a mano)
- Recipient (Destinatario): l'evento ha registrato un'azione fatta dal destinatario (esempio: il destinatario si è disiscritto)
- Metodo: il metodo utilizzato per eseguire tecnicamente la chiamata che può essere in POST o in GET
- Attivo: se il webhook è attivo oppure no
- Criptato: se il webhook è criptato oppure no (in caso lo fosse dovrai specificare la chiave)
- Parametri: i parametri inviati nella chiamata, vedi sotto per i dettagli.
Parametri
- [EventDate]: la data in cui si è verificato l'evento in formato ISO 8601 (esempio.: 2012-09-12T11:18:37.664+02)
- [IdConsole]: the l'ID dell'account ID
- [IdList]: the list l'ID della Lista
- [IdNL]: the message l'ID del messaggio
- [EventType]: the type of eventil tipo di evento
- [EventSource]: the source of the eventla sorgente dell'evento
- [Reason]: the reason why a recipient unsubscribed. It only applies to the unsubscribe event type and includes the code that defines the different unsubscribe types.la ragione per cui il destinatario si è disiscritto, si applica solamente alla disiscrizione e include il codice che definisce i vari tipi di Bounce
- [Email]: the recipientl's indirizzo email del destinatario
- [Prefix]: the recipient's mobile phone international prefix il prefisso internazionale del numero telefonico del destinatario
- [Number]: the recipient's mobile phoneil numero telefonico del destinatario
- [Groups]: a comma-separated array of the groups that the recipient belongs to in the List una lista, separata da virgole, dei Gruppi a cui appartiene il destinatario all'interno di una Lista [IdList]
- [Channel]: canale di comunicazione segnalato da dei codici: 1 (MailEmail), 2 (Sms), 3 (Fax), 4 (Social)
- Plus all of the recipient fields in the format [Field01Tutti i Campi anagrafici nel formato [Campo01] .. [Field39Campo39]
Limitations to webhooks
Currently webhooks are not executed:
- When there is a bulk import
- When a Web service is used
In addition, please note that webhooks are List-specific, and you cannot currently create a webhook that applies to multiple lists. In the future, you will be able to quickly copy a webhook to create a similar or identical one in a new List.
Related articles
...
Limiti dei webhooks
In questo momento non vengono eseguite delle chiamate webhook nel caso:
- importi massivi
- uso di webservice
Info |
---|
I webhook sono applicabili a una Lista specifica e non è al momento possibile creare un webhook da applicare a tutte le Liste. A breve avrete modo di copiare un webhook e applicarlo ad altre liste in pochi passi. |
Argomenti correlati