Skip to content

Comments

Improvement: Add support for includeClosed and assignedLocationId filters in get#FulfillmentOrdersByOrderId#188

Open
puru-khedre wants to merge 4 commits intohotwax:mainfrom
puru-khedre:improve-get-fulfillment-order
Open

Improvement: Add support for includeClosed and assignedLocationId filters in get#FulfillmentOrdersByOrderId#188
puru-khedre wants to merge 4 commits intohotwax:mainfrom
puru-khedre:improve-get-fulfillment-order

Conversation

@puru-khedre
Copy link
Contributor

Closes: #181

This PR improves the get#FulfillmentOrdersByOrderId flow by adding support for two filters:

  • includeClosed (Boolean, default true) → lets exclude/include the CLOSED fulfillment orders.
  • assignedLocationId → filters fulfillment orders assigned to a specific Shopify location (converted to GID via ShopifyHelper).

Template updated to pass these as query params, so filtering happens at the API level.
Backward compatible with old behavior.

Changes:

  • Updated service parameters in ShopifyFulfillmentServices.xml.
  • Added query-building logic in ShopifyTemplateData.xml to include these filters.

@@ -391,14 +391,20 @@
<fileData>
<![CDATA[<#ftl output_format="HTML">
<@compress single_line=true>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we exclude more than one status ?

excludeStatus(List)

If more than one status can be excluded, then name the variable excludeStatusList else excludeStatus

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shopify supports multiple conditions,
but it does not support operators like in or not-in.

If we want to accept a list excluded status,
then we’ll need to join it using the OR or AND operator.

Example:
Suppose the excluded list has OPEN and CLOSED statuses.
In that case, we need to prepare the query as: query: "-status:OPEN AND -status:CLOSED"

Copy link
Contributor Author

@puru-khedre puru-khedre Sep 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that, instead of being tied to just one status, having an excludeStatus list would allow for better handling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add filters for Closed & Assigned Location ID in getFulfillmentOrdersByOrderId service

2 participants