> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.shopify.orders.CountOrders

- Component: `appmixer.shopify.orders.CountOrders`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.shopify 4.1.0](https://connectors.appmixer.com/connector/appmixer.shopify/4.1.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.shopify/4.1.0/component/appmixer.shopify.orders.CountOrders>

Count the orders matching a Shopify search query and filters.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Search Query (`query`) | text | Optional Shopify order search query, for example `email:jane@example.com`, `tag:wholesale` or `name:#1001`. See the [order search syntax](https://shopify.dev/docs/api/admin-graphql/latest/queries/orders#argument-query). Combined with the filters below; leave everything empty for all orders. |
| Status (`status`) | select | Only orders with this status. |
| Financial Status (`financialStatus`) | select | Only orders with this payment status. Unpaid = authorized, pending or partially paid. |
| Fulfillment Status (`fulfillmentStatus`) | select | Only orders with this fulfillment status. |
| Customer (`customerId`) | text | Only orders of this customer. Pick a customer, or enter the customer ID (global or numeric). |
| Created After (`createdAtMin`) | date-time | Only orders created at or after this time. |
| Created Before (`createdAtMax`) | date-time | Only orders created at or before this time. |
| Updated After (`updatedAtMin`) | date-time | Only orders last updated at or after this time. |
| Updated Before (`updatedAtMax`) | date-time | Only orders last updated at or before this time. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| Count (`count`) | integer | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.shopify.orders.CountOrders",
  "description": "Count the orders matching a Shopify search query and filters.",
  "author": "Jimoh Damilola <jimoh@client.io>",
  "private": false,
  "auth": {
    "service": "appmixer:shopify",
    "scope": [
      "read_orders"
    ]
  },
  "quota": {
    "manager": "appmixer:shopify",
    "resources": "requests",
    "scope": {
      "userId": "{{userId}}"
    }
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "maxLength": 16384
          },
          "status": {
            "type": "string",
            "enum": [
              "any",
              "open",
              "closed",
              "cancelled"
            ]
          },
          "financialStatus": {
            "type": "string",
            "enum": [
              "any",
              "authorized",
              "pending",
              "paid",
              "partially_paid",
              "refunded",
              "partially_refunded",
              "voided",
              "expired",
              "unpaid"
            ]
          },
          "fulfillmentStatus": {
            "type": "string",
            "enum": [
              "any",
              "shipped",
              "partial",
              "unshipped",
              "unfulfilled",
              "fulfilled",
              "scheduled",
              "on_hold",
              "request_declined"
            ]
          },
          "customerId": {
            "type": "string"
          },
          "createdAtMin": {
            "type": "string",
            "format": "date-time"
          },
          "createdAtMax": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAtMin": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAtMax": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "inspector": {
        "inputs": {
          "query": {
            "type": "text",
            "label": "Search Query",
            "index": 1,
            "tooltip": "Optional Shopify order search query, for example <code>email:jane@example.com</code>, <code>tag:wholesale</code> or <code>name:#1001</code>. See the <a href=\"https://shopify.dev/docs/api/admin-graphql/latest/queries/orders#argument-query\" target=\"_blank\">order search syntax</a>. Combined with the filters below; leave everything empty for all orders."
          },
          "status": {
            "type": "select",
            "label": "Status",
            "index": 2,
            "defaultValue": "any",
            "tooltip": "Only orders with this status.",
            "options": [
              {
                "value": "any",
                "label": "Any"
              },
              {
                "value": "open",
                "label": "Open"
              },
              {
                "value": "closed",
                "label": "Closed (archived)"
              },
              {
                "value": "cancelled",
                "label": "Cancelled"
              }
            ]
          },
          "financialStatus": {
            "type": "select",
            "label": "Financial Status",
            "index": 3,
            "defaultValue": "any",
            "tooltip": "Only orders with this payment status. Unpaid = authorized, pending or partially paid.",
            "options": [
              {
                "value": "any",
                "label": "Any"
              },
              {
                "value": "authorized",
                "label": "Authorized"
              },
              {
                "value": "pending",
                "label": "Pending"
              },
              {
                "value": "paid",
                "label": "Paid"
              },
              {
                "value": "partially_paid",
                "label": "Partially paid"
              },
              {
                "value": "refunded",
                "label": "Refunded"
              },
              {
                "value": "partially_refunded",
                "label": "Partially refunded"
              },
              {
                "value": "voided",
                "label": "Voided"
              },
              {
                "value": "expired",
                "label": "Expired"
              },
              {
                "value": "unpaid",
                "label": "Unpaid"
              }
            ]
          },
          "fulfillmentStatus": {
            "type": "select",
            "label": "Fulfillment Status",
            "index": 4,
            "defaultValue": "any",
            "tooltip": "Only orders with this fulfillment status.",
            "options": [
              {
                "value": "any",
                "label": "Any"
              },
              {
                "value": "shipped",
                "label": "Shipped (fulfilled)"
              },
              {
                "value": "partial",
                "label": "Partially fulfilled"
              },
              {
                "value": "unshipped",
                "label": "Unshipped"
              },
              {
                "value": "unfulfilled",
                "label": "Unfulfilled or partially fulfilled"
              },
              {
                "value": "scheduled",
                "label": "Scheduled"
              },
              {
                "value": "on_hold",
                "label": "On hold"
              },
              {
                "value": "request_declined",
                "label": "Request declined"
              }
            ]
          },
          "customerId": {
            "type": "text",
            "label": "Customer",
            "index": 5,
            "tooltip": "Only orders of this customer. Pick a customer, or enter the customer ID (global or numeric).",
            "source": {
              "url": "/component/appmixer/shopify/customers/FindCustomers?outPort=out",
              "data": {
                "messages": {
                  "in/outputType": "array"
                },
                "properties": {
                  "isSource": true
                },
                "transform": "./FindCustomers#customersToSelectArray"
              }
            }
          },
          "createdAtMin": {
            "type": "date-time",
            "label": "Created After",
            "index": 6,
            "tooltip": "Only orders created at or after this time."
          },
          "createdAtMax": {
            "type": "date-time",
            "label": "Created Before",
            "index": 7,
            "tooltip": "Only orders created at or before this time."
          },
          "updatedAtMin": {
            "type": "date-time",
            "label": "Updated After",
            "index": 8,
            "tooltip": "Only orders last updated at or after this time."
          },
          "updatedAtMax": {
            "type": "date-time",
            "label": "Updated Before",
            "index": 9,
            "tooltip": "Only orders last updated at or before this time."
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "schema": {
        "type": "object",
        "required": [
          "count"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "title": "Count",
            "example": 42
          }
        }
      }
    }
  ],
  "icon": "(data URI omitted)"
}
```
