Set Custom ID on Resulting Order

Hello team,

I have a feature request, not sure how feasible this is but here it goes anyway - I’ve come across the concept of order custom IDs and was thinking it would be great if we could apply these at the time of cart creation on the POS, when using say bulkCartUpdate or addCartProperties for example. That way we could set our custom ID at this point and use it from then on when working with the resulting order.

Currently we are using the cart properties to store our custom ID, which then ends up in the resulting order’s note_attributes / customAttributes field, which works but we can’t query on this field, so in order to find orders using this field we have to pull a list and search manually, which of course isn’t very scalable.

Again not sure if this is feasible, or something you’d consider but it would be amazing if it was possible.

An alternative to this approach would be to allow querying orders via GQL using the customAttributes field.

Thanks!

Simon.

Hi Simon,

Shopify doesn’t currently support searching orders by customAttributes/note_attributes, there are a couple of possible workarounds:

1. Maintain an external mapping table (recommended for scalability)
When the order is created, capture the custom ID from the order (via webhook or after order creation) and store a mapping between your custom ID and the Shopify Order ID in your own database. Later, you can simply look up the Shopify Order ID using your custom ID and fetch the order directly. This approach scales well for larger integrations.

2. Store the custom ID as an order tag
If the custom ID is suitable for use as a tag, you could add it as an order tag after the order is created. Since Shopify supports searching orders by tags, you could then retrieve the order using a query such as tag:YOUR_CUSTOM_ID. This can work well for lower volumes, although it may not be ideal if every order generates a unique tag.

That said, having native support for either assigning a custom order ID during cart creation or making customAttributes searchable would certainly be a cleaner and more efficient solution. I think it would be a valuable enhancement for POS and external system integrations.

Hey @simon_b - thanks for sharing this. I can see the utility a feature like this would bring, especially when finding the resulting Order without retrieving and inspecting a larger set of orders.

I’m digging further into the POS-specific behaviour. Shopify supports custom IDs on Orders through metafields, but the POS Cart API currently exposes cart properties, but not cart metafields. This means a POS extension can’t supply the source cart metafield needed for the cart-to-order copy process and the functionality doesn’t currently exist for properties. I’m going to share this feedback internally and will follow up here when I have more information.

Awesome thanks @Wes-Dev-Shopify being able to apply metafields to the cart from POS that would eventually end up on the resulting order would be amazing if it could be included.

@Priyanka_Rawat thank you for the response, those are some nice workarounds. #1 I am actually doing already, but we have to wait for a webhook or send another request ourselves to fetch the order number after the cart, and search through the orders to find the one we put the custom property on.

If we could query on customAttributes or set the custom ID on a query-able field from the cart that would be much better.