OrderProcess URL

This URL submits an order. The order must have been locked by OrderPrepare. Once the OrderProcess URL begins running, the order cannot be cancelled with OrderCancel.

URL structure

http://host_name/path/
The fully qualified name of your WebSphere Commerce Server and the configuration path.

proproce.gif (7483 bytes)

Parameter values

forUser
The logon ID of the user on whose behalf the command will be run; only a person with the authority to process orders can specify this parameter.
forUserId
Same as forUser, but identifying the user by the internal user ID, as found in the USERS table.
langId
Sets or resets the preferred language for the duration of the session; the supported languages for a store are found in the STORELANG table.
storeId
The reference number of the store with which the order is to be placed. This value is ignored unless an error occurs before the order is resolved. It is used only to call the correct store's exception handler.
orderId
(Required) The reference number of the order to be processed. This parameter can be repeated.
externalUserId
Specifies a user ID to be sent with the order transfer request.
externalPassword
Specifies a password for the user ID specified by the externalUserId parameter.
transferMode
Specifies the mode of transfer to an external system. A value of 0 transfers the order without payment information (shopping-cart transfer). A value of 1 transfers the order with payment information (purchase-order transfer). The default value of this parameter is 0.
billtoAddressId
The reference number of the address to bill.
field1, field2, and field3
Customizable fields.
notify_[msgtype]_transportname_attributename
Specifies configuration attributes applicable to order notification for a given message type and message transport. Message type is optional. If it is not specified, the configuration attribute is applicable to all message types.

For example:

  • Send the "order received" e-mail notification for orders processed by this command to 2 e-mail addresses, john@ibm.com and victor@ibm.com:
  • notify_OrderReceived_EMailSender_recipient=john@ibm.com,victor@ibm.com
    
    where OrderReceived is from MSGTYPES.NAME and EMailSender is from TRANSPORT.NAME.
  • Send all types of order e-mail notifications to jack@ibm.com:
    notify_EMailSender_recipient=jack@ibm.com
    
    where EMailSender is from TRANSPORT.NAME.
notifyMerchant
Whether the store is notified when the order processing is complete. E-mail notifications are only sent when WebSphere Commerce is configured with WebSphere Commerce Payments.
1=Yes
0=No
notifyShopper
Whether the customer is notified when the order processing is complete. E-mail notifications are only sent when WebSphere Commerce is configured with WebSphere Commerce Payments.
1=Yes
0=No
quoteExpiryPolicy
Defines the behavior of the command if the order total expires or an order item's fulfillment center changes during inventory allocation. Order total expires if the current time is greater than or equal to the order last update timestamp plus the number of seconds specified in the QUOTEGOODFOR column of the STORE table. This parameter may have three values:
alwaysProceed
Always proceed with processing the order after recalculating order total.
stopOnBiggerTotal
Proceed with processing the order if the recalculated order total is unchanged or less than the previous order total. Otherwise, redirect to a URL specified by the quoteExpiredUrl.
neverProceed
Always redirect to the URL specified by the quoteExpiredUrl parameter.
quoteExpiredURL
Specifies the URL to redirect to if the order total expired in agreement with the expiry policy specified by the quoteExpiryPolicy parameter.
notifyOrderSubmitted
Specifies whether the customer is notified when the order is successfully submitted for processing. 1=Yes 0=No (default)
availabilityChangeURL
Specifies the URL to redirect to when the estimated availability time plus the shipping offset for any order item moves into the future (as a result of allocating or backordering inventory) by more than the time interval specified by the maxAvailabilityChange parameter. This parameter is ignored if ATP inventory allocation is not enabled.
maxAvailabilityChange
Specifies the time interval, in seconds, mentioned in the availabilityChangeURL parameter description. The default value is 3600 (one hour). This parameter is ignored if the availabilityChangeURL parameter is not specified, or if ATP inventory allocation is not enabled.
noInventoryURL
Specifies the URL to redirect to if any of the order items in the order cannot be allocated or backordered. This parameter is ignored if ATP inventory allocation is not enabled.
tcId
The identifier of a Terms and Conditions object (refer to the TERMCOND table). If this is specified, and if it identifies a PaymentTC, and if that PaymentTC specifies a memberId and an address nickName (refer to the PaymentTC mapping), then the memberId and address nickName are used to determine the billing address, in which case the billToAddressId parameter is ignored.

Notes about payments: The OrderProcess command does not itself handle payments. To handle payments, use the DoPaymentCmd interface class, which DoPayment task commands would implement. The parameters that are passed from OrderProcess to this command can be anything, although they would typically implement credit card information.

WebSphere Commerce includes two implementation classes of the OH task command, the DoPaymentCmdImpl class and the DoPaymentMPFCmdImpl class. The DoPaymentCmdImpl class is a sample implementation used to show how one could write a DoPayment task command implementation that works with the OrderProcess command. The DoPaymentMPFCmdImpl class is the standard DoPaymentCmd implementation class designed for use with the IBM WebSphere Payment Manager, Version 3.1 and includes support for the Business-to-Business functions introduced with this release of WebSphere Commerce Business Edition.

Notes about order notification:
If you need to configure order notification, you will need to do the following:

  1. Enable outbound messaging.
  2. Create message composition templates for composing order notification messages.
quotationSubmission
Controls whether the relType attribute values for "selection" OrderQuotationRel objects that identify the order being processed with their childId attribute should be changed to "submission". A value of 0 does not change the relType attributes of the OrderQuotationRel objects in the list to indicate "submission"; a value of 1 changes the relType attributes of the OrderQuotationRel objects in the list to indicate "submission". The default value is 0.
reduceParentQuantities
Controls whether quantities of order items in the selection parent order are reduced by the quantities of order items in the order being processed. A value of 0 does not reduce parent quantities; a value of 1 reduces parent quantities. The default value is 0.

In any case, the parent order is only updated when it has a status attribute 'P' or 'E'; and only those order items that have the same CatalogEntryId, SpecifiedItemId, and correlationGroup attribute values as the order items in the order being processed are updated.

Example 1

The following command processes the placing of an order whose reference number is 3.

    http://myhostname/webapp/wcs/stores/servlet/OrderProcess?orderId=3

Example 2

Assuming that Payment Manager has been already set up, this command passes the customer's payment information to Payment Manager. The parameter policyId=200 refers to the OfflineCard method which the store model uses by default for Payment Manager.

    http://myhostname/webapp/wcs/stores/servlet/OrderProcess?storeId=34
    &orderId=556677&policy=200&cardBrand=Visa
    &cardNumber=41111111111111111&cardExpiryMonth=12&cardExpiryYear=2001 

Note: The payMethodId parameter is supported for backward compatibility only. For new Payment Manager Cassettes and new Business-to-Business functions, use the policyId parameter instead (as in Example 2). You can read more about defined payment policies in the online help.

The DoPaymentMPFCmdImpl class supports an additional parameter called tcId, which is used for specifying the ID of the payment terms and conditions to be used for an order. The terms and conditions must be one of the common payment terms and conditions specified in the contracts associated with the ordered items. To assist in selecting a common payment terms and conditions JSP file, use the UsablePaymentTCListDataBean. The tcId parameter is mandatory if any of the contracts used for the OrderItems has a payment terms and conditions associated with it.

Behavior

Exception conditions

Related concepts

Related reference