Need to add a customAttributes to order.lineItems 'Start' in the POS.

Topic summary

Goal: capture a rental “Start” date on POS-created orders so it appears as a line item custom attribute (customAttributes), matching online checkout behavior.

Context and constraints:

  • BookThatApp sets the “Start” attribute during online checkout; POS orders don’t trigger this, so the attribute is missing.
  • Shopify Flow can read line item properties but cannot modify order line items post-creation.
  • Liquid email template confirms online orders include customAttributes (e.g., key: Start, value: 07/21/2024), while POS orders do not.

Proposed solution:

  • Implement a POS UI Extension (smart tile) to interact with the cart.
  • Use the cartAPI method addLineItemProperties to add the “Start” key/value to POS cart line items before checkout.
  • Reference: Shopify POS UI Extensions API (cartAPI addLineItemProperties).

Definitions:

  • Line item properties/customAttributes: key-value fields attached to items in the cart/order.
  • POS UI Extension: an app extension that adds UI components in Shopify POS.
  • cartAPI: POS extension API to read/modify the POS cart.
  • Shopify Flow: automation tool; not able to edit line items.

Status: A clear path (POS UI Extension + cartAPI) is provided; no confirmation of implementation yet, so the thread remains open.

Summarized with AI on December 23. AI used: gpt-5.

We use an Online app BookThatApp for our webstore that handles rentals and tracks when a booking starts with a custom attribute of Start and the date the rental started.
When the POS creates such a rental, the online app doesn’t trigger (as the custom function that handles adding the custom field is part of the online checkout cart) but it seems to me I ought to be able to have either a flow that adds the custom field if orders with rentals are created, or have some POS App API function that does it.

For Flow, there seems to be no way to alter an order line item, but I can see it if it is there - eg in email to staff I can:

{% for li in order.lineItems %}
{% for ca in li.customAttributes %}
{{ ca.key }}
{{ ca.value }}
{% endfor %}{% endfor %}

Prints

    Start
    07/21/2024

I hope I am missing something. ( so for rental orders created online, this data is present, but for orders created in the POS for the same rental product, it is absent.)

And I got rather tangled up in the weeds of how to create a POS App API that does this given the nature of Shopify reference documentation.

so how to proceed?

Thanks for looking.

|\/|ark

Hi Mark,

There is a way to edit order line item in POS. You create what’s called a POS UI Extension. This adds a smart tile to your POS that exposes the cartAPI: https://shopify.dev/docs/api/pos-ui-extensions/2024-04/apis/cart-api#cartapi-propertydetail-addlineitemproperties

Hi @ConundrumHouse,

I’ve created an app that allows users to add customizations to products and the cart when selling with POS. It will allow you to add a start and/or end date as either a product or order/cart property when checking out via POS.

Feel free to trial it and let me know if it helps!

Here it is on the Shopify app store: POSify: Customize POS Products

All the best,

Joe