Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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
languagejs
themeFadeToGrey
personaclick("subscribe_triggersubscription", "product_availablemanage", params);

NameTypeRequirementDescription
paramsObjectrequiredObject with request parameters.

Request parameters

itemnumber/required product ID to notify of the product availability the user will be subscribed.
NameTypeRequirementDescription
emailstringoptionallyThe emailcurrent user's Email.
phonestringrequiredoptionally

The current user's

Email.
propertiesObjectoptionally

Additional product properties. The following are available:

  • fashion_size (number/string) - clothing size. The value of the parameter in the internal format of the store.
Example

Phone.

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.

Examples of use

Code Block
languagejs
themeFadeToGrey
personaclick("subscribe_triggersubscription", "product_availablemanage", {
    email: "john.doe@examplestore.com",
    phone: "+100000000000",
    email_bulk: true,
    email_chain: true,
    email_transactional: true,
    sms_bulk: true,
    sms_chain: true,
    item: "100500sms_transactional: true
});

Code Block
languagejs
themeFadeToGrey
personaclick("subscription", "manage", {
    email: "john.doe@examplestore.com",
    email_bulk: true,
    email_chain: false,
    properties: {email_transactional: true,
});

Code Block
languagejs
themeFadeToGrey
personaclick("subscription", "manage", {
    phone: "+100000000000",
    sms_bulk: false,
  fashion_size: "XL"  sms_chain: false,
    sms_transactional: true
});

Code Block
languagejs
themeFadeToGrey
personaclick("subscription", "manage", {
    }email_transactional: true,
    sms_transactional: true
});


Table of Contents
maxLevel2
classpersonaclick-fixed-position