You can set up real-time inventory for your store to provide shoppers with accurate inventory of items that will update in real-time when an order is submitted.
When you're using this version of the Inventory feature, the Call Script URL field must contain the URL of your inventory script. Such scripts must accept and return information in the formats described below (here's a sample script). Inventory will be checked first when a new item is added to the cart and subsequently when the user confirms an order.
All requests will be sent as POST requests with item information sent in <key>=<value> format as described below:
.catalog=<catalog name>
.code=<item code>
.id=<item id>
.quantity=<item quantity requested>
.price=<price of item>
Note the . (dot) preceding each of the keys above. Also, each key-value pair will be separated by the ampersand (&) symbol. This list is followed by the item attribute list, if any.
When options are defined and selected for an item in the order, the key will take the name of the option (such as size or color) and the value is the option. For example:
Color=<Sea Green>
Size=<L>
The script should respond with the following header information:
Available: <item quantity available>
where <quantity> is the number of items available.
Use 0 (zero) to indicate non-availability. Use a negative number to indicate unknown availability.
Inventory-Message: <message>
where <message> is the text that a customer will see when they try to place an order for an item that isn't available.
Enable Real-time inventory management
- Sign in to your My Services page.
- Click the Store link.
- Go to Configure Inventory.
- Under Inventory Options, select the radio button next to Real time inventory.
- Under Alerts, choose an option for low inventory notifications:
- Send email alert - Choose Yes to enable email alerts.
- Alert Threshold - Choose at what inventory level to send an alert.
- Email to - Enter email addresses.
- Send - Choose a time when alerts will be sent.
- Click the Update button to save and refresh the page.
- Under Settings:
- Enter the URL in the Call Script field.
- Choose a Display Inventory Column setting (See below for examples.):
- No - Inventory column will not be displayed in the shopping cart.
- Yes With Quantity - Customers will see the actual quantity available.
- Yes With Availability - Customers will see either Yes or No and they will not see the actual number available.
- Choose a backorder option for Quantity can Exceed Availability:
- No - Customers cannot order more than available quantity.
- Yes - Customers can backorder items.
- Choose an option for If my server is unreachable:
- Accept orders (default) - If your script cannot be called, your customer will see a message stating Availability could not be confirmed, and the order will be allowed to be completed.
- Reject orders - If your script cannot be called orders will be rejected.
- Click the Update button.
- Return to Store Manager and publish your Order Settings.
Note: If you require firewall restrictions on access to your Web server, add the IP ranges for real-time integrations.
Validating Your Script
When you enter the URL for your script in Store Manager, we'll verify it by sending the following request:
.catalog=<your catalog name>&
.id=_fake_yahoo_item_&.code=_fake_yahoo_code_
The script should respond with the following header information:
Available: <any integer value>
Please note: The Database inventory version of the Inventory feature does check your inventory levels in real time at the time the ordered items are placed into the Shopping Cart for your store, so for most people, the Database inventory version of the Inventory feature works fairly well. Learn more.
The three Display Inventory Column settings - No (top), Yes with Quantity (middle), and Yes with Availability (bottom):