Skip to content
Log in

POS Liquid objects reference

On this page

A POS view renders Liquid in the register’s browser, and the objects it reads there are smaller versions of the storefront Liquid objects. This reference lists, for each object, the attributes that work on a register and the ones that raise an error, so you can write a POS view or action param that renders the first time.

Attribute names and meanings match the storefront objects. Each section links to the storefront reference for what an attribute returns.

Where objects come from

A view reaches these objects in four ways:

  • Globals — current_store, current_outlet, current_staff, current_cart, current_customer, current_account, current_order, current_pricebook, and all_products. The full list, and the globals that raise, is in POS views.
  • record and records — a view on a POS layout or layout field receives the record being shown as record, and a list or grid layout view receives records. A record from one of the objects below gets that object’s attributes.
  • {% query %} — each result is the matching object below, or a plain record if the object has no entry here.
  • Attributes that return another object — for example order.items or fulfillment.fulfillment_items.

How attributes behave

  • Supported attributes — return the same value as on the storefront, where the data exists on the register.
  • Attributes listed as raising — throw an error. A view whose template raises renders as an empty box, with the error in the browser console. Guarding the attribute with {% if %} doesn’t help, because reading it is what raises.
  • Names not listed at all — render blank with no error, so check the spelling.
  • Question-mark attributes — work as written, for example register.connected?.
  • data — reads any synced field by API name on every object here, for example {{ current_cart.data.s_c__customer_notes_long__c }}. The name is not case-sensitive. Objects with no entry here offer only data.

A record only holds what the register has synced, so a field that isn’t synced to the device reads as blank even through data.

Example: list the promotions on the current cart

discount_breakdown_lines returns one entry per promotion, each with a name, an amount, and points. This view lists the promotions applied to the cart on the register:

```liquid

{% for line in current_cart.discount_breakdown_lines %}

{{ line.name }}: {{ line.amount | money }}

{% endfor %} ```

The view shows one row per promotion on the cart, with the amount formatted in the store currency, and nothing when no promotion applies.

Objects

Store

Built from s_c__Store__c. Reached through current_store, outlet.store, order.store. For what each attribute returns, see the storefront store object.

Available: currency_code, display_currency?, display_points?, id, name, tax_inclusive?.

The register holds only part of the store record, so code, domain, global_css, global_javascript, locale, logo, meta_description, meta_keywords, meta_title, and path render blank, and accept_terms_enabled? and shipping_enabled? always return false.

Raises: account_credits_path, account_path, account_points_path, authentication_providers, body_content, booking_availabilities_path, campaigns, cart_path, carts_path, checkout_path, currency_symbol, footer, footer_menu, forgot_password_path, fulfillments_path, geolocation, has_promotions?, has_vouchers?, head_content, header, header_menu, home_path, local_login?, login_path, logout_path, navigation_categories, orders_path, outlets, payment_providers, pickup_enabled?, product_approvals_path, resend_confirmation_path, scripts, search_path, social_image, sso_login?, sso_reset_password?, staff, styles, subscriptions_path, terms_conditions_page, timezone, url, zone.

Outlet

Built from s_c__Outlet__c. Reached through current_outlet, register.outlet, order.outlet. For what each attribute returns, see the storefront outlet object.

Available: city, country, id, sfid, name, phone, register_code, registers, state, store, tax_number, zip_code.

Register

Built from s_c__Register__c. Reached through outlet.registers, cart.in_use_by_register. For what each attribute returns, see the storefront register object.

Available: active?, active, connected?, connected, id, sfid, name, outlet.

Staff

Built from User. Reached through current_staff, order.assisted_by. For what each attribute returns, see the storefront staff object.

Available: id, name.

Cart

Built from s_c__Cart__c. Reached through current_cart, record on a cart layout. For what each attribute returns, see the storefront cart object.

Available: contact, discount_breakdown_lines, id, in_use_by_register, item_count, items, total.

Raises: adjustment_items, amount_due_now, applied_credits, applied_vouchers, billing_address, bookable?, bookable_cart_items_valid_until, bookable_line_items_valid_until, cache_key, can_offer_checkout_deposit?, checkout_deposit_amount, checkout_full_total, checkout_minimum_deposit_amount, currency_code, currency_payment_required?, custom_forms, payment_provider, payment_surcharge_values, pickup_options, points_payment_required?, promotions, quotable?, require_delivery_method?, schedulable_items, shipping_address, shipping_cost, shipping_provider_service_name, shipping_rates, sub_total, sub_total_points, taxes, test_order?, total_deposit, total_deposit_points, total_fixed_term_subscriptions, total_fixed_term_subscriptions_points, total_non_subscriptions, total_non_subscriptions_points, total_paid, total_paid_points, total_payable, total_payable_points, total_points, total_shipping_weight_kg, total_shipping_weight_lb, total_subscriptions, total_subscriptions_points.

Cart item

Built from s_c__Cart_Item__c. Reached through cart.items, cart_item.bundle_items. For what each attribute returns, see the storefront cart item object.

Available: bundle_items, bundle_lead?, has_nested_bundle_items?, delivery_date, delivery_day, delivery_time, id, in_bundle?, name, notes, product, quantity, reserved_product?, shipping_dimensions_unit, shipping_height, shipping_length, shipping_weight, shipping_weight_unit, shipping_width, total_shipping_weight.

Raises: available_delivery_dates, available_delivery_days, available_delivery_windows, bookable?, bookable_event, custom_forms, delete_path, edit_bundle_path, max_quantity, min_quantity, pickup_options, pricing, shipping_methods.

Order

Built from Order. Reached through current_order, record on an order layout, payment.order, fulfillment.order. For what each attribute returns, see the storefront order object.

Available: account, adjustment_items, assisted_by, assisted_by_name, bill_to_contact, billing_city, billing_country, billing_postal_code, billing_state, billing_street, checkout_email, checkout_phone, checkout_shipping_email, checkout_shipping_phone, checkout_step, collection_time, contact, currency_code, customer_notes, discount_breakdown_lines, fulfillments, id, items, order_number, ordered_at, outlet, original_order, payments, reference, refund_orders, risk_review, risk_review_pending?, ship_to_contact, shipping_city, shipping_country, shipping_notes, shipping_postal_code, shipping_state, shipping_street, status, store, sub_total, sub_total_excl_tax, test_order?, total, total_earn_points_amount, total_points, total_tax, transaction_discount.

Raises: additional_payment_path, all_vouchers, amount_due_now, applied_vouchers, billing_address, billing_address_lines, bookable?, bookable_items, bookings, checkout_minimum_deposit_amount, collect_booking_attendees?, collection_point, custom_forms, deposit_owing?, subscriptions, has_deposit_items?, item_count, path, payment_surcharge_values, pricebook, quotable?, reorder_path, shipping_address, shipping_address_lines, subscription_order, surcharge_items, taxes, total_deposit, total_deposit_points, total_fixed_term_subscriptions, total_fixed_term_subscriptions_points, total_non_subscriptions, total_non_subscriptions_points, total_paid, total_paid_points, total_payable, total_payable_points, total_remaining_subscriptions, total_remaining_subscriptions_points, total_shipping, total_subscriptions, total_subscriptions_points, url.

Order item

Built from OrderItem. Reached through order.items, fulfillment_item.order_item. For what each attribute returns, see the storefront order item object.

Available: bundle_lead?, bundle_items, delivery_date, delivery_day, delivery_time, id, in_bundle?, name, notes, order, pricebook_entry, pricing, product, quantity, reserved_product?, subscription_term_count, unit_price_incl_tax, unit_price_excl_tax.

Raises: bookable?, bookable_event, custom_forms, delivery_window, subscription.

Fulfillment

Built from s_c__Shipment__c. Reached through order.fulfillments. For what each attribute returns, see the storefront fulfillment object.

Available: destination_outlet, fulfillment_type, fulfillment_items, id, notes, order, reference, requested_delivery_date, shipping_charge, shipping_city, shipping_cost, shipping_country, shipping_notes, shipping_postal_code, shipping_provider_name, shipping_provider_service, shipping_recipient_name, shipping_state, shipping_street, source_outlet, status, status_changed_at, tracking?, tracking_code, tracking_provider, tracking_public_url, tracking_status, tracking_tracker_uid, tracking_updated_at.

Raises: last_lodgement_error_at, lodgement_errors, path, shipping_rate, stock_location.

Fulfillment item

Built from s_c__Fulfillment_Item__c. Reached through fulfillment.fulfillment_items. For what each attribute returns, see the storefront fulfillment item object.

Available: name, quantity, fulfillment, order_item, in_bundle?, bundle_lead?, bundle_anchor?, bundle_lead_present?, bundle_items.

Payment

Built from s_c__Payment__c. Reached through order.payments. For what each attribute returns, see the storefront payment object.

Available: amount, amount_tendered, change_given, currency_code, description, id, invoice_reference, gateway_receipt, invoice_url, order, paid_at, payment_method, payment_provider, payment_installments, total_captured, remaining_to_capture, points_amount, status, surcharge_amount, transaction_number, wallet_type.

Raises: account_credit_path, instructions_content.

Payment installment

Built from s_c__Payment_Installment__c. Reached through payment.payment_installments.

Available: amount, captured_at, id, status, transaction_number.

Payment provider

Built from s_c__Payment_Provider__c. Reached through payment.payment_provider. For what each attribute returns, see the storefront payment provider object.

Available: active?, channels, code, id, name, position.

Raises: description_content, payment_instructions_content, supports_express_checkout?, supports_recurring_payments?, valid_payment_method?, validation_errors.

Contact

Built from Contact. Reached through current_customer, cart.contact, order.contact, record on a customer layout. For what each attribute returns, see the storefront contact object.

Available: account, can_purchase_for_account?, can_use_account_credit?, can_use_account_points?, can_use_account_pricing?, email, firstname, id, last_login_date, lastname, mailing_city, mailing_country, mailing_postal_code, mailing_state, mailing_street, mobile_phone, name, phone, sso_provider, terms_accepted_on, username.

Raises: campaigns, fulfillments, has_login?, mailing_address_lines, membership, orders, subscriptions.

Account

Built from Account. Reached through current_account, contact.account, order.account. For what each attribute returns, see the storefront account object.

Available: active?, billing_city, billing_country, billing_postal_code, billing_state, billing_street, brand?, credit_hold?, id, location?, name, pay_by_account?, phone, shipping_city, shipping_country, shipping_postal_code, shipping_state, shipping_street, subdomain, supplier?, supplier_notes, tax_entity_code.

Raises: account_credits, account_points, billing_address_lines, logo, membership, orders, pricebook, product_approvals, shipping_address_lines.

Product

Built from Product2. Reached through all_products, cart_item.product, order_item.product. For what each attribute returns, see the storefront product object.

Available: barcode, bookable?, bundle_anchor?, bundle_lead?, has_nested_bundles?, condition, discontinued?, downloads_content, features_content, fixed_term_subscription?, id, identifier, master?, maximum_quantity, meta_description, meta_keywords, meta_title, name, product_code, shipping_dimensions_unit, shipping_height, shipping_length, shipping_methods, shipping_weight, shipping_weight_unit, shipping_width, slug, specifications_content, subscription?, summary_content, supplier_code, support_content, track_inventory?, upc, variant?, variant_title, warranty_content, documents, files, image, images, master, media, pricebook_entry, pricing, social_image, variant_documents, variant_files, variant_images, variant_media, variants, variant_videos, videos.

Raises: add_to_cart_text, approval_status, available_for_pickup?, buy_it_now_text, can_add_to_cart?, can_pickup?, can_purchase?, can_request_quote?, can_select_quantity?, can_ship?, current_approved_quantity, downloads_label, features_label, on_backorder?, out_of_stock?, out_of_stock_text, path, pending_approval_date, restricted?, restricted_text, search_description, specifications_label, support_label, total_available_to_sell, unavailable_text, url, warranty_label, brand, categories, content_blocks, custom_forms, location_groups, memberships, pickup_locations, product_bookable_locations, product_features, related_products, tags, trait_groups, traits, variant_choices, variant_options, variant_types.

Product pricing

Reached through product.pricing, order_item.pricing. For what each attribute returns, see the storefront product pricing object.

Available: bonus_earn_points, can_earn_points?, can_purchase_with_currency?, can_purchase_with_points?, checkout_earn_points, checkout_points, checkout_price, deposit_amount, deposit_points, deposit_required?, earn_points, fixed_term_subscription?, has_price?, hide_price?, hide_price_text, original_points, original_price, points, points_bonus?, points_sale?, price, price_excl_tax, product, purchase_points, subscription?, subscription_term, subscription_term_count, subscription_term_unit, subscription_total_points, subscription_total_price, tax_inclusive?, total_earn_points, use_currency?, use_points?.

Raises: has_sale_points?, has_sale_price?, on_sale?, price_range, sale_price, sale_purchase_points, variable_pricing?, variable_pricing_amounts, variable_pricing_custom_allowed?.

Price book

Built from Pricebook2. Reached through current_pricebook, pricebook_entry.pricebook. For what each attribute returns, see the storefront price book object.

Available: id, add_to_cart_text, buy_it_now_text, currency, hide_price_text, name, out_of_stock_text, tax_method, unavailable_text, active?, standard?, default_earn_rate, default_purchase_rate, order_quantity_maximum, tax_zone, pricebook_entries.

Price book entry

Built from PricebookEntry. Reached through product.pricebook_entry, order_item.pricebook_entry, pricebook.pricebook_entries. For what each attribute returns, see the storefront price book entry object.

Available: id, add_to_cart_text, buy_it_now_text, can_earn_points?, can_purchase_with_currency?, can_purchase_with_points?, currency, deposit_amount, deposit_points, disable_quantity_selection?, display_if_restricted?, earn_points, earn_points_bonus, enable_variable_pricing?, hide_price?, hide_price_text, minimum_sell_price, name, order_quantity_maximum, out_of_stock_text, percentage, productcode, purchase_points, purchase_points_sale, restricted?, restricted_text, sale_price, tax_method, unitprice, active?, use_standard_price?, variable_pricing_options, pricebook, product, tax_zone.

Zone

Built from s_c__Zone__c. Reached through pricebook.tax_zone, pricebook_entry.tax_zone. For what each attribute returns, see the storefront zone object.

Available: id, name.

Medium

Built from s_c__Media__c. Reached through product.media, product.variant_media. For what each attribute returns, see the storefront medium object.

Available: the file attributes, plus document, document?, file, file?, file_type, image, image?, video, video?.

Raises: download_url.

File

Built from s_c__Media__c. Reached through product.files, medium.file. For what each attribute returns, see the storefront file object.

Available: alt_text, description, file_type, id, name, url.

Image

Built from s_c__Media__c. Reached through product.image, product.images, medium.image. For what each attribute returns, see the storefront image object.

Available: the file attributes, plus pico_url, tiny_url, icon_url, thumb_url, small_url, medium_url, large_url, huge_url, massive_url, srcset, width, height, aspect_ratio.

Video

Built from s_c__Media__c. Reached through product.videos, medium.video. For what each attribute returns, see the storefront video object.

Available: the file attributes, plus key_frame_seconds.

Raises: embed_url, thumb_url, type.

Was this article helpful?

Was this article helpful?