xWeb Event Registration

This topic explains how to create an Event Registrant in xWeb.

Flow

This section explains the general flow of Event Registration works. You should model your own application accordingly.

In summary, you'll have a Registrant Object containing one or more Fees for the Registrant, that you'll add to the user's overall Shopping Cart Object. These steps are described in greater detail below.

Initialize Shopping Cart Object

The customer who is shopping must have an active Shopping Cart Object. See that page for how to initialize a cart for a customer.

Initialize Registrant Object

First, create a new Registrant Object for the person who will be registering by calling WEBCentralizedShoppingCartEventRegistrantGetNew and passing the EventKey of the Event and the Customer Key of the Registrant.

Initialize FeeCollection

At the same time, you can create a new FeeCollection object that you'll use to keep a list of any event fees the registrant will be adding. You'll use this FeeCollection later. Generally, you'll have one Fee for the main registration, and then zero, one or more Fees for any Event Session registrations. (In netFORUM, you must have a main registration fee, and Sessions are optional. Some Events don't have Sessions.)

Main Registration Fee

Second, call WEBCentralizedShoppingCartGetEventFees to get the Fees for the Registrant. List the Fees to the Registrant and allow them to choose their main Fee. Add the chosen fee to the FeeCollection object you created above. Set the <Fee.prc_key> to be the value of <prc_Key> from WEBCentralizedShoppingCartGetEventFees.

Session Fees

Third, if the Event has Sessions, then you'll also want to add Sessions to the Registrant Object. To get a general list of sessions for an event, call WEBCentralizedShoppingCartGetSessionListByEventKey. The get the list of Sessions and prices for which the specific Registrant is eligible, call WEBCentralizedShoppingCartGetEventSessionFees which will contain the <Price> for the particular Registrant. For each Session the Registrant wishes to select, add it to the FeeCollection you started tracking earlier; set the <Fee.prc_key> in the Fee to that of the <prc_Key> in the return from WEBCentralizedShoppingCartGetEventSessionFees.

Add Fees to Registrant Object

Once you've loaded up the main registration fee and any session fee(s), then you'll call WEBCentralizedShoppingCartEventRegistrantSetLineItems and pass the FeeCollection to add any selected Fee(s) to their Registrant Object. This method will return an updated Registration Object containing the Fees.

Add Registration Object to Cart

Finally, add the Registration to the Cart by calling WEBCentralizedShoppingCartAddEventRegistrant. This method will return a refreshed Shopping Cart Object with the Registration contained in the Cart. At this point, you can let the user continue to shop or they can check out and pay.

Check Out and Pay

When you're ready to check out and pay, see WEBCentralizedShoppingCartInsert. In this method, you pass the Shopping Cart Object containing the Registration and any main Fee or Session Fees, and the method will insert the invoice, payment, registrant, and other associated data.

Related Web Methods

These web methods might also need to be called:

Registrant Type

A Registrant can have a Registrant Type, which can drive pricing fees. Call WEBCentralizedShoppingCartGetEventRegistrantTypeListByEvent to get the Types by Event.

Alter Fees of a Registrant

Use WEBCentralizedShoppingCartEventRegistrantSetLineItemsWithCart to add or remove line items from a specific Registrant when the Registration has already been added to the Shopping Cart Object.

Code Sample

See Also