Optional Settings in CustomConfiguration.js

This topic applies to

Applies to

SuiteCommerce InStore

There are several custom configurations that are optional for SuiteCommerce InStore (SCIS). Each optional configuration is documented in the JavaScript configuration file. To learn about the options you can configure, view the CustomConfiguration.js file.

The following topics includes more information about the optional configurations for SCIS:

Filters for Customer Search

You can customize the default filters used for searching customers in SCIS. To apply settings that make sense to sales associates in your organization, modify the following section of code in CustomConfiguration.js.

Configuration settings that are commented are the default settings. To change the default settings modify the settings, and then remove the comments around the code snippet.

//   Customer options
   customer: {
      //   Internal ids for the fields used to search customers in the Search Modal.
      //   For example customer can be searched by: Internal Id (internalid), Last Name (lastname), Phome (phone), email (email), and
      //   Company Name (company name). These filters can be configured by adding or removing values. Take note that search won't work
      //   if an invalid internalid is issued here. If fullname is added to this list, the search will also be performed on the concatenation
      //   of firstname and lastname.
      //  
      //    searchFilters:[
      //       'fullname'
      // ,   'firstname'
      // ,   'lastname'
      // ,   'phone'
      // ,   'email'
      // ,   'companyname'
      // ],

Switch the Sales Rep After Each Transaction

If you use commissions to compensate sales representatives, you may want to customize the workflow for selecting the sales rep on an order. By default, the sales associate can select a sales rep after logging in to SuiteCommerce InStore. The sales rep selected remains in place on all subsequent orders until the sales associate changes the sales rep setting.

//   Switch sales rep. after each transaction.
   // 
   switchSalesRep: false,

Item Display in Cart

By default, each item added into the cart shows the item number as the subtitle under the item name in the cart. You can configure the subtitle shown below the name of the item by adding a line to the CustomConfiguration.js file.

For example, the sample code below will display the text, ITEM #, followed by the UPC code from the item record:

itemList: { subtitleLabel: 'ITEM #' , subtitleField: 'upccode' }

Note

The value for subtitleField must be added to the list of Search Fields on the Web Site Setup page. For example, if you use SKU as the subtitle you will have to add it to the list of Search Felds before putting that value in CustomConfiguration.js.


Customize Location Display

SuiteCommerce InStore includes information about physical store locations where product are in stock and available for pickup. This information is sourced from location settings on item records in NetSuite. You can customize the way in which location information is displayed in SCIS. First create a saved search to display the location information you want to share, and then edit the CustomConfiguration.js file to define the saved search you want to use.

For more information on creating the saved search, see Modifying Saved Searches for SCIS.

  • Create a new Location Search with criteria that filters the locations displayed in SCIS. You can also specify sorting. Replace the default values for locationSearch and inventoryLocationSearch with the ID for your own custom saved search.

    location: {
            //    Id of the search for displaying locations in Nearby stores and in Pick up locations
            locationSearch: 'customsearch_ns_pos_locations',
    
            //    Id of the search for searching the inventory of an item by location
            inventoryLocationSearch: 'customsearch_ns_pos_inventory_locations',
  • In the nearby stores tab, exclude stores that do not have stock available. Set nearbyStoresRemoveNoStock: true.

    //    Remove locations without stock on that item
            nearbyStoresRemoveNoStock: false,
  • Sort Nearby Stores and Store Pickup locations by distance to the current SCIS user's location. If you choose not to sort by location distance, then search results sort order is used. You can set the sort parameters for Nearby Stores and Store Pickup, and set a limit to the number of stores in the list.

    // Extra order to put in the order screen. Possible values are
            //     'none'             use saved search order
            //     'nearby:desc'    sort by nearby stores, near last
            //     'nearby:asc'    sort by nearby stores, near first
            nearbyStoresExtraSort: 'none',
    
            // How many locations displayed in all locations
            // 0 means no limit.
            nearbyStoresLimit: 0,
            
            // Extra order to put in store pickup tab. Possible values are
            //     'none'             use saved search order
            //     'nearby:desc'    sort by nearby stores, near last
            //     'nearby:asc'    sort by nearby stores, near first
            storePickupExtraSort: 'none',
    
            // How many locations displayed in the store pickup tab
            // 0 means no limit. 
            storePickupLimit: 0,
        }