Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Subscribe to the "Back in Stock" trigger
Method Objective
The method subscribes the user to the notifications that the product is available.
Tip |
---|
A device token must first be sent to subscribe to App Push notifications. SeeĀ Notifications (iOS SDK). |
Syntax and parameters
Code Block | ||||
---|---|---|---|---|
| ||||
sdk.subscribeForBackInStock(params) |
Request parameters
Name | Type | Requirement | Description |
---|---|---|---|
id | string | required | The product ID to notify of the product availability the user will be subscribed. |
string | optionally | The current user's Email. | |
phone | string | optionally | The current user's Phone. |
fashionSize | string | optionally | The clothing size. The value of the parameter in the internal format of the store. |
fashionColor | string | optionally | The clothing color. The value of the parameter in the internal format of the store. |
barcode | string | optionally | Product barcode. |
Examples of use
Code Block | ||||
---|---|---|---|---|
| ||||
sdk.subscribeForBackInStock(id: "100500"); |
Code Block | ||||
---|---|---|---|---|
| ||||
sdk.subscribeForBackInStock(id: "100500", email: "john.doe@examplestore.com", fashionSize: "XL", fashionColor: "yellow", barcode: "123ABC"); |
Code Block | ||||
---|---|---|---|---|
| ||||
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
Code Block | ||||
---|---|---|---|---|
| ||||
sdk.unsubscribeForBackInStock(params) |
Request parameters
Name | Type | Requirement | Description |
---|---|---|---|
itemIds | array | required | The product ID to notify of the product availability the user will be subscribed. |
string | optionally | The current user's Email. | |
phone | string | optionally | The current user's Phone. |
Examples of use
Code Block | ||||
---|---|---|---|---|
| ||||
sdk.unsubscribeForBackInStock(itemIds: ["146", "100500"]); |
Code Block | ||||
---|---|---|---|---|
| ||||
sdk.unsubscribeForBackInStock(itemIds: ["146", "100500"], email: "john.doe@examplestore.com"); |
Code Block | ||||
---|---|---|---|---|
| ||||
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.
Tip |
---|
A device token must first be sent to subscribe to App Push notifications. SeeĀ Notifications (iOS SDK). |
Syntax and parameters
Code Block | ||||
---|---|---|---|---|
| ||||
sdk.subscribeForPriceDrop(params); |
Request parameters
Name | Type | Requirement | Description |
---|---|---|---|
id | string | required | The product ID to notify of the product price drop the user will be subscribed. |
currentPrice | number | required | The current product price. |
string | optionally | The current user's Email. | |
phone | string | optionally | The current user's Phone. |
fashionSize | string | optionally | The clothing size. The value of the parameter in the internal format of the store. |
fashionColor | string | optionally | The clothing color. The value of the parameter in the internal format of the store. |
barcode | string | optionally | Product barcode. |
Examples of use
Code Block | ||||
---|---|---|---|---|
| ||||
sdk.subscribeForPriceDrop(id: "100500", currentPrice: 146.99); |
Code Block | ||||
---|---|---|---|---|
| ||||
sdk.subscribeForPriceDrop(id: "100500", currentPrice: 146.99, email: "john.doe@examplestore.com", fashionSize: "XL", fashionColor: "yellow", barcode: "123ABC"); |
Code Block | ||||
---|---|---|---|---|
| ||||
sdk.subscribeForPriceDrop(id: "100500", currentPrice: 146.99, phone: "4400114527199"); |
Column | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Page Navigation
Related Pages
|