Use InStore POS Offline

Ask about this Page
Copy for AI
View as Markdown

Learn how to prepare for and recover from scenarios where InStore POS is offline from your network.

About offline mode

You may encounter various scenarios where InStore POS is offline from your network, including:

  • Location and InStore are offline to commercetools
  • Location and InStore are offline to the internet

When InStore POS is offline, it can continue to operate in a limited capacity. However, some features may not be available until the location is back online.

If a single workstation is offline, or if a PIN entry device (PED) is offline to one or more payment providers, that is not considered an offline scenario. If the device is faulty, replace it with a working device to continue processing payments. If the payment services provider is not reachable, PED payments to that provider fail, and the customer must select a different method of payment.

Prepare for offline mode

To ensure you are ready to operate InStore POS while offline, follow these steps:

  1. Activate InStore POS Offline with commercetools by contacting your commercetools representative.

  2. Ensure that the parameter set that is assigned to the workstation includes the Offline_Mode_Enabled administration parameter set to true in the InStore Center. Set other necessary offline parameters and assign the set to each workstation that will be used in offline mode.
  3. Configure a payment option that supports offline mode. Only cash payments can be processed while offline, so update an existing cash payment option or create a new one and include Offline in its paymentModes array. If the option has default set to false, assign it to each location or workstation that needs it. For example:
    Sample cash payment option that supports offline modejson
    {
      "key": "option-cash",
      "name": { "en-US": "cash payment", "en-GB": "cash payment", "es-MX": "nombre" },
      "description": { "en-US": "description", "en-GB": "description", "es-MX": "description" },
      "displayHint": "Money",
      "allowSplit": true,
      "allowRepeat": true,
      "minCentAmount": 0,
      "maxCentAmount": 0,
      "default": false,
      "paymentModes": ["Online", "Offline"],
      "allowedOperations": ["Sale"],
      "method": "Cash",
      "paymentProcessorId": "6ad63cf72af92cbe2b7aeef1"
    }
    
  4. Ensure the workstation has a working cash drawer and printer attached, as both are required to process cash payments while offline.
  5. (Optional) To override the default text provided by the localized bundle, customize the system-offline, banner, and connection-restored messages using the API. For more information, see Override core strings.
  6. Verify the local browser cache capability where workstation data will be stored, including the Catalog (with prices and sales tax), role permissions, parameters, and payment options. This capability depends on browser support for Service Worker and IndexedDB, the core technologies that offline mode relies on. Most modern browsers support both, but update any outdated browsers before using offline mode.

  7. Build a Catalog for use with InStore POS Offline. The Catalog must include only items that are available for offline mode. For more information, see Implement the Catalog module.
  8. Create an offline receipt template set.
  • If the workstation does not have a payment option that supports offline mode, or lacks a connected cash drawer and printer, the colleague sees a Cannot switch to offline Mode message when they try to use InStore POS offline.

Using InStore POS when it is in offline mode

InStore POS Offline functions at a workstation level. When InStore POS goes offline, a logged-in store colleague sees a banner and a message that remains visible until the workstation is back online. If a Cart is open when the workstation goes offline and the colleague chooses to proceed offline, that Cart is lost. You cannot build an offline Cart on top of an online Cart and only cash payments can be processed while offline. The store colleague can start a new offline Cart to add items and process transactions and advise customers that only cash payments can be accepted at that time.

The following actions are available while InStore POS is offline, if the user has the necessary role permissions:

  • Sell from the cached Catalog
  • Process take-with sale transactions
  • Accept cash payments
  • Generate receipts at local printers that do not require a network connection (reprinted receipts are not available while offline)

The workstation adopts the offline parameter set that is assigned to it. Offline activity requires the colleague to hold any corresponding role permissions, which are validated based on their last online login. Catalog items are limited to those that have been defined as available for offline mode.

The browser works with InStore POS to present a locally cached version of the Catalog, which includes prices and sales tax. Role permissions, parameters, and payment options are also cached.

Carts are created and recorded using the Cart key prefix OFF. Transactions that are processed while InStore POS is offline are stored locally on the workstation. "Offline" Carts are distinguished from "online" Carts to enable additional checks or reconciliation that may be required by sales audit, such as reconciling unknown items sold while offline.

Store and forward

When connectivity is restored, InStore POS securely uploads aggregated offline transactions in batches to commercetools. The transactions are processed asynchronously through standard API workflows to update your Project's inventory, Carts, Orders, and Payments. It can take up to 3 minutes after connectivity is restored for all offline transactions to be available in your commercetools Project.

The following sequence occurs during store and forward:

  • InStore POS batches the locally stored offline transactions for transmission.
  • The transactions are validated and queued for processing to maintain inventory and financial accuracy.
  • Orders and Payments are created in your Project using standard endpoints.
  • Transaction records are updated to reflect the synchronized state.