Create Custom Fields Using an Extension

This topic applies to

Applies to

SuiteCommerce Web Stores | SuiteCommerce Advanced | Aconcagua

The SuiteCommerce Custom Fields extension lets you add custom transaction body fields to the checkout application in SuiteCommerce sites. You can use custom fields to request or provide additional information, such as shipping instructions, special order requests, and delivery time slots.

Important

SuiteCommerce extensions are only available if they are provisioned and set up in your account. For more information, see NetSuite SuiteCommerce Extensions.


Custom Fields lets you add text, check box, and date-type transaction body fields to SuiteCommerce sites. You can add custom fields before or after existing checkout modules. For example, you can include fields before shipping method, billing address, or payment method blocks in the standard checkout flow.

Custom fields are grouped together in a separate block. You can add a header to describe the custom fields contained in that block.

Note

Only custom transaction body fields are supported by the Custom Fields extension. Standard NetSuite transaction body fields cannot be used.


To display custom transaction body fields in your SuiteCommerce checkout application, the following steps are required:

  1. Create Custom Checkout Fields

  2. Set Up Custom Fields in the Checkout Application

Create Custom Checkout Fields

To add new fields to the checkout application, you must create custom transaction body fields in your NetSuite account. Only transaction body fields are supported by the Custom Fields extension. For more information on how to create custom fields in NetSuite, see the help topic Custom Transaction Body Fields.

Note

To implement custom item, custom transaction line, and custom transaction item option fields, see Create Custom Fields by Customizing Templates.


The Custom Fields extension allows the following transaction body field types:

  • Check Box

  • Date

  • Text Area

  • Long Text

  • Free-Form Text

When you create a transaction body field for the Custom Fields extension, you must ensure the following:

  • The Field Type must match the field type you want to include in the checkout application.

  • The Web Store and Sale boxes must be selected in the Applies To subtab.

  • If you select the Mandatory box in the Validation & Defaulting subtab, the field will be made mandatory for all domains and you must mark it as required in the SuiteCommerce configuration of all the domains of your website.

    If you only want the new transaction body field to be required in one domain, you should mark the field as required in the configuration of that domain only. You must not mark it as mandatory during creation.

  • The subtab where you want to display the custom field on the Sales Order record should be selected in the Display subtab. Otherwise, the field is shown on the Custom subtab in the Sales Order record.

Note

The character limitation for the custom fields in SuiteCommerce is set by the field type in NetSuite. For more information on the limits, see the help topic Table of Custom Field Type Descriptions.


When you have created your custom transaction body fields, you are ready to Set Up Custom Fields in the Checkout Application.

Set Up Custom Fields in the Checkout Application

With the SuiteCommerce Custom Fields extension, you can add a custom field before or after a checkout module. For example, if your SuiteCommerce site uses the standard checkout flow, you can add custom fields before or after the shipping method block in the Shipping Address page.

If you want to change the order of existing modules in the checkout application, you should do this before adding new custom fields. For more information, see Reorder Checkout Modules.

Important

Only custom transaction body fields are supported by the Custom Fields extension. Standard NetSuite transaction body fields cannot be used.


Custom fields are displayed in the checkout application in the order they are entered in the SuiteCommerce Configuration record in the Custom Fields subtab.

To set up custom fields in the checkout application:

  1. Select the domain of the web store where you want to add custom fields at Setup > SuiteCommerce Advanced > Configuration.

  2. In the SuiteCommerce Configuration record, navigate to the Checkout tab, Custom Fields subtab.

  3. In the Required Field Error Message field, you can determine the format of the message displayed to shoppers when they leave a required field blank.

    By default, the message is “Field {{field}} " is required" where {{field}} is replaced by the field name.

  4. In the Loading Text, Loading Error Text and Saving Error Text fields, customize the messages displayed to users when loading the custom fields in the checkout application.

    The default messages are “Loading additional information...", “There was an error loading the section.", and “There was a problem saving. Please reload the page." respectively.

  5. In the ID column, enter the ID of the custom transaction body field you created previously.

    For header-type fields, the ID field is optional. For all other field types, the ID field is required. Otherwise, the field is not displayed in the checkout application.

  6. In the Position column, select where you want the field to appear.

  7. In the Module column, select the checkout block to be impacted by the position.

  8. In Field Type, select the type of field to display in the checkout application.

    Note

    The Field Type must be identical to the Field Type selected in the transaction body field record.


  9. In the Label field, you can enter the text you want to display to shoppers to describe the information to be entered.

    You can use the Placeholder field to help customers enter a value in the custom field.

  10. Check the Required box if you want to force shoppers to enter a value in this field to continue with the checkout process.

    You can set a field as required for one domain or for all domains. If you want the field to be required for all domains, you should selected the Mandatory box in the transaction body field record. If you want the field to be required for a specific domain, you must mark it as required in the configuration record for that domain only.

  11. Repeat steps 5 to 10 to include additional custom fields. Click Insert to insert a row above the current row.

  12. Click Save.