Guides
Trin for trin-vejledninger til opsætning og brug af systemet.
Guides - Customer: Newsletter subscribe/unsubscribe
-
Guides
- General
- Booking
- Event
- Cash Register Add-On
- Gift Voucher Add-On
- Marketing Add-On
- Record Add-On
- Form Add-On
- Documents
- Online Payment Add-On
- SMS Add-On
- Integrations
- For developers
- API and webhooks
- REST API
- Webhooks
- Scheduled webhooks
- Event webhooks
- Booking: Create/edit/delete
- Customer: Newsletter subscribe/unsubscribe
- Reward program: Balance update
- Cash register: Completed sale
- Cash register: Completed sale - per line item
- Cash register: Cash reconciliation
- Customer: Master data updated
- Online paid/cancelled orders with customer attached
- Event: Create/edit/delete
- Event participant: Sign up/cancel/edit
- Work hours: Create/edit/delete work hour
- Voucher: Completed transaction
- Questionnaire: Finish/edit
- SSO - Single Sign On
- API and webhooks
Customer: Newsletter subscribe/unsubscribe
This webhook can be used to send data when a customer subscribes to or unsubscribes from the newsletter. The webhook runs when the e-mail newsletter subscription is changed on an existing customer. Under "Run at" you choose whether it should run on:
If a new customer is created with the newsletter checked, the webhook is not triggered. Use the webhook Kunde - Stamdata opdateret with "Create customer" instead. Only the e-mail newsletter triggers the webhook. Changes to the SMS consent do not trigger it. The webhook is added to a queue that is processed every 5 minutes. It can therefore take up to about 5 minutes before the webhook is sent. There is no replacement code that tells whether the customer was subscribed or unsubscribed. It is therefore recommended to create one webhook for each action and write the action yourself as text in the JSON, for example "SUBSCRIBED" or "UNSUBSCRIBED". Example of JSON that can be sent: |
{
"action": "SUBSCRIBED",
"administratorId": [administratorId],
"customerId": [customerId],
"customerName": "[customerName]",
"customerEmail": "[customerEmail]",
"customerAcceptsMarketingEmail": "[customerAcceptsMarketingEmail]"
}
![]() |
Customers created or edited through import or the API do not trigger this webhook. Changes to the newsletter subscription also send the webhook Kunde - Stamdata opdateret, if "Edit customer" is selected on it. |
The following replacement codes are specific to this webhook and can be used in addition to those in the example:
In addition to the above, you can use the other replacement codes for the customer (for example order totals, last and next booking and customer tags) from Kunde - Stamdata opdateret and freely use replacement codes from the following category to build your own data: |
