Reference > Shop flow URLs > Order Management subsystem URLs > Order fulfillment URLs


ExpectedInventorySynchronize URL

This command updates expected inventory records to synchronize with a backend system. It works by attempting to find the RADETAIL and RA records based on the primary key or unique index for each (see RA and RADETAIL table definitions). If a record can be found, it is updated with the values specified in the parameters. If a record cannot be found, the command attempts to create a new record using the values specified in the parameters. This command cannot be used to update or insert into the RA table only. It must be used to update both the RA and RADETAIL tables or only the RADETAIL table.

This command can be invoked programmatically or by using a URL. The parameters are formatted in an EC_XMLOBJECT. The syntax allows you to specify multiple RA and RADETAIL pairs.


URL structure

http:// host_name/path/

The fully qualified name of the WebSphere Commerce Server and the configuration path.

Diagram of the URL structure: The URL starts with the fully qualified name of the WebSphere Commerce Server and the configuration path, followed by the URL name, ExpectedInventorySynchronize , and the ? character. End the URL with a list of parameters in the form of name-value pairs. Separate each <a href=name-value pair with the & character. For a detailed description of the parameters and their values, see the list entitled Parameter values." />


Parameter values

radetailid

Specifies the ID of an RADETAIL to locate an existing record for update.

raid

Specifies the ID of an RA to locate an existing record for update.

createtime

Specifies the date when the record was created.

vendor

Specifies the vendor name that will be supplying the inventory.

ffmcenter

Specifies the fulfillment center ID. This parameter is required if you specify an RA ID and multiple fulfillment centers exist for that one ID.

originalexpecteddate

Used to locate an existing RADETAIL when updating an existing record.

partnumber

Specifies the part number of the inventory record; used with memberid to locate an itemspc_id.

externalid

Specifies an external identifier, typically supplied by the vendor.

openindicator

Specifies if expected inventory may still be received and allocated to backorders (Y), or if no further inventory will be received and expected inventory may not be allocated to backorders (N).

orderdate

Specifies the date that the order was created with the vendor.

dateclosed

Specifies the date that this record was closed.

radetailcomment

Specifies a comment.

qtyremaining

Specifies the quantity still expected from vendor for this expected inventory record. Typically, this quantity is equal to the quantity ordered minus the quantity received, but could be different if the vendor is unable to ship the total quantity. If this parameter is not specified when creating a new record, it defaults to 0.

qtyreceived

Specifies the quantity received to date from the vendor for this expected inventory record. If this parameter is not specified when creating a new record, it defaults to 0.

qtyordered

Specifies the quantity ordered from vendor in this expected inventory record. If this parameter is not specified when creating a new record, it defaults to 0.

deleteflag

Specifies whether to delete the corresponding RA. A value of "1" indicates that the matching RA and RADETAIL entries should be deleted.

expecteddate

Specifies the date that the inventory is now expected to arrive. This parameter is required if inserting records.

delimiter

Specifies the delimiter character; used for delimiting values when passing values to the stored procedure.

counter

Specifies the number of records passed to StoredProcedure. The maximum value is 10000. This parameter is required if passing XML.

memberid

Specifies the member ID used to get catentry information (itemspc_id). If this parameter is not passed in, the command tries to retrieve it from the command context. This parameter is required if the member ID is different from the store owner.


Output parameters

ExpRecsRejected

The number of records from the input that were rejected.

ExpRecsProcessed

The number of records from the input that were processed.

ExpRecsInserted

Of the number of records processed, the number of records that were inserted.

ExpRecsUpdated

Of the number of records processed, the number of records that were updated.

ExpRecsReturnCodes

A return code for each record that was included the input. A value of less than 0 indicates that the error was found before sending it for update or add. Other values are possible; for a list of the other return codes that can result from an update or add, see Stored Procedure error codes.

ExpRecsWarnMsgs

Error message information.

getRejectedRecords()

The number of records rejected because of missing store IDs, expecteddate, vendor, partnumber, missing vendors in vendor table, and partnumbers without itemspec.

getProcessedRecords()

The number of successfully processed records.

getExpectedRecordInserted()

The number of records inserted into the RADETAIL table.

getExpectedRecordUpdated()

The number of records updated in the RADETAIL table.

getCommandStatus()

Specifies whether the command was successful or if it failed.

getWarningMessages()

Lists warning messages for all the records that are rejected in Vector.


Required variables

The following variables must be set. If they are not available in instance XML, the commit is performed after processing all the records passed to the stored procedure.

Since the new command is running on the servlet thread, performance can be affected, depending on the number of updates.

To alleviate this problem, you can use the ExpRecCounter and ExpCommitFlag instance parameters to release the table locks.

ExpRecCounter

Controls the number of records processed before a commit occurs.

ExpCommitFlag

Controls whether the stored procedure performs a commit after the number of updates specified.


Example

http://myhostname/webapp/wcs/stores/servlet/ExpectedInventorySynchronize? <XML> <delimiter>|</delimiter> <counter>100</counter> <synchronizeraitem> <vendor>Store 201 Vendor</vendor> <createtime>2004-01-01-00:00:00.0</createtime> <externalid>VPN1234 567 G</externalid> <orderdate>2004-01-01-00:00:00.0</orderdate> <openindicator>Y</openindicator> <dateclosed></dateclosed> <expecteddate>2004-02-12-00:00:00.0</expecteddate> <originalexpecteddate>2004-01-29-00:00:00.0</originalexpecteddate> <ffmcenter>300</ffmcenter> <partnumber>420X101</partnumber> <qtyordered>50</qtyordered> <qtyreceived>20</qtyreceived> <qtyremaining>28</qtyremaining> <deleteflag>0</deleteflag> <radetailComment>Comment for item 4</radetailComment> </synchronizeraitem> <synchronizeraitem> <radetailid>105670</radetailid> <dateclosed>2004-01-01-00:00:00.0</dateclosed> <qtyremaining>0</qtyremaining> </synchronizeraitem> </XML>


Behavior


Exception conditions


Related concepts

Order Management subsystem


Related tasks

Run the ExpectedInventorySynchronize command

Related reference

Order Management subsystem URLs


+

Search Tips   |   Advanced Search