Custom Fields + JQL Support

Custom Fields + JQL Support

The main data of a Shoppie order is stored in the work item entity property, saved as an issue property. This property is automatically indexed and provides several JQL aliases, making it easy to search and filter orders.

orderStatus → indexes the current order status, which can be one of the following values:

"inprogress", "approved", "completed", "declined"

orderTotal → indexes the total value of items in the order, corresponding to the cart.totalPrice value in the entity property.

orderId → indexes the automatically generated UUID assigned to the order. It can be used in JQL to filter work items with or without an order, e.g., orderId IS EMPTY.

Other properties of the order are difficult to search using JQL or cannot be indexed at all. To address this, Shoppie provides several Custom Fields locked with searchable values. These fields are read-only, and their values can only be set by Shoppie.

image-20250722-135538.png

These fields are searchable without being added to any screens. When the order is edited through the Order panel, Shoppie automatically refreshes the field values. If the order is updated through other methods, such as the Jira REST API in an automation rule or an external script, you need to trigger a field refresh manually by calling a Shoppie webhook.

image-20250722-140623.png
You can find the webhook URL and secret in the Shoppie configuration section
image-20250722-140844.png
Example: Invoking the webhook from an automation rule

The fields provide powerful options for filtering and searching work items based on Shoppie order data. However, complex searches such as finding orders with a specific quantity of a specific asset are not possible without additional processing. To support this, Shoppie includes a shoppieQuery JQL function that lets you write advanced queries using a simple, intuitive syntax to narrow down your results.

image-20250722-142453.png
Searching for orders containing at least 1 but more than 10 instances of an asset called ‘Test'

The full syntax of the query is:

asset: <id | name>[, <id | name>...] status: <value>[, <value>...] catalog: <catalogName>[, <catalogName>...] count: <number | comparison>[, <number | comparison>...] type: <objectTypeId | objectTypeName>[, <objectTypeId | objectTypeName>...]