Skip to main content

Subscriptions

Subscriptions are used so that a user can subscribe to communications from the company, for example emails, newsletters and sms. This document describes how to set up subscriptions.

Handlers

A subscription always requires a subscription handler. We can fetch all available handlers using GetSubscriptionHandlers.

Example response:

{
"Handlers": [
"DEFAULT",
"NEWSLETTER"
]
}

Subscriptions

You can create a subscription using the CreateSubscription webservice.

{
"Name": "Newsletter",
"BackendID": "newsletter",
"UserField": "EmailAddress",
"SubscriptionHandler": 1
}

Additional services

Subscription organization unit sets

Subscriptions are always connected to organization unit sets. By default, all stores are their own set, but you can create custom sets like outlet stores or franchise stores.

We now have to connect subscriptions to OU sets using CreateSubscriptionOrganizationUnitSet.

note

Updates can be made using the UpdateSubscriptionOrganizationUnitSet service which would include all properties mentioned in "Create" along with the ID of the created subscription organization unit set (the "response" ID given).

{
"SubscriptionID": 1,
"OrganizationUnitSetID": 1101,
"Enabled": "true",
"Default": "false",
"ConfirmationRequired": "false",
"Hidden": "false",
"Preferred": "false",
"Priority": 10 -- Optional
}

Push user subscription

The following service can be used to onboard new customers in bulk with underlying subscriptions and loyalty balances that go along with EVALOYALTY (if applicable).

{
"UserID": 1,
"SubscriptionID": 1,
"UserSubscriptionIdentifier": "123AB",
"IsSubscribed": true,
"Balance": 1.99
}