WebSphere Commerce EnterpriseWebSphere Commerce Professional

GiftRegistryCreate action

This action creates a gift registry and saves it as a profile within a store's system. After it creates the gift registry, the action sends a confirmation e-mail to the registrant who created the gift registry. Use this action with SSL (Secure Sockets Layer) to ensure that all personal information is encrypted. To do so, type the action with the HTTPS secure protocol.

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).
GiftRegistryCreate syntax diagram

Parameter values

URL
Required: The URL to be called when the action is completed successfully.
storeId
Required: The store reference number, which is required to help identify to which stores a gift registry belongs.
eventTypeId
Required: An integer representing the type of event for the gift registry. This is a primary key of the GREVNTTYPE database table, and also a foreign key to the same table.
eventYear
Required: The year when the event will occur, in the format YYYY.
eventMonth
Required: The month when the event will occur, in the format MM.
eventDay
Required: The date when the event will occur, in the format DD.
registrantType_i
Required: The type of user for the gift registry. Valid values are as follows:
0
(Default) Indicates gift registry registrant.
1
Indicates gift registry co-registrant (such as a groom for a wedding).
2 to 5
Reserved for IBM internal use.
6 or above
Indicates additional co-registrants, if the gift registry is intended to be managed by several people. For example, a wedding registry might have the bride as the registrant, the groom as the co-registrant, the mother-in-law as a second co-registrant, and the father-in-law as a third co-registrant.
forUser
The logon ID for the user or organization on whose behalf the action will be run. Only a person with the authority to process orders can specify this parameter.
forUserId
Similar to the forUser parameter, but this parameter identifies the user by the internal user ID, as found in the USERS database table.
errorViewName
Overrides the error view when an error occurs.
externalId
The unique gift registry identifier. If this parameter is not specified, the action generates one.
name
The name that the gift registrant provides to describe the purpose for the gift registry.
description
A brief description of the purpose for the gift registry.
guestOption
Specifies who can access the gift registry. Valid values are as follows:
0
(Default) Indicates that the gift registry is public and anyone can search or view it.
1
Indicates that the gift registry cannot be searched, but is also not password protected.
2
Indicates that the gift registry is password protected, and is also searchable.
3
Indicates that the gift registry is password protected, but is not searchable. This value is reserved for IBM internal use; the meaning should not be customized.
acceptGiftCard
Specifies whether this gift registry accepts gift cards as gifts. Valid values are as follows:
0
Indicates that gift cards are not accepted.
1
(Default) Indicates that gift cards are accepted.
createdTime
When the gift registrant created the gift registry. This value should not be set unless this action is being called from an external message and you want the timestamp to be synchronized with the master timestamp.
optForEmail
Specifies whether the gift registrant wants to receive e-mail notification regarding the gift registry. Valid values are as follows:
0
Indicates that the gift registrant does not want to receive e-mail.
1
(Default) Indicates that the gift registrant wants to receive e-mail.
messageForGuest
A message that the gift registrant wants to send to all gift givers who are granted access to the gift registry.
location
The method by which, or physical location where, the gift registrant created the gift registry (for example, online, by in-store kiosk, or through a call center). The default is online.
relationship_i
The gift registrant's relationship to, or role within, the gift registry (for example, for a wedding gift registry, you can have relationship_1=bride and relationship_2=groom).
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.
registryPassword
The password used to authorize full access to the gift registry. This is typically given to the main gift registrant.
guestPassword
The password given to people who will use the gift registry; that is, to any co-registrants and gift givers.
preEventShippingPreference
The address where gifts should be shipped, prior to the event date (for example, before a wedding). Valid values are as follows:
R
Indicates that gifts should be shipped to the gift registrant's address.
C
Indicates that gifts should be shipped to the co-registrant's address. Although only one main gift registrant is supported per gift registry, you can specify co-registrants. For example, for a wedding gift registry, the main gift registrant can be the bride, and a secondary registrant can be the groom.
O
Indicates that gifts should be shipped to another address, as specified when the gift registrant created the gift registry.
postEventShippingPreference
The address where gifts should be shipped, after the event date (for example, after a wedding). Valid values are as follows:
R
Indicates that gifts should be shipped to the gift registrant's address.
C
Indicates that gifts should be shipped to the co-registrant's address. Although only one main gift registrant is supported per gift registry, you can specify co-registrants. For example, for a wedding gift registry, the main gift registrant can be the bride, and a secondary registrant can be the groom.
O
Indicates that gifts should be shipped to another address, as specified when the gift registrant created the gift registry.
preEventFirstName
(Required only if preEventShippingPreference has a value of O) The first name of the person specified for the pre-event shipping address.
preEventLastName
(Required only if preEventShippingPreference has a value of O) The last name of the person specified for the pre-event shipping address.
preEventAddress1
(Required only if preEventShippingPreference has a value of O) The first line of the pre-event shipping address.
preEventAddress2
(Required only if preEventShippingPreference has a value of O) The second line of the pre-event shipping address.
preEventCity
(Required only if preEventShippingPreference has a value of O) The name of the city within the pre-event shipping address.
preEventState
(Required only if preEventShippingPreference has a value of O) The name of the state, province, or equivalent within the pre-event shipping address.
preEventCountry
(Required only if preEventShippingPreference has a value of O) The name of the country or region within the pre-event shipping address.
preEventZipCode
(Required only if preEventShippingPreference has a value of O) The ZIP or postal code within the within the pre-event shipping address.
preEventPhone1
(Required only if preEventShippingPreference has a value of O) The primary phone number for the pre-event shipping address.
postEventFirstName
(Required only postEventShippingPreference has a value of O) The first name of the person specified for the post-event shipping address.
postEventLastName
(Required only postEventShippingPreference has a value of O) The last name of the person specified for the post-event shipping address.
postEventAddress1
(Required only postEventShippingPreference has a value of O) The first line of the post-event shipping address.
postEventAddress2
(Required only postEventShippingPreference has a value of O) The second line of the post-event shipping address.
postEventCity
(Required only postEventShippingPreference has a value of O) The name of the city within the post-event shipping address.
postEventState
(Required only postEventShippingPreference has a value of O) The name of the state, province, or equivalent within the post-event shipping address.
postEventCountry
(Required only postEventShippingPreference has a value of O) The name of the country or region within the post-event shipping address.
postEventZipCode
(Required only postEventShippingPreference has a value of O) The ZIP or postal code within the post-event shipping address.
postEventPhone1
(Required only postEventShippingPreference has a value of O) The primary phone number for the post-event shipping address.
addressField1_i through addressField5_i
Custom parameters, which you can use to capture additional data values for addresses.
field1 through field5
Custom parameters, which you can use to capture data values for FIELD1 to FIELD5 in the GRFGTREG database table.

Example

The following example creates a gift registry for the gift registrant John Smith, who will be celebrating his 50th wedding anniversary on May 25. The gift registry is for a store with the ID of 1001. John Smith has set up passwords for himself and any gift givers that he has invited to use the gift registry.


https://myhostname/webapp/wcs/stores/servlet/GiftRegistryCreate?URL=/webapp/wcs
/stores/servlet/&storeId=1001&eventTypeId=2&eventYear=2005&eventMonth=05&eventDay=25
&registrantType_1=0&registrantType_2=1&name=50thWeddingAnniversary
&relationship_1=husband&relationship_2=wife&shippingPreference=R&lastName=Smith
&firstName=John&address1_1=123 Main Street&city_1=Toronto&state_1=Ontario
&country_1=Canada&zipCode_1=M1M1M1&email_1=jsmith@email.com&phone1=555-555-5555
&phone2=333-333-3333&registryPassword=pass1word&guestPassword=pass2word

Behavior

  • Upon successful completion, the specified URL is called.
  • Places an access key to the gift registry in the request for the appropriate JSP page.
  • Creates a new gift registry profile in the system.
  • If the action is unsuccessful, it redirects to the error view.

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 password specified for the registryPassword or guestPassword parameters are invalid, the system throws an exception with the _ERR_PASSWORD_NOT_VALID message key.