GiftRegistryOrderProcess action
This command processes an order containing gift registry items, creates a purchase record for each item, and updates the quantity purchased in the gift registry list.
URL structure
- http://host_name/path/
- The fully qualified name of your WebSphere Commerce Server and the configuration path (for example, wcserver.mydomain.ibm.com is fully qualified).
Parameter values
- orderId
- Required: Specifies the reference number of the order to be processed. This parameter can be repeated. Based on this orderId, the action will retrieve the order items for the order. For each order item associated with a gift registry, the system retrieves the externalId of the gift registry from the ORDERITEMGIFT table.
- firstName_i
- The first name of the gift registrant. If there is a co-registrant, then specify firstName_2 for the co-registrant's information.
- middleName_i
- The middle name of the gift registrant, if applicable. If there is a co-registrant, then specify middleName_2 for the co-registrant's information.
- lastName_i
- The last name of the gift registrant. If there is a co-registrant, then specify lastName_2 for the co-registrant's information.
- personTitle_i
- A prefix to the gift registrant's name (for example, Mr. Ms, or Dr.). If there is a co-registrant, then specify personTitle_2 for the co-registrant's information.
- suffix_i
- A suffix to the gift registrant's name (for example, Senior or Junior). If there is a co-registrant, then specify suffix_2 for the co-registrant's information.
- address1_i
- The first line of the gift registrant's contact address. If there is a co-registrant, then specify address1_2 for the co-registrant's information.
- address2_i
- The second line of the gift registrant's contact address. If there is a co-registrant, then specify address2_2 for the co-registrant's information.
- address3_i
- The third line of the gift registrant's contact address. If there is a co-registrant, then specify address3_2 for the co-registrant's information.
- city_i
- The name of the city within the gift registrant's contact address. If there is a co-registrant, then specify city_2 for the co-registrant's information.
- state_i
- The name of the state, province, or equivalent within the gift registrant's contact address. If there is a co-registrant, then specify state_2 for the co-registrant's information.
- country_i
- The name of the country or region within the gift registrant's contact address. If there is a co-registrant, then specify country_2 for the co-registrant's information.
- zipCode_i
- The ZIP or postal code within the gift registrant's contact address. If there is a co-registrant, then specify zipCode_2 for the co-registrant's information.
- email1_i
- The gift registrant's primary e-mail or Web address. If there is a co-registrant, then specify email1_2 for the co-registrant's information.
- email2_i
- The gift registrant's secondary e-mail or Web address. If there is a co-registrant, then specify email2_2 for the co-registrant's information.
- phone1_i
- The gift registrant's primary phone number. If there is a co-registrant, then specify phone1_2 for the co-registrant's information.
- phone2_i
- The gift registrant's secondary phone number. If there is a co-registrant, then specify phone2_2 for the co-registrant's information.
- phone3_i
- The gift registrant's third phone number. If there is a co-registrant, then specify phone3_2 for the co-registrant's information.
- fax_i
- The gift registrant's fax number. If there is a co-registrant, then specify fax_2 for the co-registrant's information.
- parameters from OrderProcess
- The GiftRegistryOrderProcess action is an extension of the OrderProcess command. Thus, all other parameters in this action are the same as those in OrderProcess. Refer to the parameter values for OrderProcess for details.
Example
The following example processes order number 12345 for purchases that gift giver Christine Baker has submitted. The gift registry is for a store with the ID of 10001.
http://myhost_name/webapp/wcs/stores/servlet/GiftRegistryOrderProcess?
orderId=12345
Behavior
- Extends the WebSphere Commerce OrderProcess command, and processes orders for gift registry purchases.
- Retrieves the externalId of the gift registry from the ORDERITEMGIFT WebSphere Commerce database table by first executing OrderProcess. If OrderProcess is executed successfully, then, for each order item associated with a gift registry, the action retrieves the externalId of the gift registry from ORDERITEMGIFT table.
- Retrieves the
first name and the last name of the billing address
as the gift giver name. The logic to retrieve the first name and last
name is as follows:
- GiftRegistryOrderProcess accepts all the address parameters that GiftRegistryPurchaseRecordUpdate or GiftRegistryRPurchaseRecordUpdateAdd support (that is, lastName_i, firstName_i, middleName_i, personTitle_i, suffix_i, address1_i, address2_i, address3_i, city_i, state_i, country_i, zipCode_i, email1_i, email2_i, phone1_i, phone2_i, phone3_i, and fax_i).
- Executes
logic from retrieving the last name or first name (and
other address information):
- If lastName_i, firstName_i, and other address parameters are passed in, use it.
- If the customer is a registered with the store, use the self address of the registered customer
- Use the billing address obtained during order checkout and payment.
- Invokes the GiftRegistryPurchaseRecordAdd action to create a purchase record for the gift registry. The GiftRegistryPurchaseRecordAdd action captures the quantity purchased and reflects this in the gift registry list.
Exception conditions
- Refer to the exception conditions described for OrderProcess.