Inventory Available to Promise Feed
Data Structure: Structure of Inventory Available to Promise Feed
Example File: BIRetooling_Feeds_ATP_Feed_XSD_example
Overview
The Inventory Available to Promise (ATP) feed reports on inventory levels for webstore purposes. The ATP is an outbound feed: Radial sends the feed files to the client or to third parties acting on behalf of the client.
The following diagram shows the data flow for the feed.
File Formats
The Inventory Available to Promise feed supports the following file formats:
- The GSIATPXML format is the standard, canonical XML format for the feed.
- The GSIATPFLAT format is a simple pipe-delimited version of the quantity data in the GSIATPXML, but it excludes the statistics part of the data.
- The DMDWR07XML format is an XML file compatible with the Demandware Inventory 2007 format.
- The CAMPFLT_CA format is a flat file for integration with Channel Advisor Marketplaces.
Modes
The Inventory Available to Promise feed can report data in either of the following modes:
- When run in full mode, the Inventory Available to Promise feed delivers the inventory snapshot for all selected items, based on the feed's item selection level.
- When run in delta mode, the feed delivers the inventory snapshot only for selected items that have changed since the last time the feed was sent.
Item Selection Level
The Inventory Available to Promise feed can select item data at any of the following levels:
-
When run at the client level, the process includes all items having valid inventory or that went out of stock in the last day that belong to all catalogs sold through all stores associated with the client.
-
When run at the catalog level, the process includes all items having valid inventory or that went out of stock in the last day that belong to a catalog that is being sold through any store (channel).
-
When run at the store level, the process includes all items having valid inventory or that went out of stock in the last day that belong to the store (channel) from any catalog associated with the store.
Regardless of the selection level, an item is selected only if the item is included in the Store Reporting Data Warehouse product_dim table for the associated store (channel). The relationships between client, stores, and catalogs is derived from ICS settings in the Data Warehouse MySQL context table.
File Names
Files delivered by the Inventory Available to Promise feed follow a naming convention that incorporates the file format, mode, and item selection level:
- Files with client-level data follow this naming standard:
<client>_ALL_inventatp<mode>_<format>_<datetimestamp>.<ext>
- Files with catalog-level data follow this naming standard:
<client>_<catalog>_inventatp<mode>_<format>_<datetimestamp>.<ext>
- Files with store-level data follow this naming standard:
<client>_<store>_inventatp<mode>_<format>_<datetimestamp>.<ext>
For example, a file named TMSNA_18_inventatpfull_GSIATPXML_20150301093000.xml
is a catalog-level file in full mode, delivered in the standard XML file format. The following table describes each file name component.
Field |
Description |
Example |
---|---|---|
client |
Radial client ID defined in ICS |
TMSNA |
store |
Radial store ID defined in ICS |
TMSUS |
catalog |
Radial catalog ID defined in ICS |
18 |
mode |
Extract mode: full or delta |
full |
format |
File format identifier |
GSIATPXML |
datetimestamp |
Date and time of extract |
20150717123000 |
ext |
File type extension: .xml or .txt |
.xml |
Feed Schedule and Delivery
A typical and recommended schedule for the Inventory Available to Promise feed includes the following:
- A nightly extract in full mode
- An update every 30 minutes in delta mode
The generated feed files are delivered to a client-specific inbox in Sterling Integrator/Sterling File Gateway. Use your credentials, supplied by Radial, to log in and retrieve the files.
XML Format (GSIATPXML)
The GSIATPXML format is the standard, canonical XML format for the feed. A file in this format begins with a header record followed by one or more inventory records. The XML schema for this format, a simplified form of the schema for the Inventory feed, is atpfeed3.xsd.
Header Record
The following example shows a typical header record:
<MessageHeader>
<Standard>GSI</Standard>
<HeaderVersion>NGP1.0.0</HeaderVersion>
<VersionReleaseNumber>NGP1.0.0</VersionReleaseNumber>
<SourceData>
<SourceId>DW</SourceId>
<SourceType>DW</SourceType>
</SourceData>
<DestinationData>
<DestinationId>GSIATPXML</DestinationId>
<DestinationType>MAILBOX</DestinationType>
</DestinationData>
<EventType>ItemInventories</EventType>
<MessageData>
<MessageId>20130702010458_01swN</MessageId>
<CorrelationId>0</CorrelationId>
</MessageData>
<CreateDateAndTime>2013-07-02T01:05:00.052Z</CreateDateAndTime>
</MessageHeader>
Inventory Record
The Inventory tag's attributes identify the item and the type of inventory record. The inventory record contains three sections:
- The ItemId section contains the ClientItemID, which is the client’s vendor SKU for the item
- The Measurements section contains the various inventory level details for supply and demand.
- The Statistics section contains sales data used for Marketplace Integration support.
The following example shows one inventory record.
Note: The Pending Quantity attribute is included in the ATP feed only for third-party warehouses, not for Radial DCs.
<Inventory catalog_id="18" gsi_client_id="18-883458083104" measurement="Level" operation_type="Change">
<ItemId>
<ClientItemId>883458083104</ClientItemId>
</ItemId>
<Measurements>
<AvailableQuantity>6</AvailableQuantity>
<BackorderQuantity>0</BackorderQuantity>
<PendingQuantity date_due="2500-01-01">0</PendingQuantity>
<DemandQuantity>0</DemandQuantity>
<OnHandQuantity>6</OnHandQuantity>
</Measurements>
<Statistics>
<MPForecastMean30Days>0</MPForecastMean30Days>
<MPForecastMean5Days>0</MPForecastMean5Days>
<MPNumDaysSoldIn30>0</MPNumDaysSoldIn30>
<MPBurnRate>0</MPBurnRate>
</Statistics>
</Inventory>
Flat File Format (GSIATPFLAT)
The GSIATPFLAT format is a simple pipe-delimited version of the quantity data in the GSIATPXML format. It excludes the statistics data. Fields are separated by the pipe (|) character.
The GSIATPFLAT file includes the following fields, in the order listed.
Field |
Description |
---|---|
CatalogID |
GSI catalog ID |
GSIClientID |
GSI item ID |
ClientItemId |
Client item ID |
AvailableQuantity |
Quantity available |
BackorderQuantity |
Quantity on backorder |
DemandQuantity |
Demand quantity for the item |
OnHandQuantity |
On hand stock for the item |
The following example shows one inventory record from a GSIATPFLAT file:
18|18-400000040448|400000040448|1|0|0|1
Demandware Format (DMDWR07XML)
The DMDWR07XML format is an XML file compatible with the Demandware Inventory 2007 format.
Structure
The format follows the following structure:
Parent, Child, or Attribute | M/C | Min Use | Max Use | Min Length | Max Length | Data Type | Format | |
---|---|---|---|---|---|---|---|---|
/inventory | P | M | 1 | 1 | ||||
/inventory/inventory-list | P | C | 0 | |||||
/inventory/inventory-list/header | P | M | 1 | 1 | ||||
/inventory/inventory-list/header@list-id | A | M | 1 | 1 | 1 | 256 | String | |
/inventory/inventory-list/header@mode | A | C | 0 | 1 | enum | 'delete' | ||
/inventory/inventory-list/header/default-instock | C | C | 0 | 1 | boolean | |||
/inventory/inventory-list/header/description | C | C | 0 | 1 | 0 | 4000 | String | |
/inventory/inventory-list/header/use-bundle-inventory-only | C | C | 0 | 1 | boolean | |||
/inventory/inventory-list/header/custom-attributes | P | C | 0 | 1 | ||||
/inventory/inventory-list/header/custom-attributes/custom-attribute | P | C | 0 | |||||
/inventory/inventory-list/header/custom-attributes/custom-attribute@attribute-id | A | M | 1 | 1 | 1 | 256 | String | |
/inventory/inventory-list/header/custom-attributes/custom-attribute@xml:lang | A | C | 0 | 1 | locale | |||
/inventory/inventory-list/header/custom-attributes/custom-attribute/value | C | C | 0 | String | ||||
/inventory/inventory-list/records | P | C | 0 | 1 | ||||
/inventory/inventory-list/records/record | P | C | 0 | |||||
/inventory/inventory-list/records/record@product-id | A | M | 1 | 1 | 1 | 100 | String | |
/inventory/inventory-list/records/record@mode | A | C | 0 | 1 | enum | 'delete' | ||
/inventory/inventory-list/records/record/allocation | C | C | 0 | 1 | decimal | |||
/inventory/inventory-list/records/record/allocation-timestamp | C | C | 0 | 1 | datetime | |||
/inventory/inventory-list/records/record/perpetual | C | C | 0 | 1 | boolean | |||
/inventory/inventory-list/records/record/preorder-backorder-allocation | C | C | 0 | 1 | decimal | |||
/inventory/inventory-list/records/record/preorder-backorder-handling | C | C | 0 | 1 | enum | 'none','preorder','backorder' | ||
/inventory/inventory-list/records/record/in-stock-date | C | C | 0 | 1 | date | |||
/inventory/inventory-list/records/record/custom-attributes | P | C | 0 | 1 | ||||
/inventory/inventory-list/records/record/custom-attributes/custom-attribute | P | C | 0 | |||||
/inventory/inventory-list/records/record/custom-attributes/custom-attribute@attribute-id | A | M | 1 | 1 | 1 | 100 | string | |
/inventory/inventory-list/records/record/custom-attributes/custom-attribute@xml:lang | A | C | 0 | 1 | locale | |||
/inventory/inventory-list/records/record/custom-attributes/custom-attribute/value | C | M | 0 | string |
Example
The following example shows a file in the DMDWR07XML format.
<?xml version="1.0" encoding="UTF-8"?>
<inventory xmlns="http://www.demandware.com/xml/impex/inventory/2007-05-31"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.demandware.com/xml/impex/inventory/2007-05-31">
<inventory-list>
<header list-id="inventory-nauna-kipus">
<default-instock>false</default-instock>
<description>Inventory For Client TMSNA Store TMSUS </description>
<use-bundle-inventory-only>false</use-bundle-inventory-only>
</header>
<records>
<record product-id="731405079994">
<allocation>93</allocation>
<allocation-timestamp>2013-04-05T17:35:06Z</allocation-timestamp>
</record>
<record product-id="883861042743">
<allocation>0</allocation>
<allocation-timestamp>2013-04-05T17:35:06Z</allocation-timestamp>
<preorder-backorder-handling>backorder</preorder-backorder-handling>
<preorder-backorder-allocation>10</preorder-backorder-allocation>
</record>
<record product-id="731405100667">
<allocation>1001</allocation>
<allocation-timestamp>2013-04-05T17:35:06Z</allocation-timestamp>
</record>
</records>
</inventory-list>
</inventory>
Channel Advisor Marketplaces Format (CAMPFLT_CA)
The CAMPFLT_CA format is a flat file that supports integration with Channel Advisor Marketplaces. Fields are separated by the pipe (|) character.
The CAMPFLT_CA file includes the following fields, in the order listed.
Field | Description | Format | Length |
---|---|---|---|
CatalogID | Identifier for the catalog | String | 12 |
ItemID | Unique ID used to order the item | String | 50 |
Quantity | Quantity on hand | Integer | 5 |
DailyMean30 | Mean daily sales from the last 30 days | Integer | 5 |
DailyMean5 | Mean daily sales from the last 5 days | Integer | 5 |
DaysOfSales30 | Number of days with sales in the last 30 | Integer | 5 |
MPDemand | Current demand for MP channel | Integer | 5 |
BurnRate | Demand over last four hours | Integer | 5 |
The following example shows one inventory record from a CAMPFLT_CA file:
18|18-000706043728|9999999|0|0|0|0|0