Understanding in-Store Pickup

In-store pickup helps merchants differentiate from their competition or remain competitive. Their customers might want to receive an item right away, and not wait for shipment. For example, a customer might need an outfit to wear to an unexpected event, but doesn't have the time to shop around or wait for shipment. Shopping online and then picking up the item is the fastest and most efficient way for them to meet their obligations. Another customer doesn't want to pay shipping costs for a bulky item, such as a piece of furniture or an appliance, because the customer has a ready means of transportation. Providing in-store pickup as a shipment option gives customers a a great deal of flexibility.

Salesforce B2C Commerce provides in-store pickup functionality via a combination of Business Manager and API capability, as demonstrated in the SiteGenesis application. See Implementing in-Store Pickup for complete instructions.

SiteGenesis in-Store Pickup Functionality

The following SiteGenesis in-store pickup functionality is described in more detail in the SiteGenesis Wireframes: In-Store Pickup and the Functional Specifications.

Product Details and Quickview Pages

On the product details and Quickview pages, the customer can identify where a particular product is located by clicking the Check store availability link.

  • Upon clicking this link, a window opens where the customer can enter a zip code, typically their home location. The list of stores that appear are based on a configured distance and inventory availability for each listed store.
  • The customer can select a preferred store. They can also click the Change location link and enter a new zip code to get a different list of stores.
  • When the user has selected a preferred store, the product details page is updated to show the availability status of the item in the preferred store beneath the standard availability. The customer can click the See more / See less links to see a complete list of the store availability results from the last zip code search.

Cart Page

When the customer adds an item to the basket, the default inventory list is assigned to the line item on the cart page. The customer can specify for each item if the item is to be designated for home delivery or in-store pickup on the Delivery Options column.

  • The In Store Pickup radio button is disabled unless a pickup location with the appropriate availability is assigned to the option. If the customer selected a preferred store on the product details page, this is the default assignment for the option unless a pickup location is already assigned to the line item.
  • You can change the location of the line item's In Store Pickup option per line item by clicking the appropriate Select Store link in the dialog box that appears when the customer clicks the Select Store link within the cart. You can also set the preferred zip code from this dialog box. The ability of the customer to select the store for in store pick up is determined by the configured availability for the line item.

Checkout Pages

When multi-shipping is enabled, if at least one item is set to the in-store pickup delivery option, the multi-shipping checkout process is used.

  • Items with the In Store Pickup delivery option show the address of the store selected for pickup. Any items that do not have this option selected must have a shipping address assigned to them.
  • After the customer has assigned any required shipping addresses, they are navigated to the shipping methods page. All items to be shipped to a specific location or picked up at a specific address are merged into appropriate shipments. The customer can add a short message for the store regarding pickup time or any further requests (included in the order export).
  • If a shipment has the In Store Pickup delivery option selected, there is no need to select a shipping method. The (zero cost) shipping method for store pickup is automatically assigned and shown for those shipments.
  • With normal Home Delivery shipments, the customer must select a shipping method.

When multi-shipping isn't enabled, the customer can have multiple in store shipments, but all the other physical shipments are designated for one delivery. The shipments are grouped on the single shipping page, where the customer can enter a message for each shipment.

System Object Attributes

The following system object attributes (in Business Manager) are used to implement the in-store pickup feature:

System Object Attribute ID Type Description
Product availableForInStorePickup boolean Inventory lists for stores (brick and mortar) are associated with this product.
ProductLineItem fromStoreId string Links the store to the productlineitem for grouping shipments in the checkout process.
Shipment fromStoreId string Maps the shipment to a brick and mortar store.
Shipment shipmentType string When this equals instore, the checkout flow assigns the shipping method (005), which has a no shipping charge.
Shipment storePickupMessage string Text used by the customer to send a message to the brick and mortar store about the shipment. This is reflected in the order export.
SitePreferences countryCode enum-of-string Default country code.
SitePreferences enableStorePickUp Boolean Toggles the availability of the in-store pickup feature in the store front.
SitePreferences storeLookupUnit enum-of-string Kilometer or Miles (default) - used to find the store near the zip code specified by the customer.
SitePreferences storeLookupMaxDistance enum-of-string Selected distance used to find the store near the zip code specified by the customer.
Store countryCodeValue string Used to create the shipment address in the basket from the Store object. The value is based on the values found in the form files (in the cartridge).
Store inventoryListID string Links the inventory list to the store object that represents the brick and mortar store.

You can configure the above Site Preference attributes in the Business Manager Site Preferences module. See Configuring Storefront Preferences.

Storefront User Interface

The following SiteGenesis cartridge files are used to implement the in-store pickup user interface, including templates, resource files, JavaScript files, stylesheets and images:

File type File Description
template cart.isml Based on the value of the site preference for in-store pickup, this template shows a fourth column containing a radio button for in-store line items.
  productcontent.isml Based on the value of the site preference for in-store pickup, this template shows a block on the product details page for showing the Check Availability link, the stores near the customer, and the availability of that product based on the entered zip code.
  appresources.isml Contains pipeline calls needed within app.js, and the js object userSettings, which is used to hold the zip code and preferred store that were stored in the session object.
  coreresetstore.isml Used if the correct resource can't be found. It renders a full page that enables the customer to select the preferred store that is to be stored in the session object.
  coreshowselectedstore.isml It renders a full page that shows the stores that can be selected based on the zip code entered by the customer.
  corezipcode.isml It renders a full page that enables the customer to select a zip code that will be used to determine which stores can be used as locations for in-store pickup
  deliveryoptions.isml Included on the cart page. It renders the radio buttons for assigning the line item as part of an in-store pickup or home delivery.
  getprefferedstore.isml Renders the response from the request for getting/setting the preferred store using Ajax.
  getzipcode.isml Renders the response from the request for getting/setting the zip code to the session objects using Ajax.
  instoremessage Renders the text boxes for in-store pickup when in the middle of the single shipping checkout using Ajax.
  minishipments.isml Contains a label for in-store pickup that is part of the order.
  orderdetails.isml Contains a label for in-store pickup, and shows the shipping cost.
  orderdetailsemail.isml Contains a label for in-store pickup.
  multishippingshipments.isml Contains code that shows a store message text box for in-store pickup orders and appropriate labels.
  multishippingaddresses.isml Shows in-store pickup orders with the address assigned when the customer is in the multi shipping checkout flow.
  shippingmethods.isml Contains logic to skip any shipping method with the ID of 005 to prevent the customer from selecting another shipping method for in-store pickup items.
  singleshipping.isml

Conditionally shows the address form field when there is at least one physical shipment meant for home delivery.

Shows the store messages text boxes for each shipment meant for in-store pickup.

  storeinventory.isml Renders the response from the request for which stores have available inventory for the given SKU.
properties checkout.properties Contains text related to in-store pickup.
  forms.properties Contains text related to in-store pickup.
  storepickup.properties Contains text related to in-store pickup.
JavaScript app.js Contains functionality related to in-store pickup. The functionality is also controlled by the site preference for the app.storeinventory object.
css style.css Contains in-store pickup related styles

Business Logic

The following SiteGenesis cartridge files are used to implement the in-store pickup business logic, including pipelines, form definitions, and B2C Commerce script files:

File type File Description
xml (meta) catalog.xml Contains the availableForInStorePickup attribute for certain products (men’s pants).
  inventory_store_german_store.xml Store inventory list for demo purposes
  inventory_store_store[1 ... 11].xml Store inventory lists for demo purposes
  system-objecttype-extensions.xml Contains attributes for the product, Store, SitePreferences, Shipment, and ProductLineItem objects.
  shipping.xml Includes the shipping method Store Pickup (id=’005’), which has a shipping cost of $0.
  stores.xml

Contains values for the following custom attributes:

  • countryCodeValue: contains the country codes found in the form.xml files (for example, β€˜US’)
  • inventoryListId: links the store to an inventory list by its ID
forms multishipping.xml Contains rules for bind the in-store message to the multi-shipping form.
  singleshipping.xml Contains logic to bind the in-store message to the single shipping form.
pipelines COshipping.xml

Contains logic to handle the store message form, and to configure the shipments that are intended for in-store pickup, via the following subpipelines:

  • CoShipping-UpdateInStoreMessage
  • COShipping-InStoreFormInit
  StoreInventory.xml Handles the requests for setting the preferred store, determines the stores available based on the entered zip code and the selected product, and handles setting the line item back to regular home delivery.
script CheckStoreInLineItems.ds When the cart is being update with a new quantity, checks the item quantity against the inventory record of a particular store (using the storeID).
  checkout/Utils.ds Copies a store address into a shipping address. (this.storeAddressTo)
  GetPhysicalShipments.ds Contains logic to not count in-store pickups as physical shipments when determining if the checkout should be using multi-shipping or not.
  InitSessionAddressBook.ds Contains logic to prevent the store addresses from being added to the multi-shipping session addresses.
  InStoreShipments.ds Scans the basket and consolidates items that are going to the same store. It also creates shipments with the appropriate shipment type and method for the rest of checkout.
  InventoryLookup.ds Looks up the store inventory of the product.
  MergeQuantities.ds Contains logic to preserve the in-store pickups when the basket is being recreated from within the multi-shipping checkout process.
  SeperateQuantities.ds Contains logic to prevent the splitting of in-store pickups from within the multi-shipping checkout process.
  SetStoreInLineItem.ds Binds the line item with a store for an in-store pickup.
  Utils.ds Provides utility functions for the in-store pickup feature.