Skip to main content
Skip table of contents

Stock Availability Process

Overview

To improve immediate feedback on the expected fulfillment of an order, stock availability can be queried prior to order placement. Suppliers that have opted to provide stock availability statuses can have their products queried to ensure up-to-date stock information, which is typically updated daily.

Key Endpoints

  • ListSuppliers: List PharmX suppliers with the StockAvailabilityRequests flag indicating if the supplier has opted into stock availability.

  • GetStockAvailability: Retrieves stock availability by location for a set of products for a given supplier.

Identifying Suppliers with Stock Availability

To identify which suppliers have provided stock availability, when syncing suppliers from the ListSuppliers endpoint, the StockAvailabilityRequests flag indicates if stock availability can be queried for the their products.

Stock Availability Status

  • In Stock: The supplier has sufficient stock to fulfill orders placed for the day.

  • Out of Stock: The supplier currently has insufficient stock to fulfill the order.

  • Available for Backorder: The supplier can accept the order, but the product will be placed on backorder.

  • Not Available: The availability status has not been provided for the product.

Stock Availability Approaches

Approach 1: Interval Checks

Implement a background or cron job that periodically requests updates to product records or cache. The stock availability flag is then displayed against product data during order creation.

Pros

  • Stock availability is displayed prior to attempting to add items to an order.

  • Point of Sale (POS) systems can disable unavailable products, preventing them from being added to the order.

Cons

  • Stock availability flags may be outdated by the time an order is placed, potentially causing issues with newly stocked items being unavailable and out-of-stock items being added to the order.

Approach 2: Add Order Line Pre-Check (Recommended)

When adding a product to an order, the stock availability is queried in real-time. Products that are not available are prevented from being added to the cart.

Pros

  • Real-time checks notify the user of unavailable items early in the process.

Cons

  • Users are only informed of unavailable items when attempting to add them to the order.

Approach 3: On Demand Request

Users can optionally check stock availability before placing an order. If the user does not manually check, the order is placed as usual, and out-of-stock messages are received as part of the initial order response or later via order acknowledgements.

Pros

  • All items in the order can be validated for stock availability in a single request.

Cons

  • Requires an additional manual step for the user to confirm stock availability.

Approach 4: Pre-Order Compliance Check

Upon order submission to PharmX, the stock availability is checked before the order compliance check and order creation web methods. If any products are unavailable, the process is cancelled, and the user is notified to amend the order before submission.

Pros

  • Integrates stock availability checks into the existing order submission process.

Cons

  • Users are not aware of unavailable items until they are ready to place the order.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.