Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Method Objective
The method allows changing the status of the current user's subscriptions to notification channels.
Syntax and parameters
Code Block | ||||
---|---|---|---|---|
| ||||
PersonaClick.manageSubscription(email, phone, external_id, loyalty_id, telegram_id, HashMap<String, Boolean>); |
Request parameters
Name | Type | Requirement | Description |
---|---|---|---|
string | optionally | The current user's Email. | |
phone | string | optionally | The current user's Phone. |
external_id | string | optionally | Store side user ID. |
loyalty_id | string | optionally | The Loyalty Program user ID (loyalty card). |
telegram_id | string | optionally | The current user's Telegram ID. |
HashMap<String, Boolean> | HashMap | required | Subscription Statuses. See the example below. |
Available subscription statuses
Name | Type | Requirement | Description | ||
---|---|---|---|---|---|
email_bulk | boolean | optionally | It changes the current user's subscription status to bulk email campaigns. | ||
email_chain | boolean | optionally | It changes the current user's subscription status to triggered email campaigns. | ||
email_transactional | boolean | optionally | It changes the current user's subscription status for transactional email campaigns.
| ||
sms_bulk | boolean | optionally | It changes the current user's subscription status to bulk SMS campaigns. | ||
sms_chain | boolean | optionally | It changes the current user's subscription status to triggered SMS campaigns. | ||
sms_transactional | boolean | optionally | It changes the current user's subscription status for transactional SMS campaigns.
| ||
web_push_bulk | boolean | optionally | It changes the current user's subscription status to bulk webpush campaigns. | ||
web_push_chain | boolean | optionally | It changes the current user's subscription status to triggered webpush campaigns. | ||
web_push_transactional | boolean | optionally | It changes the current user's subscription status for transactional webpush campaigns.
| ||
mobile_push_bulk | boolean | optionally | It changes the current user's subscription status to bulk app campaigns. | ||
mobile_push_chain | boolean | optionally | It changes the current user's subscription status to triggered app campaigns. | ||
mobile_push_transactional | boolean | optionally | It changes the current user's subscription status for transactional app campaigns.
|
Examples of use
Code Block | ||||
---|---|---|---|---|
| ||||
HashMap<String, Boolean> subscriptions = new HashMap<>(); subscriptions.put("email_bulk", true); subscriptions.put("email_chain", true); subscriptions.put("email_transactional", true); subscriptions.put("sms_bulk", true); subscriptions.put("sms_chain", true); subscriptions.put("sms_transactional", true); subscriptions.put("web_push_bulk", true); subscriptions.put("web_push_chain", true); subscriptions.put("web_push_transactional", true); subscriptions.put("mobile_push_bulk", true); subscriptions.put("mobile_push_chain", true); subscriptions.put("mobile_push_transactional", true); PersonaClick.manageSubscription("john.doe@examplestore.com", "+100000000000", "100500", "12345-abcdf", 12345678, subscriptions); |
Code Block | ||||
---|---|---|---|---|
| ||||
HashMap<String, Boolean> subscriptions = new HashMap<>();
subscriptions.put("email_bulk", true);
subscriptions.put("email_chain", false);
subscriptions.put("email_transactional", true);
PersonaClick.manageSubscription("john.doe@examplestore.com", null, null, null, null, subscriptions); |
Code Block | ||||
---|---|---|---|---|
| ||||
HashMap<String, Boolean> subscriptions = new HashMap<>();
subscriptions.put("sms_bulk", false);
subscriptions.put("sms_chain", false);
subscriptions.put("sms_transactional", true);
PersonaClick.manageSubscription(null, "+100000000000", null, null, null, subscriptions); |
Code Block | ||||
---|---|---|---|---|
| ||||
HashMap<String, Boolean> subscriptions = new HashMap<>();
subscriptions.put("email_transactional", true);
subscriptions.put("sms_transactional", true);
PersonaClick.manageSubscription(null, null, null, null, null, subscriptions); |
Column | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Page Navigation
Related Pages
|