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
GiftRegistryPurchaseRecordAdd action
This action marks gifts as purchased and creates a purchase record. 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
- URL
- Required: The URL to be called when the action completes successfully.
- storeId
- Required: The store reference number, which is required to help identify to which stores a gift registry belongs.
- orderItemId
- Required: The unique identifier of an item within the order for a purchased gift registry item.
- externalId_i
- Required: The unique identifier for the gift registry.
- 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. The default is 1.
- 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 will see 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 marks a gift as purchased from gift registry 888 as part of order number 12345 at store 1001, and creates a purchase record for it.
https://myhostname/webapp/wcs/stores/servlet/GiftRegistryPurchaseRecordAdd? URL=/webapp/wcs/stores/servlet/&storeId=1001&orderItemId_1=12345 &externalId=888
Behavior
- Upon successful completion, the specified URL is called.
- Marks and records purchased gift registry items.
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 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 message key.
Related concepts
Related reference
Overview of customizing IBM Gift Center