Versions Compared
Version | Old Version 1 | New Version Current |
---|---|---|
Changes made by | ||
Saved on |
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Manage Subscriptions
Method Objective
The method subscribes allows changing the status of the current user's subscriptions to an email notification that the product is availablenotification channels.
Syntax and parameters
Code Block | ||||
---|---|---|---|---|
| ||||
personaclick("subscribe_triggersubscription", "product_availablemanage", params); |
Name | Type | Requirement | Description |
---|---|---|---|
params | Object | required | Object with request parameters. |
Request parameters
Name | Type | Requirement | Description |
---|---|---|---|
item | number/string | required | The product ID to notify of the product availability the user will be subscribed. |
string | required | The current user's Email. | |
properties | Object | optionally | Additional product properties. The following are available:
|
string | optionally | The current user's Email. | |||
phone | string | optionally | The current user's phone in full international format.
| ||
external_id | string | optionally | Store side user ID. | ||
loyalty_id | string | optionally | The Loyalty Program user ID (loyalty card). | ||
telegram_id | string | optionally | Telegram User ID. | ||
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 | ||||
---|---|---|---|---|
| ||||
personaclick("subscribe_triggersubscription", "product_availablemanage", { email: "john.doe@examplestore.com", item: "100500", phone: "+100000000000", email_bulk: true, email_chain: true, email_transactional: true, sms_bulk: true, sms_chain: true, sms_transactional: true, web_push_bulk: true, web_push_chain: true, web_push_transactional: true, mobile_push_bulk: true, mobile_push_chain: true, mobile_push_transactional: true }); |
Code Block | ||||
---|---|---|---|---|
| ||||
personaclick("subscription", "manage", { email: "john.doe@examplestore.com", properties: email_bulk: true, email_chain: false, email_transactional: true, }); |
Code Block | ||||
---|---|---|---|---|
| ||||
personaclick("subscription", "manage", {
phone: "+100000000000",
sms_bulk: false,
sms_chain: false,
sms_transactional: true
}); |
Code Block | ||||
---|---|---|---|---|
| ||||
personaclick("subscription", "manage", { email_transactional: true, fashionsms_size: "XL" } }); |
transactional: true
}); |
Subscription Statuses
Method Objective
The method allows checking the user's current subscription status by did (device id), email or phone number.
Syntax and parameters
Code Block | ||||
---|---|---|---|---|
| ||||
personaclick("subscription", "check", success, error); |
Name | Type | Requirement | Description |
---|---|---|---|
success | function | required | A callback function, to which the API response will be passed. Response type: object. |
error | function | optionally | A callback function that will be called when an error occurs (any HTTP status code other than 200). |
API Response Data
The response is JSON type with the following properties:
Name | Type | Description |
---|---|---|
exists | boolean | Shows whether a profile with the requested property exists or not. |
email_confirmed | boolean | Shows whether the email is confirmed or not. |
email_bulk | boolean | Email subscription status for bulk campaigns. |
email_chain | boolean | Email subscription status for chain/trigger campaigns. |
email_transactional | boolean | Email subscription status for transactional campaigns. |
email_bounced | boolean | The email is hard bounced or not. |
email_suppressed | boolean | The email is suppressed or not. |
email_blacklisted | boolean | The email is blacklisted or not. |
email_invalid | boolean | The email is invalid or not. |
sms_bulk | boolean | Phone subscription status for SMS bulk campaigns. |
sms_chain | boolean | Phone subscription status for SMS chain/trigger campaigns. |
sms_transactional | boolean | Phone subscription status for SMS transactional campaigns. |
web_push | boolean | Whether or not the user with the email/phone has a subscription to web push. |
web_push_bulk | boolean | Web-push subscription status for bulk campaigns. |
web_push_chain | boolean | Web-push subscription status for chain/trigger campaigns. |
web_push_transactional | boolean | Web-push subscription status for transactional campaigns. |
mobile_push | boolean | Whether or not the user with the email/phone has a subscription to mobile app push. |
mobile_push_bulk | boolean | Mobile app push subscription status for bulk campaigns. |
mobile_push_chain | boolean | Mobile app push subscription status for chain/trigger campaigns. |
mobile_push_transactional | boolean | Mobile app push subscription status for transactional campaigns. |
telegram_bulk | boolean | Telegram subscription status for bulk campaigns. |
telegram_chain | boolean | Telegram subscription status for chain/trigger campaigns. |
telegram_transactional | boolean | Telegram subscription status for transactional campaigns. |
status | string | Available only in case of an error. Contains the "error" value in this case. |
message | string | Available only in case of an error. Contains a description of the error. |
Request Example
Code Block | ||||
---|---|---|---|---|
| ||||
personaclick("subscription", "check", function(response) {
// success
}, function(error) {
// fail
});
|
Column | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Page Navigation
Related Pages
|