Forms Tutorial

This tutorial is intended to help you practice with the Salesforce B2C Commerce forms so that you can shorten your application's go-live time and enhance your customer's ecommerce shopping experience.

In this tutorial, you extend the registration process so that customers can specify one or more product groups in which they have the most interest. They can also opt-in to receive an email newsletter.

To add this capability, you create a series of check-boxes, allowing customers to select one or more groups (for example, Interest in Outerwear or Interest in Footwear) on the My Account page. You also add a checkbox for them to opt-in to receive the newsletter.

You are performing these general tasks:

Task Files Impacted
Extend the customer profile to allow for product groups in three boolean attributes (allowing for multi-selection) and a newsletter attribute In Business Manager, extend the Profile system object.
Add a sub menu to the My Account page to let users manage their interests.

In UX Studio:

  • Extend the account-landing content asset to call the Account-EditInterests subpipeline.
  • Create the account/user/editinterests.isml templates to process the new Interests menu.
Start the implementation in the account profile editing area. In UX Studio, add the subpipeline Account-EditInterests to the Account pipeline to process the interests form objects that are defined in the interests.xml form definition via the account/user/editinterests.isml templates.
Use B2C Commerce Forms to manage/validate the preferences.

In UX Studio:

  • Create a new form definition file interests.xml.
  • Create new messages via three properties files for consumer clarification and easier localization.

To do this, you need:

  • Your own instance, with the proper access (contact Commerce Cloud Support).
  • Business Manager with the SiteGenesis application storefront (Sites-Site).
  • UX Studio installed on your PC that supports your instance. If your Studio and server are incompatible, Studio shows the appropriate message.
  • The SiteGenesis cartridge downloaded on your PC.
  • Your new cartridge properly identified within Business Manager on your instance.

See Site Development for more information.

Note: This tutorial relies on the isinputfield and modules templates, located in templates/util directory for the display of input fields, as specified by the forms definitions.