/
Manage Triggers (iOS SDK)

Manage Triggers (iOS SDK)

Subscribe to the "Back in Stock" trigger

Method Objective

The method subscribes the user to the notifications that the product is available.

A device token must first be sent to subscribe to App Push notifications. See Notifications (iOS SDK).

Syntax and parameters

sdk.subscribeForBackInStock(params)

Request parameters

NameRequirementDescription
idrequiredThe product ID to notify of the product availability the user will be subscribed.
emailoptionallyThe current user's Email.
phoneoptionallyThe current user's Phone.
fashionSizeoptionallyThe clothing size. The value of the parameter in the internal format of the store.
fashionColoroptionallyThe clothing color. The value of the parameter in the internal format of the store.
barcodeoptionallyProduct barcode.

Examples of use

sdk.subscribeForBackInStock(id: "100500");

sdk.subscribeForBackInStock(id: "100500", email: "john.doe@examplestore.com", fashionSize: "XL", fashionColor: "yellow", barcode: "123ABC");

sdk.subscribeForBackInStock(id: "100500", phone: "4400114527199");


Unsubscribe from the "Back in Stock" trigger

Method Objective

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

Syntax and parameters

sdk.unsubscribeForBackInStock(params)

Request parameters

NameRequirementDescription
itemIdsrequiredThe product ID to notify of the product availability the user will be subscribed.
emailoptionallyThe current user's Email.
phoneoptionallyThe current user's Phone.

Examples of use

sdk.unsubscribeForBackInStock(itemIds: ["146", "100500"]);
sdk.unsubscribeForBackInStock(itemIds: ["146", "100500"], email: "john.doe@examplestore.com");
sdk.unsubscribeForBackInStock(itemIds: ["146", "100500"], phone: "4400114527199");


Subscribe to the "Price Drop" trigger

Method Objective

The method subscribes the user to the notifications of a product price decrease.

A device token must first be sent to subscribe to App Push notifications. See Notifications (iOS SDK).

Syntax and parameters

sdk.subscribeForPriceDrop(params);

Request parameters

NameRequirementDescription
idrequiredThe product ID to notify of the product price drop the user will be subscribed.
currentPricerequiredThe current product price.
emailoptionallyThe current user's Email.
phoneoptionallyThe current user's Phone.
fashionSizeoptionallyThe clothing size. The value of the parameter in the internal format of the store.
fashionColoroptionallyThe clothing color. The value of the parameter in the internal format of the store.
barcodeoptionallyProduct barcode.

Examples of use

sdk.subscribeForPriceDrop(id: "100500", currentPrice: 146.99);

sdk.subscribeForPriceDrop(id: "100500", currentPrice: 146.99, email: "john.doe@examplestore.com", fashionSize: "XL", fashionColor: "yellow", barcode: "123ABC");

sdk.subscribeForPriceDrop(id: "100500", currentPrice: 146.99, phone: "4400114527199");

Related content

Copyright 2018-2024 PersonaClick