Skip to content
Log in

POS actions reference

On this page

Overview

POS actions are named operations that control the behavior of the StoreConnect POS — adding items to the cart, navigating screens, printing receipts, and more. Every button in the POS UI corresponds to an action.

Actions can be triggered in three ways:

  • Action items — Salesforce records (POS Action Items) assigned to action groups. Configured through the StoreConnect console.
  • scAction() JavaScript function — a global function available in custom views and Liquid templates rendered by the POS.
  • Liquid {% action %} tag — triggers an action inline within a Liquid template.

Triggering actions

Via action items

Action items are configured in Salesforce under POS Action Groups. Set the Action field to the action identifier and the Params field to a semicolon- or ampersand-separated key-value string.

Via scAction()

The scAction() function is available globally within the POS browser context:

javascript scAction(action, params)

Argument Type Required Description
action String Yes Action identifier (e.g. 'cart:add_product')
params Object No Key-value pairs of action parameters

Example:

```javascript scAction(‘cart:add_product’, { product_code: ‘SKU123’, quantity: 2 })

scAction(‘cart:discount’, { discount_type: ‘percentage’, discount_amount: 10 }) ```

Via Liquid templates

Use Liquid to pass context variables from the current record into action parameters:

html <button onclick="scAction('print:receipt', { order_sc_id: '{{ record.id }}' })"> Print receipt </button>

Parameter format

Parameters in the Params field of a POS Action Item can use semicolons or ampersands as separators:

product_code=SKU123&quantity=2&unit_discount=5 product_code=SKU123;quantity=2;unit_discount=5

Liquid template variables are resolved before the action runs:

order_sc_id={{ record.id }};print_template_sfid=a2cMn00003s4X88IAE

Action chaining

An action item can have a Next Action Item configured. When the first action completes, the next action runs automatically. Some actions pass context to the next action — for example, cart:add_product passes {{ cart_item_sc_id }} so a follow-up action can reference the newly added item.


Cart actions

cart:add_product

Adds a product to the current cart.

Parameter Type Required Description
product_id String No* Product Salesforce ID
product_code String No* Product code (alternative to product_id)
quantity Number No Quantity to add (default: 1)
unit_price Number No Override unit price. Locks the price — prevents repricing if the customer changes.
unit_discount Number No Apply a unit discount
name String No Override the product name on the cart item
serial_numbers String No Comma-separated serial numbers
pending Boolean No Mark the item as pending (default: false)
pay_now String No Deposit mode: "all", "none", a dollar amount, or "N%"

*Either product_id or product_code is required.

If the product has variants, variable pricing, is a rental, or uses voucher assets, the product selection modal opens before the item is added.

Next action context:

product_id — product Salesforce ID cart_item_sc_id — SC ID of the new cart item

Example:

product_code=SKU123&quantity=2&pay_now=50%


cart:item:update

Updates an existing cart item. Can change quantity, price, discount, name, serial numbers, pending status, or swap the product entirely.

Parameter Type Required Description
cart_item_sc_id String Yes SC ID of the cart item to update
quantity Number No New quantity (must be ≥ 1)
unit_price Number No New unit price (non-negative)
unit_discount Number No New unit discount (non-negative)
name String No Override display name
serial_numbers String No Comma-separated serial numbers
pending Boolean No Set pending status ("true" or "false")
product_id String No† Product Salesforce ID to swap to
product_code String No† Product code to swap to
pay_now String No Deposit mode: "all", "none", a dollar amount, or "N%"

†For product swapping, provide exactly one of product_id or product_code. Cannot swap to rental products, products with variants, or asset-backed vouchers. If the item is linked to a fulfillment, that fulfillment is flagged for reconfirmation.

Example (swap product from a layout record):

cart_item_sc_id={{ record.id }};product_id=01tXXXXXXXXXXXXXXX


cart:item:remove

Removes a cart item. Cleans up any associated rental asset holds and fulfillments.

Parameter Type Required Description
cart_item_sc_id String Yes SC ID of the cart item to remove

cart:add_contact

Assigns a customer to the current cart.

Parameter Type Required Description
contact_sc_id String Yes SC ID of the contact to assign

cart:remove_contact

Removes the customer from the current cart. Takes no parameters.


cart:discount

Applies a cart-wide discount, distributed across eligible items.

Parameter Type Required Description
discount_amount Number Yes Discount value
discount_type String Yes "amount" or "percentage" (legacy: "dollar" or "percent")

Discounts that exceed the user’s permitted maximum or the product minimum sell price rules are rejected with an alert.

Example:

discount_amount=15;discount_type=percentage


cart:deposit:set

Sets pay-now deposit amounts across all items in the current cart.

Parameter Type Required Description
pay_now String Yes "all", "none", a dollar amount (e.g. "50"), or a percentage (e.g. "25%")
Value Effect
"all" Pay full price on all items
"none" Pay nothing now on all items
"25%" Each item’s deposit is 25% of its discounted unit price
"50" Distributes $50 proportionally across all items

Individual product minimum deposit rules are respected.


cart:resume

Resumes a previously saved (parked) cart. If the cart is already linked to an existing order, an alert is shown and the cart cannot be resumed.

Parameter Type Required Description
cart_sc_id String Yes SC ID of the cart to resume

cart:toggle

Toggles the cart panel open or closed. If the POS is not on the home screen, navigates home first, then opens the cart. Takes no parameters.


Order actions

order:return

Processes a return for an existing order. Loads returnable items into the cart as refund lines and navigates to the home screen.

Parameter Type Required Description
order_sc_id String Yes Salesforce ID of the order to return
order_item_sc_ids String No Comma-separated order item Salesforce IDs to return. Omit to return all returnable items.
quantities String No Comma-separated quantities per item (parallel to order_item_sc_ids). Defaults to full remaining quantity.
amounts String No Comma-separated amounts per item — "N%" or a dollar value.
new_cart String No "true" to park the current cart and start fresh

Items with pending fulfillments or zero remaining quantity are skipped automatically.

Example (return specific items at partial amounts):

order_sc_id=abc-123;order_item_sc_ids=id1,id2;quantities=1,3;amounts=100%,50%


order:update

Updates specific fields on an existing order.

Parameter Type Required Description
order_sc_id String Yes SC ID of the order to update
checkout_email String No Email address for checkout
send_email Boolean No Whether to send an email notification
order_type String No Order type value

Navigation actions change the active screen. They do not take effect if the POS is in a state that prevents navigation (e.g. an active modal blocking the UI).

Screen navigation

Action Description
nav:home Navigate to the home screen
nav:checkout Navigate to the checkout screen
nav:authentication Navigate to the authentication screen
nav:register Navigate to the register selector
nav:settings Navigate to settings
nav:labels Navigate to the barcode label printing interface

List views

Action Description
nav:customers Navigate to the customers list
nav:products Navigate to the products list
nav:orders Navigate to the orders list
nav:carts Navigate to the carts list
nav:fulfillments Navigate to the fulfillments list
nav:suppliers Navigate to the suppliers list
nav:stock_adjustments Navigate to stock adjustments
nav:stock_requests Navigate to stock requests

Record views

Action Parameters Description
nav:customers:record customer_id View a customer record
nav:customers:create Open the customer creation form
nav:customers:update customer_id Open the customer edit form
nav:orders:record order_id View an order record
nav:carts:record cart_id View a cart record
nav:products:record product_id View a product record

Custom layouts and views

Action Parameters Description
nav:layout layout or layout_sc_id, optional record_id Navigate to a custom POS layout
nav:view view or view_sc_id, optional record_id, object_name Navigate to a custom POS view

Session management

Action Parameters Description
nav:session_end End the current shift
nav:session_add_user Add a user to the session
nav:session_start_user user_id Start session for a specific user
nav:session_start_balance user_id, amount Start session with an opening balance
nav:disconnect_register Navigate to the register disconnection screen

Open actions

Open actions display a standalone full-screen page, separate from the main POS navigation stack.

Action Parameters Description
open:customers:create Open the customer creation form as a standalone page. Does not assign the customer to the cart.
open:customers:record customer_id (required) Open a customer record as a standalone page
open:customers:update customer_id (required) Open the customer edit form as a standalone page
open:layout layout or layout_sc_id, optional record_id Open a custom POS layout as a standalone page
open:view view or view_sc_id, optional record_id, object_name Open a custom POS view as a standalone page

modal:close

Closes the topmost modal. Takes no parameters.


modal:open:alert

Opens an alert modal.

Parameter Type Required Description
alert String Yes Alert content or identifier

modal:open:email_receipt

Opens a modal to send an email receipt for an order. Pre-fills the recipient address with the contact’s email if available.

Parameter Type Required Description
order_sc_id String Yes SC ID of the order

Opens a modal to email a payment link for an order with an outstanding balance. Includes a QR code option for a scannable payment link.

Parameter Type Required Description
order_sc_id String Yes SC ID of the order

modal:open:return

Opens an interactive return modal for an order, allowing the user to select items and quantities before processing.

Parameter Type Required Description
order_sc_id String Yes SC ID of the order

modal:open:url

Opens a modal displaying a custom URL. Liquid context variables are resolved before the URL is rendered.

Parameter Type Required Description
url String Yes URL to load in the modal

modal:open:view

Opens a custom POS view inside a modal. Additional parameters are merged into the Liquid context for the view.

Parameter Type Required Description
view_identifier String Yes Identifier of the view to display
(additional) * No Any extra parameters become Liquid context variables

modal:open:layout

Opens a custom POS layout inside a modal. Context from the action chain is available to the layout’s Liquid templates.

Parameter Type Required Description
layout_identifier String Yes Identifier of the layout to display

All print actions require a printer to be connected and configured in POS settings. Errors are displayed as alerts if the template or printer cannot be resolved.

print:receipt

Prints an order receipt using the configured receipt template, or an override template.

Parameter Type Required Description
order_sc_id String Yes SC ID of the order
print_template_sfid String No Salesforce ID of a receipt-context print template to use instead of the settings template

print:cart

Prints the current cart contents using the configured cart template, or an override template.

Parameter Type Required Description
cart_sc_id String No SC ID of the cart to print. Defaults to the active cart.
print_template_sfid String No Salesforce ID of a cart-context print template to use instead of the settings template

print:labels

Prints product labels using the configured label template, or an override template.

Parameter Type Required Description
product_sfids String Yes Comma-separated list of product Salesforce IDs
quantity Number No Labels to print per product (default: 1)
print_template_sfid String No Salesforce ID of a label-context print template to use instead of the settings template

Example (from a product layout record):

product_sfids={{ record.sfid }};quantity=2


print:quest_receipt

Prints the Quest Airpay TAP transaction receipt for an order. Uses a hardcoded template. For a customized receipt, use print:receipt with a custom template that accesses payment.gateway_receipt.

Parameter Type Required Description
order_sc_id String Yes SC ID of the order

print:template

Prints using any print template directly, regardless of context type. Additional parameters are passed as Liquid context to the template. Supports all printer types — thermal receipt, PDF document, and label.

Parameter Type Required Description
print_template_sfid String Yes Salesforce ID of the print template to use
(additional) * No Any extra parameters become Liquid context variables in the template

Example:

print_template_sfid=a1b2c3d4e5f6g7h8;order_id={{ record.id }}


Sync actions

sync

Performs an incremental sync, downloading only records that have changed since the last sync. Does nothing if a sync is already in progress. Takes no parameters.


sync:full

Performs a full re-sync, re-downloading all data. Can optionally target a single object.

Parameter Type Required Description
object String No Object to re-sync. Accepts Salesforce API names (e.g. product2, s_c__cart__c) or legacy aliases: orders, stores, fulfillments. Omit to re-sync everything.

sync:pause

Pauses syncing for all objects currently syncing. In-progress page requests complete before stopping. The paused state persists across page reloads. Takes no parameters.


sync:resume

Resumes syncing for paused objects and re-syncs them immediately.

Parameter Type Required Description
object String No Object to resume. Accepts the same values as sync:full. Omit to resume all paused objects.

Record actions

These actions create, update, or delete records in the POS local database (IndexedDB). The target table must use s_c__sc_id__c as its primary key.

record:save

Creates or updates a record. An SC ID is auto-generated if not provided.

Parameter Type Required Description
object_name String Yes API name of the object/table
(additional) * No Any extra parameters become field values on the record

record:delete

Deletes a record from a local database table.

Parameter Type Required Description
object_name String Yes API name of the object/table
record_sc_id String Yes SC ID of the record to delete

System actions

lock

Locks the POS to the session screen, requiring users to re-authenticate before continuing. Takes no parameters.


close

Closes the current view or modal by popping it from the page stack. If the closed entry is a non-modal page with a modal behind it, both are closed. Takes no parameters.


cash_drawer:open

Sends an open command to the connected cash drawer via the receipt printer integration. Takes no parameters.


printer:remove

Removes a paired printer from POS settings.

Parameter Type Required Description
printer_id String Yes ID of the printer to remove

Was this article helpful?

Was this article helpful?