E-Commerce Item Availability Processing

Purpose: Your options in sending item availability information to the web storefront include:

• the E-Commerce Availability Web API.

• the Item Availability API.

• the Generic Inventory Download API.

Selecting an item availability processing method: The available options and some considerations for each are described below.

Option

Considerations

More Information

Item Availability API

• requests a full download of inventory availability for a specific company, item, or group of items.

• generates the Item Availability Response XML Message (CWItemAvailabilityResponseWeb) and sends it to the web storefront, where the availability information is presented to the customer.

• requires a mechanism on the web storefront to process the XML message in order to update inventory information.

Item Availability API

E-Commerce Item Availability Web API

• requests a full download of inventory availability for a specific company, and optionally, offer.

• generates the E-Commerce Availability Web Response and stores the contents of the response in an output file on the application server.

• requires a mechanism on the web storefront to process the XML message in order to update inventory information.

E-Commerce Availability Web API

generic inventory download API

• generates an XML message based on triggers created through a batch process using business rules, or interactively based on activity that affects current or projected availability.

• provides extensive options in setting up trigger rules based on information about the items.

• includes rules for excluding non-allocatable or frozen item warehouses.

• includes more extensive data elements in addition to availability information.

• requires a mechanism on the web storefront to process the XML message in order to update inventory information.

• requires processing time to generate and transmit XML messages.

Generic Inventory Download API

In this chapter:

E-Commerce Availability Web API

- E-Commerce Availability Web API Process

- E-Commerce Item Availability Web API: Sample Messages

- E-Commerce Availability Web Request XML Message (AvailabilityWebRequest)

- E-Commerce Availability Web Response XML Message (AvailabilityWebResponse)

- E-Commerce Availability Web XML File (AvailabilityWeb)

E-Commerce Availability Web API

Purpose: Use the E-Commerce Availability Web API to inquire into the availability of items in a specific company, and optionally, offer.

You have the option to review item availability for each allocatable warehouse or to sum the item availability for an item across all allocatable warehouses.

E-Commerce Availability Web API Setup

The CWServiceIn Web Service allows an external system to post the E-Commerce Availability Web Request XML Message (AvailabilityWebRequest) directly to Order Management System and receive a response without the need of any queues.

Web service authentication? Use the Working with Web Service Authentication (WWSA) menu option to define a valid user for basic web service authentication. If you use Oracle Identity Cloud Service for password authentication, in addition to creating the web service authentication user in Work with Web Service Authentication (WWSA), you must also create a corresponding user profile in Oracle Identity Cloud Service and assign the user to the corresponding web service role defined for the Order Management application.

Web service type? You can use the CWServiceIn web service as a SOAP-based web service or a RESTful web service.

Setup for the CWServiceIn SOAP-Based Web Service

The CWServiceIn web service’s .wsdl (Web Service Definition Language) file, which is located on your application server, controls the function of the CWServiceIn web service. You send the E-Commerce Availability Web Request XML Message (AvailabilityWebRequest) to the URL, or endpoint, specified in this wsdl. The CWServiceIn web service routes the messages sent to the endpoint and dispatches them to the Item Availability Web process. When the Item Availability Web process generates an E-Commerce Availability Web Response XML Message (AvailabilityWebResponse), the CWServiceIn web service routes the response.

SOAP envelope and message type: You need to embed each inbound message in the SOAP (Simple Object Access Protocol) message tags in order for the CWServiceIn web service to receive and process it correctly. Also, the type attribute in the inbound message identifies the Order Management System process so the CWServiceIn web service can route the message appropriately. The correct type for the E-Commerce Availability Web Request XML Message (AvailabilityWebRequest) is AvailabilityWebRequest.

Determine the endpoint: The endpoint is typically set to http://server:port/CWDirectCPService/services/CWServiceIn, where server:port identifies the application server where the wsdl is located and CWServiceIn is the name of the web service to call.

Sample Inbound Message in SOAP Envelope

The CWServiceIn web service requires that the inbound messages be embedded in SOAP envelope tags. A sample E-Commerce Availability Web Request XML Message (AvailabilityWebRequest) embedded in a SOAP envelope is presented below.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dom="http://dom.w3c.org">

<soapenv:Header />

<soapenv:Body>

<dom:performAction type="xsd:string">

<![CDATA[

 

<Message source="web" target="OMSCS" type="AvailabilityWebRequest">

<AvailabilityWeb company="7" sum_availability="Y" offer="WEB">

</AvailabilityWeb>

</Message>

 

]]>

</dom:performAction>

</soapenv:Body>

</soapenv:Envelope>

Setup for the CWServiceIn RESTful Web Service

You POST the E-Commerce Availability Web Request XML Message (AvailabilityWebRequest) to the web service’s URL, or endpoint, of the RESTful service. The web service routes the messages sent to the endpoint and dispatches them to the Item Availability Web process. When the Item Availability Web process generates an E-Commerce Availability Web Response XML Message (AvailabilityWebResponse), the CWServiceIn web service routes the response.

Message type: The type attribute in the inbound message identifies the Order Management System process, so the CWServiceIn web service can route the message appropriately. The correct type for the E-Commerce Availability Web Request XML Message (AvailabilityWebRequest) is AvailabilityWebRequest.

Determine the endpoint: The individual URL for the CWServiceIn RESTful service uses the following format: http://server:port/SerenadeSeam/sxrs/application/CWServiceIn, where server:port identifies the application server where the RESTful service is located and CWServiceIn is the name of the web service to call.

Sample Inbound Message using RESTful Web Service

The CWServiceIn RESTful web service does not require that inbound messages be embedded in SOAP envelope tags. A sample E-Commerce Availability Web Request XML Message (AvailabilityWebRequest) when using a RESTful web service is presented below.

<Message source="web" target="OMSCS" type="AvailabilityWebRequest">

<AvailabilityWeb company="7" sum_availability="Y" offer="WEB">

</AvailabilityWeb>

</Message>

E-Commerce Availability Web API Process

A typical e-commerce item availability flow might be:

1. The web storefront inquires into the availability of the items in a particular company and offer by generating an E-Commerce Availability Web Request XML Message (AvailabilityWebRequest) to Order Management System using the CWServiceIn Web Service.

2. The Item Availability Web process in Order Management System receives the request, generates the E-Commerce Availability Web Response XML Message (AvailabilityWebResponse), and sends it to the web storefront. This message indicates to the web storefront whether the request processed successfully.

- If the request is successful, the response returns with a message of Successful.

- If the request fails, the response returns with an error message. See E-Commerce Availability Web Service Errors for a list of errors that may occur.

3. The Item Availability Web process includes the details of the item availability web request in an E-Commerce Availability Web XML File (AvailabilityWeb) located on the application server.

Application log: The system writes any messages related to the e-commerce item availability request to the Application Log.

E-Commerce Availability Web Service Errors

If the E-Commerce Availability Web Request XML Message (AvailabilityWebRequest) fails, the response returns with an error message. Possible errors are:

Error Message

Reason

Invalid company code

The company code is missing or invalid.

Invalid offer

The offer is invalid.

Provided path under ECOMMERCE_DIRECTORY_PATH property is not valid

The ECOMMERCE_DIRECTORY_PATH is missing or invalid.

Message is invalid

The AvailabilityWeb element is missing.

E-Commerce Item Availability Web API: Sample Messages

Successful E-Commerce Item Availability Web Request

Unsuccessful E-Commerce Item Availability Web Request

Successful E-Commerce Item Availability Web Request

E-Commerce Item Availability Web Request: Sample XML

A sample of the E-Commerce Item Availability Web Request is presented below.

<Message source="web" target="OMSCS" type="AvailabilityWebRequest">

<AvailabilityWeb company="7" sum_availability="N" offer="OFR">

</AvailabilityWeb>

</Message>

E-Commerce Item Availability Web Response: Sample XML

A sample of the E-Commerce Item Availability Web Response is presented below.

<Message source="WEB" target="OMSCS" type="AvailabilityWebRequestResponse">

<AvailabilityWebRequestResponse company="7" company_description="KAB Company" message="Successful"></AvailabilityWebRequestResponse>

</Message>

E-Commerce AvailabilityWeb XML File

A sample of the E-Commerce AvailabilityWeb XML file is presented below.

<Header Offer="OFR" CompanyCode="7">

<Items>

<Item Set="N" DropShip="N" SVCType="" ItemStatus="1" NonInventory="N" Description="ITEM DESCRIPTION" ItemNumber="ITEM">

<SKUs>

<SKU SKUStatus="" SoldOutCode="" SKUDescription="" SKUCode="" ShortSKU="115">

<Warehouses>

<Warehouse NextExpectedQty="100" NextPODate="12072015" AvailableQty="994" OnOrderQty="100" WarehouseName="MAIN WAREHOUSE" Warehouse="1"/>

</Warehouses>

</SKU>

</SKUs>

</Item>

<Item Set="Y" DropShip="N" SVCType="" ItemStatus="" NonInventory="N" Description="SET ITEM" ItemNumber="SET">

<SKUs>

<SKU SKUStatus="" SoldOutCode="" SKUDescription="" SKUCode="" ShortSKU="7">

<Warehouses>

<Warehouse NextExpectedQty="70" NextPODate="12072015" AvailableQty="0" OnOrderQty="70" WarehouseName="MAIN WAREHOUSE" Warehouse="1"/>

</Warehouses>

</SKU>

</SKUs>

</Item>

<Item Set="N" DropShip="N" SVCType="" ItemStatus="1" NonInventory="N" Description="SKU ITEM DESCRIPTION" ItemNumber="SKU">

<SKUs>

<SKU SKUStatus="" SoldOutCode="" SKUDescription="RED SKU" SKUCode="RED" ShortSKU="5">

<Warehouses>

<Warehouse NextExpectedQty="123" NextPODate="12072015" AvailableQty="-2" OnOrderQty="125" WarehouseName="MAIN WAREHOUSE" Warehouse="1"/>

</Warehouses>

</SKU>

<SKU SKUStatus="" SoldOutCode="" SKUDescription="BLUE SML WMNS SKU DESCRIPTION" SKUCode="BLUE SML WMNS" ShortSKU="118">

<Warehouses>

<Warehouse NextExpectedQty="75" NextPODate="12072015" AvailableQty="1000" OnOrderQty="125" WarehouseName="MAIN WAREHOUSE" Warehouse="1"/>

</Warehouses>

</SKU>

<SKU SKUStatus="" SoldOutCode="" SKUDescription="GRN SML WMSN SKU DESCRIPTION" SKUCode="GRN SML WMNS" ShortSKU="119">

<Warehouses>

<Warehouse NextExpectedQty="100" NextPODate="12072015" AvailableQty="1000" OnOrderQty="100" WarehouseName="MAIN WAREHOUSE" Warehouse="1"/>

</Warehouses>

</SKU>

<SKU SKUStatus="" SoldOutCode="" SKUDescription="RED SML WMNS SKU DESCRIPTION" SKUCode="RED SML WMNS" ShortSKU="117">

<Warehouses>

<Warehouse NextExpectedQty="0" NextPODate="" AvailableQty="998" OnOrderQty="0" WarehouseName="MAIN WAREHOUSE" Warehouse="1"/>

</Warehouses>

</SKU>

<SKU SKUStatus="" SoldOutCode="" SKUDescription="YELW SML WMNS SKU DESCRIPTION" SKUCode="YELW SML WMNS" ShortSKU="120">

<Warehouses>

<Warehouse NextExpectedQty="200" NextPODate="12072015" AvailableQty="1000" OnOrderQty="200" WarehouseName="MAIN WAREHOUSE" Warehouse="1"/>

</Warehouses>

</SKU>

</SKUs>

</Item>

</Items>

</Header>

Unsuccessful E-Commerce Item Availability Web Request

E-Commerce Item Availability Web Request: Sample XML

A sample of the E-Commerce Item Availability Web Request is presented below.

<Message source="web" target="OMSCS" type="AvailabilityWebRequest">

<AvailabilityWeb company="7" sum_availability="N" offer="WEB">

</AvailabilityWeb>

</Message>

E-Commerce Item Availability Web Response: Sample XML

A sample of the E-Commerce Item Availability Web Response is presented below.

<Message source="WEB" target="OMSCS" type="AvailabilityWebRequestResponse">

<AvailabilityWebRequestResponse company="7" company_description="KAB Company" message="Invalid offer"></AvailabilityWebRequestResponse>

</Message>

E-Commerce Availability Web Request XML Message (AvailabilityWebRequest)

 

For more information: See:

E-Commerce Availability Web API for an overview.

E-Commerce Availability Web API Setup for information on the required setup.

E-Commerce Availability Web API Process for processing details.

E-Commerce Item Availability Web API: Sample Messages for a sample message.

Attribute Name

Type

Length

Comments

Message

source

alpha

25

Identifies the source of the XML message. Informational only.

target

alpha

25

Identifies the target of the XML message. Informational only.

type

alpha

25

Identifies the type of information in the XML message. Must be set to AvailabilityWebRequest.

AvailabilityWeb

company

numeric

3

Required. Indicates the company associated with the item/SKU. Validated against the Company table; see Setting Up Companies (WCMP).

sum_availability

alpha

1

Defines whether the AvailabilityWeb XML file sums the item availability information for an item across all allocatable warehouses.

Y = the response sums the item availability information for an item across all allocatable warehouses.

N (default) = The response provides item availability information for an item for each allocatable warehouse.

offer

alpha

3

A code for the offer whose item availability information you wish to include in the AvailabilityWeb XML file.

Leave this field blank to include item availability regardless of offer.

Offer codes are defined in and validated against the Offer table.

E-Commerce Availability Web Response XML Message (AvailabilityWebResponse)

 

The Item Availability Web process generates an XML response to the E-Commerce Availability Web Request XML Message (AvailabilityWebRequest).

Attribute Name

Type

Length

Comments

Message

source

alpha

25

Identifies the source of the XML message. Informational only.

target

alpha

25

Identifies the target of the XML message. Informational only.

type

alpha

25

Identifies the type of information in the XML message. Set to AvailabilityWebRequestResponse.

AvailabilityWebRequestResponse

company

numeric

3

The company defined in the E-Commerce Availability Web Request XML Message (AvailabilityWebRequest).

company_description

alpha

40

A description of the company.

message

alpha

50

Indicates whether the e-commerce item availability web request processed successfully.

• If the request is successful, the response returns with a message of Successful.

• If the request fails, the response returns with an error message. See E-Commerce Availability Web Service Errors for a list of errors that may occur.

E-Commerce Availability Web XML File (AvailabilityWeb)

The Item Availability Web process generates an AvailabilityWeb XML file if the E-Commerce Availability Web Request XML Message (AvailabilityWebRequest) processes successfully.

Location of file: The ECOMMERCE_DIRECTORY_PATH in Working with Cloud Properties (CPRP) defines the location on the application server where the system creates the AvailabilityWeb XML file. An example of the directory is /domain/conf/OMSFiles/WebData/, where domain is the WebLogic domain directory for Order Management System. Note: If an ECOMMERCE_DIRECTORY_PATH is not valid or is blank, or the specified folder does not exist, the system returns the E-Commerce Availability Web Response XML Message (AvailabilityWebResponse) with an error message and writes the error message to the Application log.

Name of file: The name of the file is AvailabilityWeb_999_YYMMDDHHMMSS.xml, where 999 is the company code associated with the item availability information and YYMMDDHHMMSS is the date and time when the file was created.

XML version: The ECOMMERCE_AVAILABILITY_XML_VERSION in Working with Customer Properties (PROP) defines the XML version of the AvailabilityWebRequest XML message.

Note: The system includes all tags in the message, even if the tag is blank.

Attribute Name

Type

Length

Comments

Header

CompanyCode

numeric

3

The company code from the E-Commerce Availability Web Request XML Message (AvailabilityWebRequest).

Offer

alpha

3

The offer code from the E-Commerce Availability Web Request XML Message (AvailabilityWebRequest).

Item

One or more items is included in the message.

If an offer was included in the request, this message includes only items/SKUs assigned to the offer.

ItemNumber

alpha

12

The item code, as set up through Performing Initial Item Entry (MITM).

From ITM Number in the Item Warehouse table.

Description

alpha

40

The description of the item.

From Description in the Item table.

NonInventory

alpha

1

Indicates whether inventory levels are maintained for the item. Valid values are:

Y = This is a non-inventory item.

N = This is a regular item that will be tracked.

From Non-inventory in the Item table.

ItemStatus

alpha

1

The item’s Status, if any. An optional code that represents an item's status, such as obsolete, discontinued, etc. Item statuses are defined in Work with Item Status (WIST).

From Item Status in the Item table.

SVCType

alpha

1

Indicates the type of stored value card that the item is, if it is a stored value card. Valid values are:

blank = Not a stored value card.

P = Physical card

E = Physical card/early notification

V = Virtual card

From SVC Type in the Item table.

DropShip

alpha

1

Indicates whether you ship the item from your warehouse, or have your vendor ship it to the customer directly. Valid values are:

Y = When a customer orders the item, you order the item from your vendor and the vendor ships it directly to your customer. However, it is still possible to ship the item from the warehouse if it is available there.

N = You ship the item from your warehouse.

If there is a record of an item in a warehouse, this information is still provided in the response message regardless of the setting of this flag.

From Drop ship item in the Item table.

Set

alpha

1

Indicates whether the item is a set item.

Y = the item is a set item (the Kit type for the item is Set).

N = the item is not a set item.

From Kit type in the Item table.

SKU

The message includes all SKUs defined for an item, regardless of whether the SKU is assigned to the offer.

ShortSKU

numeric

7

The item or SKU’s Short SKU code. This is a system-assigned code to uniquely identify each item/SKU.

From Short SKU in the SKU table.

SKUCode

alpha

14

The item’s unique characteristics; included if this is a SKUed item. The system separates each SKU code with a single space, for example: RED SML WMNS.

From SKU Code in the SKU table.

SKUDescription

alpha

40

The SKU’s description, if any.

From Description in the SKU table.

SoldOutCode

alpha

2

The SKU’s soldout control setting, if any. Soldout codes are defined in Work with Soldout Controls (WSLD).

From SLC Code in the SKU table.

SKUStatus

alpha

1

The SKU’s status code, if any. Can be different from the item’s status. SKU status codes are defined in Work with Item Status (WIST).

From Item Status in the SKU table.

Warehouse

The message includes:

• all SKUs for an item, regardless of whether they are assigned to the offer.

• only allocatable warehouses assigned to the item/SKU, even if there is no available quantity, on order quantity, or next expected quantity or PO date so that the web storefront can see item warehouses with no item availability.

You can review item warehouse information through Work with Warehouses (WWHS) and through Inventory Inquiry (DINI). You can review item availability information through Display Item Availability (DIAV).

Warehouse

numeric

3

A code identifying an allocatable warehouse assigned to the item/SKU.

From Warehouse in the Item Warehouse table.

ALL displays if the sum_availability attribute was set to Y in the E-Commerce Availability Web Request XML Message (AvailabilityWebRequest).

WarehouseName

alpha

30

The name of the warehouse.

From Warehouse name in the Warehouse table.

ALL displays if the sum_availability attribute in the E-Commerce Availability Web Request XML Message (AvailabilityWebRequest) was set to Y.

OnOrderQty

numeric

7

The total quantity of the item that is due to be received through purchase orders.

If available, the system includes an on order quantity for inventory and non-inventory items, including items that are flagged to sell out immediately, virtual stored value card items, membership items, subscription items, and items on allocation freeze.

Sum Availability = N

If the sum_availability attribute in the E-Commerce Availability Web Request XML Message (AvailabilityWebRequest) was set to N, this is the on order quantity, if any, for the item warehouse.

Sum Availability = Y

If the sum_availability attribute in the E-Commerce Availability Web Request XML Message (AvailabilityWebRequest) was set to Y, this is the on order quantity across all allocatable item warehouses.

Set master items and continuity items: This is the on order quantity for the component with the lowest available quantity, even if this quantity is 0.

From On order qty in the Item Warehouse table.

AvailableQty

numeric

7

The quantity available for the item.

If available, the system calculates the available quantity for inventory and non-inventory items, including items that are flagged to sell out immediately, virtual stored value card items, membership items, subscription items, and items on allocation freeze.

Calculated by the system as follows:

On hand - Protected - Reserved - Reserve Transfer - Backordered = Quantity available

Sum Availability = N

If the sum_availability attribute in the E-Commerce Availability Web Request XML Message (AvailabilityWebRequest) was set to N, this is the available quantity, if any, for the item warehouse.

Sum Availability = Y

If the sum_availability attribute in the E-Commerce Availability Web Request XML Message (AvailabilityWebRequest) was set to Y, this is the available quantity across all allocatable item warehouses.

Set master items and continuity items: This is the available quantity for the component with the lowest available quantity, divided by the quantity required for the set. For example, if the available quantity is 532, but the set requires 2 of the component item, the available quantity returned is 266 (532/2 = 266).

Drop ship items: If the item is flagged for drop ship, the available quantity indicated is 9999, regardless of whether there is any quantity of the item actually on-hand in the warehouse.

NextPODate

numeric

8

The date when the next purchase order for the item is expected, based on purchase order layering. MMDDYYYY format.

If available, the system includes a next PO date for inventory and non-inventory items, including items that are flagged to sell out immediately, virtual stored value card items, membership items, subscription items, and items on allocation freeze.

Sum Availability = N

If the sum_availability attribute in the E-Commerce Availability Web Request XML Message (AvailabilityWebRequest) was set to N, this is the due date from the first PO Layering record for the item warehouse.

See Purchase Order Layering and Backorder Notifications for more information on purchase order layering.

Sum Availability = Y

If the sum_availability attribute in the E-Commerce Availability Web Request XML Message (AvailabilityWebRequest) was set to Y, this is the due date from the first PO Layering record across all allocatable item warehouses.

Drop ship item: This date is included for drop ship items only if the Assign Drop Ship Expected Ship Date (I59) system control value is selected.

From Due date in the PO Layering table.

NextExpectedQty

numeric

7

The number of units of this item ordered on a purchase order that will be available for new orders.

If available, the system includes a next expected quantity for inventory and non-inventory items, including items that are flagged to sell out immediately, virtual stored value card items, membership items, subscription items, and items on allocation freeze.

This is the open quantity associated with the next_po_date.

From Open qty in the PO Layering table.

SO10_09 OMS 17.1 September 2018 OTN