Manage Triggers (RN SDK)
- Andrey Veprikov
Owned by Andrey Veprikov
Sept 13, 2022
2 min read
Loading data...
Subscribe to the "Back in Stock" trigger
Method Objective
The method subscribes the user to the notifications that the product is available.
Syntax and parameters
pcsdk.triggers("subscribe_for_product_available", 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 | optionally | The current user's Email. If not set, the subscription will be on Web Push notification. | |
properties | Object | optionally | Additional product properties. The following are available:
|
Examples of use
pcsdk.triggers("subscribe_for_product_available", { item: "100500", email: "john.doe@examplestore.com" });
pcsdk.triggers("subscribe_for_product_available", { item: "100500" });
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
pcsdk.triggers("unsubscribe_from_product_available", params);
Name | Type | Requirement | Description |
---|---|---|---|
params | Object | required | Object with request parameters. |
Request parameters
Name | Type | Requirement | Description |
---|---|---|---|
item_ids | array | required | An 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. |
string | required | The current user's Email. |
Examples of use
pcsdk.triggers("unsubscribe_from_product_available", { item_ids: ["100500", "146", "12"], email: "john.doe@examplestore.com" });
pcsdk.triggers("unsubscribe_from_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 the notifications of a product price decrease.
Syntax and parameters
pcsdk.triggers("subscribe_for_product_price", 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 price drop the user will be subscribed. |
price | number | required | The current product price. |
string | optionally | The current user's Email. If not set, the subscription will be on Web Push notification. |
Examples of use
pcsdk.triggers("subscribe_for_product_price", { item: "100500", price: 146.55, email: "john.doe@examplestore.com" });
pcsdk.triggers("subscribe_for_product_price", { item: "100500", price: 146.55 });
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
pcsdk.triggers("unsubscribe_from_product_price", params);
Name | Type | Requirement | Description |
---|---|---|---|
params | Object | required | Object with request parameters. |
Request parameters
Name | Type | Requirement | Description |
---|---|---|---|
item_ids | array | required | An 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. |
string | required | The current user's Email. |
Examples of use
pcsdk.triggers("unsubscribe_from_product_price", { item_ids: ["100500", "146", "12"], email: "john.doe@examplestore.com" });
pcsdk.triggers("unsubscribe_from_product_price", { item_ids: [], // unsubscribe from all products email: "john.doe@examplestore.com" });
Page Navigation
Related Pages
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
Copyright 2018-2024 PersonaClick