Back in stock
This article will provide you with the details needed to implement “Back in Stock”, for a supported vendor.
Back in Stock essentially boils down to setup a notification which will trigger when the item a shopper signed up for is available for their ship-to country and state (where applicable).
This feature is currently supported with Klaviyo and Rule.
Please note that configuration must be done by the client for the service used for the Back in Stock notifications, to be sent out to the shopper.
What is required to enable Back in Stock?
Centra needs to be configured with either Klaviyo or Rule.
How does it work?
A shopper will sign-up to a specific product (item) through the subscribeToBackInStock mutation (API docs).
Data required to successfully sign-up are the following:
- shipTo (country, and state where applicable)
- item
Country and state are required as the availability for the specific item depends on the warehouse/allocation rule configuration in Centra.
Optional data:
- languageCode
Examples
query
mutation subscribeToBackInStock($input: BackInStockSubscribeInput!) {
subscribeToBackInStock(input: $input) {
subscribed
userErrors {
...userErrorsFields
}
}
}
input
{
"input": {
"email": "example@centra.com",
"shipTo": {
"countryCode": "SE"
},
"item": "123-879",
"languageCode": "en"
}
}
success message
{
"data": {
"subscribeToBackInStock": {
"subscribed": true,
"userErrors": []
}
}
}
error messages
{
"data": {
"subscribeToBackInStock": {
"subscribed": false,
"userErrors": [
{
"message": "item 1-1 not found",
"path": ["subscribeToBackInStock", "input", "item"]
}
]
}
}
}
{
"data": {
"subscribeToBackInStock": {
"subscribed": false,
"userErrors": [
{
"message": "language not found",
"path": ["subscribeToBackInStock", "input", "languageCode"]
}
]
}
}
}
Getting notified
When stock is available for the item the shopper subscribed to, Centra will trigger a call to the vendor used, and an email can be sent from the vendor to the shopper informing them about the availability of the product.
Ensure that the vendor used is configured correctly for sending out emails to the shopper.
Further reading
On Centra’s Support web site, you can read more about the specific configuration needed in Klaviyo or Rule.