Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions src/pages/graphql/schema/customer/queries/customer.md
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,62 @@ These topics contain examples with fragments and provide even more details:
}
```

### Search a customer's order history

<Fragment src="../includes/saas-only.md"/>

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@keharper, thank you for checking. Actually, this feature is currently available only in PaaS. The SCP module has been released in versions 4.7.16, 4.8.29, and 4.9.4, but the SaaS update is still pending and is expected in the next 2-3 weeks. I'll let you know once it's available in SaaS.
After we update this badge for PaaS, I believe we'll be good to merge. CC: @cod40403

Release: https://magento.slack.com/archives/C03J16UAEHZ/p1786431100542339


The following example uses the `search` filter to return orders matching a term against the order number or an item's product name or SKU. `search` is combined with other filters, such as `status`, using AND logic. The matched item is included in the response to show why the order matched the search term.

**Request:**

```graphql
{
customer {
orders(filter: {search: "shirt", status: {eq: "complete"}}) {
total_count
items {
id
number
order_date
status
items {
product_name
product_sku
}
}
}
}
}
```

**Response:**

```json
{
"data": {
"customer": {
"orders": {
"total_count": 1,
"items": [
{
"id": "MQ==",
"number": "000000001",
"order_date": "2020-11-14 22:25:48",
"status": "Complete",
"items": [
{
"product_name": "Aria Flannel Shirt",
"product_sku": "MS12-M-Blue"
}
]
}
]
}
}
}
}
```

### Retrieve the store credit history

The following example returns the store credit history for the logged-in user.
Expand Down
Loading