PersonaClick | AI-based Omnichannel Marketing Platform

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

Version 1 Next »

Method Objective

The method allows changing the status of the current user's subscriptions to notification channels.

Syntax and parameters

PersonaClick.manageSubscription(email, phone, HashMap<String, Boolean>);

Request parameters

NameTypeRequirementDescription
emailstringoptionallyThe current user's Email.
phonestringoptionally

The current user's Phone.

HashMap<String, Boolean>HashMaprequiredSubscription Statuses. See the example below.

Available subscription statuses

NameTypeRequirementDescription
email_bulkbooleanoptionallyIt changes the current user's subscription status to bulk email campaigns.
email_chainbooleanoptionallyIt changes the current user's subscription status to triggered email campaigns.
email_transactionalbooleanoptionallyIt changes the current user's subscription status for transactional email campaigns.
sms_bulkbooleanoptionallyIt changes the current user's subscription status to bulk SMS campaigns.
sms_chainbooleanoptionallyIt changes the current user's subscription status to triggered SMS campaigns.
sms_transactionalbooleanoptionallyIt changes the current user's subscription status for transactional SMS campaigns.
web_push_bulkbooleanoptionallyIt changes the current user's subscription status to bulk webpush campaigns.
web_push_chainbooleanoptionallyIt changes the current user's subscription status to triggered webpush campaigns.
web_push_transactionalbooleanoptionallyIt changes the current user's subscription status for transactional webpush campaigns.
mobile_push_bulkbooleanoptionallyIt changes the current user's subscription status to bulk app campaigns.
mobile_push_chainbooleanoptionallyIt changes the current user's subscription status to triggered app campaigns.
mobile_push_transactionalbooleanoptionallyIt changes the current user's subscription status for transactional app campaigns.

Examples of use

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", subscriptions);

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, subscriptions);

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", subscriptions);

HashMap<String, Boolean> subscriptions = new HashMap<>();
subscriptions.put("email_transactional", true);
subscriptions.put("sms_transactional", true);
PersonaClick.manageSubscription(null, null, subscriptions);
  • No labels