Samples > Sample stores > Consumer direct sample store > IBM Gift Center for the Consumer direct sample store > IBM Gift Center > Customize the Web (presentation) layer > IBM Gift Center actions
GiftRegistryPurchaseRecordUpdate action
This action updates an existing purchase record for items bought from a gift registry. Use this action with SSL to ensure that all personal information is encrypted.
To do so, type the action with the HTTPS secure protocol.
URL structure
name-value pair with the & character. For a detailed description of the parameters and their values, see the list entitled Parameter values." />
- http://host/path/
- The fully qualified name of the WebSphere Commerce Server and the configuration path (for example, wcserver.mydomain.ibm.com is fully qualified).
Parameter values
For all parameters, if there is a co-registrant, then specify <parameter>_2 for the co-registrant's information. For example, for the first_name_i parameter, if there is a co-registrant, then specify firstName_2 for the co-registrant's information.
- URL
- Required: The URL to be called when the action completes successfully.
- purchaseRecordId
- Required: The unique identifier for the gift purchase record.
- storeId
- Required: The store reference number, which is required to help identify to which stores a gift registry belongs.
- orderItemId
- The unique identifier of an item within the order for a purchased gift registry item.
- errorViewName
- Overrides the error view when an error occurs.
- giftItemId_i
- A unique identifier for the item to be purchased from the gift registry.
- quantity_i
- The quantity of this item, specified by the gift registrant. Note that this is the total quantity, not the additional quantity. The default is 1. If you specify a value of zero, then the action removes this purchase record from the database.
- transactionId_i
- The transaction identifier generated by gift registry channels other than the Web (for example, transactions from in-store kiosks or call centers).
- registrantMemo_i
- The brief note or memo provided by the gift registrant, regarding the purchase order.
- purchaseDate_i
- The date when the gift was purchased.
- personalNote_i
- A personal note from the gift giver to the gift registrant. The registrant sees this note upon receiving the gift.
- purchaseLocation_i
- The location where the gift giver purchased the gift.
- isNoteSent_i
- Specifies whether a thank-you note was sent to the gift giver. Valid values are...
- 0
- (Default) A thank-you note was not sent to the purchaser.
- 1
- A thank-you note was sent to the purchaser.
- 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.
Example
The following example updates purchase record 55 for item 5000, which a gift giver has bought under order number 12345 for gift registry 888 at store 1001.
https://myhostname/webapp/wcs/stores/servlet/GiftRegistryPurchaseRecordUpdate? URL=/webapp/wcs/stores/servlet/&PurchaseRecordId=55&storeId=1001&catEntryId_1=5000 &orderItemId_1=12345
Behavior
- Upon successful completion, the specified URL is called.
- Updates purchased gift registry items. If the value for the quantity_i parameter is zero, then the action removes this purchase record from the database.
Exception conditions
- If a required parameter is not specified, the system throws an exception with the _ERR_CMD_MISSING_PARAMETER message key.
- If an invalid parameter is specified, the system throws an exception with the ERR_CMD_BAD_PARAMETER message key.
- If the system cannot find the gift registry profile to update, the system throws an exception with the _ERR_REGISTRY_NOT_FOUND the message key.
- If the system encounters a security problem, such as a user attempting to access the gift registry without the appropriate authorization, the system throws an exception with the _ERR_NOT_AUTHORIZED the message key.
Related concepts
Related reference
Overview of customizing IBM Gift Center