Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

Image Removed

Parameters

The parameters that can be included in the callback are:

...

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) 
  • 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 piattaforma per eseguire la modifica al database). La sorgente API fa riferimento alle Http Api. Non sarà attivo per le Rest o le Soap Api.
    • Console: l'evento è stato eseguito da qualcuno direttamente dalla piattaforma (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) 
    • MailUp utilizza RC4 encryption e la chiave fornita per criptare
    • i dati vengono convertiti in codice  Base64 
    • La pagina di ricezione della chiamata - conoscendo la chiave - può facilmente estrarre i dati criptati 
  • Parametri: i parametri inviati nella chiamata, vedi sotto per i dettagli. 

Image Added


Parametri

I parametri che possono essere inclusi nelle chiamate sono:
  • [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]: 1 (Mail), 2 : canale di comunicazione segnalato da dei codici:0 (Email), 1 (Sms), 3 2 (Fax), 4 5 (Social) Plus all of the recipient fields in the format [Field01, -1 (Unknown quindi un evento non collegato a un canale)
  • Tutti i Campi anagrafici nel formato [Nome] ... [Field39indirizzo]

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 di:

  • importi massivi
  • uso di webservice (si intende per le chiamate Rest Api, mentre si attiva attraverso l'interazione con le chiamate Http Api)
Info

I webhook sono applicabili a una Lista specifica e non è al momento possibile creare un webhook da applicare a tutte le Liste. In pochi passi, al momento della creazione di una nuova lista, è possibile copiare un webhook da altre liste esistenti.