Skip to end of metadata
Go to start of metadata

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

Compare with Current View Page History

« Previous Version 5 Next »

Subscribe to the "Back in Stock" trigger

Method Objective

The method subscribes the user to an email notification that the product is available.

Syntax and parameters

personaclick("subscribe_trigger", "product_available", params);

NameTypeRequirementDescription
paramsObjectrequiredObject with request parameters.

Request parameters

NameTypeRequirementDescription
itemnumber/stringrequiredThe product ID to notify of the product availability the user will be subscribed.
emailstringrequiredThe 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 of use

personaclick("subscribe_trigger", "product_available", {
    item: "100500", 
    email: "john.doe@examplestore.com",
    properties: {
        fashion_size: "XL"
    }
});

Unsubscribe from the "Back in Stock" trigger

Method Objective

The method unsubscribes the user from an email notification that the product is available.

Syntax and parameters

personaclick("unsubscribe_trigger", "product_available", params);

NameTypeRequirementDescription
paramsObjectrequiredObject with request parameters.

Request parameters

NameTypeRequirementDescription
item_idsarrayrequiredAn array of product IDs for which the user would like to unsubscribe from the product availability notification. You can use an empty array to unsubscribe from all products.
emailstringrequiredThe current user's Email.

Examples of use

personaclick("unsubscribe_trigger", "product_available", {
    item_ids: ["100500", "146", "12"], 
    email: "john.doe@examplestore.com"
});

personaclick("unsubscribe_trigger", "product_available", {
    item_ids: [], // unsubscribe from all products
    email: "john.doe@examplestore.com"
});


Subscribe to the "Price Drop" trigger

Method Objective

The method subscribes the user to an email notification of a product price decrease.

Syntax and parameters

personaclick("subscribe_trigger", "product_price_decrease", params);

NameTypeRequirementDescription
paramsObjectrequiredObject with request parameters.

Request parameters

NameTypeRequirementDescription
itemnumber/stringrequiredThe product ID to notify of the product price drop the user will be subscribed.
pricenumberrequiredThe current product price.
emailstringrequiredThe 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 of use

personaclick("subscribe_trigger", "product_price_decrease", {
    item: "100500", 
    price: 146.55, 
    email: "john.doe@examplestore.com",
    properties: {
        fashion_size: "XL"
    }
});

Unsubscribe from the "Price Drop" trigger

Method Objective

The method unsubscribes the user from an email notification of a product price decrease.

Syntax and parameters

personaclick("unsubscribe_trigger", "product_price_decrease", params);

NameTypeRequirementDescription
paramsObjectrequiredObject with request parameters.

Request parameters

NameTypeRequirementDescription
item_idsarrayrequiredAn array of product IDs for which the user would like to unsubscribe from the price drop notification. You can use an empty array to unsubscribe from all products.
emailstringrequiredThe current user's Email.

Examples of use

personaclick("unsubscribe_trigger", "product_price_decrease", {
    item_ids: ["100500", "146", "12"], 
    email: "john.doe@examplestore.com"
});

personaclick("unsubscribe_trigger", "product_price_decrease", {
    item_ids: [], // unsubscribe from all products
    email: "john.doe@examplestore.com"
});

  • No labels