Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Customer query improvements #8353

Merged
Merged
Show file tree
Hide file tree
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
44 changes: 22 additions & 22 deletions src/_includes/graphql/customer-orders-output.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,23 @@ Attribute | Data type | Description
--- | --- | ---
`billing_address` | [OrderAddress](#OrderAddress) | The billing address for the order
`carrier` | String | The shipping carrier for the order delivery
`comments` | [[SalesCommentItem](#SalesCommentItem)] | Comments on the order
`comments` | [[SalesCommentItem]](#SalesCommentItem) | Comments on the order
`created_at` | String | Deprecated. Use the `order_date` attribute instead
`credit_memos` | [[CreditMemo](#CreditMemo)] | Contains a list of credit memos for the order
`credit_memos` | [[CreditMemo]](#CreditMemo) | Contains a list of credit memos for the order
`grand_total` | Float | Deprecated. Use the `totals.grand_total` attribute instead
`gift_message` | [GiftMessage](#GiftMessage) | The entered gift message for the order
`gift_receipt_included` | Boolean! | Indicates if the customer requested a gift receipt for the order
`gift_wrapping` | [GiftWrapping](#GiftWrapping) | The selected gift wrapping for the order
`id` | ID! | Unique identifier for the order
`increment_id` | String | Deprecated. Use the `id` attribute instead
`invoices` | [[Invoice](#Invoice)]! | Contains a list of invoices for the order
`items` | [[OrderItemInterface](#OrderItemInterface)] | An array containing the items purchased in this order
`invoices` | [[Invoice]](#Invoice)! | Contains a list of invoices for the order
`items` | [[OrderItemInterface]](#OrderItemInterface) | An array containing the items purchased in this order
`number` | String! | The order number
`order_date` | String! | The date the order was placed
`order_number` | String! | Deprecated. Use the `number` attribute instead
`payment_methods` | [[PaymentMethod](#PaymentMethod)] | Payment details for the order
`payment_methods` | [[PaymentMethod]](#PaymentMethod) | Payment details for the order
`printed_card_included` | Boolean! | Indicates if the customer requested a printed card for the order
`shipments` | [[OrderShipment](#OrderShipment)] | Shipment list for the order
`shipments` | [[OrderShipment]](#OrderShipment) | Shipment list for the order
`shipping_address` | [OrderAddress](#OrderAddress) | Shipping address for the order
`shipping_method` | String | Shipping method for the order
`status` | String! | The current status of the order
Expand All @@ -73,9 +73,9 @@ The `CreditMemo` object contains details about credit memos applied to an order.

Attribute | Data type | Description
--- | --- | ---
`comments` | [[SalesCommentItem](#SalesCommentItem)] | Comments on the credit memo
`comments` | [[SalesCommentItem]](#SalesCommentItem) | Comments on the credit memo
`id` | ID! | The unique ID of the credit memo
`items` | [[CreditMemoItemInterface](#CreditMemoItemInterface)] | An array containing details about refunded items
`items` | [[CreditMemoItemInterface]](#CreditMemoItemInterface) | An array containing details about refunded items
`number` | String! | The sequential credit memo number
`total` | [CreditMemoTotal](#CreditMemoTotal) | Contains details about the total refunded amount

Expand All @@ -95,11 +95,11 @@ Attribute | Data type | Description
--- | --- | ---
`adjustment` | Money! | An adjustment manually applied to the order
`base_grand_total` | Money! | The final base grand total amount in the base currency
`discounts` | [Discount] | The applied discounts to the order
`discounts` | [[Discount]](#Discount) | The applied discounts to the order
`grand_total` | Money! | The final total amount, including shipping, discounts, and taxes
`shipping_handling` | [ShippingHandling](#ShippingHandling) | Contains details about the shipping and handling costs for the credit memo
`subtotal` | Money! | The subtotal of the order, excluding shipping, discounts, and taxes
`taxes` | [[TaxItem](#TaxItem)]! | An array containing information about taxes on individual orders
`taxes` | [[TaxItem]](#TaxItem)! | An array containing information about taxes on individual orders
`total_shipping` | Money! | The shipping amount for the credit memo
`total_tax` | Money! | The amount of tax applied to all orders

Expand All @@ -126,9 +126,9 @@ The `Invoice` object provides details about a customer invoice.

Attribute | Data type | Description
--- | --- | ---
`comments` | [[SalesCommentItem](#SalesCommentItem)] | Comments on the invoice
`comments` | [[SalesCommentItem]](#SalesCommentItem) | Comments on the invoice
`id` | ID! | The internal ID of the invoice
`items` | [[InvoiceItemInterface](#InvoiceItemInterface)]! | Contains details about invoiced products
`items` | [[InvoiceItemInterface]](#InvoiceItemInterface)! | Contains details about invoiced products
`number` | String! | The sequential number of the invoice
`total` | [InvoiceTotal](#InvoiceTotal)! | Invoice total amount details

Expand All @@ -149,11 +149,11 @@ The InvoiceTotal object contains details about the totals of an invoice.
Attribute | Data type | Description
--- | --- | ---
`base_grand_total` | Money! | The final base grand total amount in the base currency
`discounts` | [Discount] | The applied discounts to the invoice
`discounts` | [[Discount]](#Discount) | The applied discounts to the invoice
`grand_total` | Money! | The final total amount, including shipping, discounts, and taxes
`shipping_handling` | [ShippingHandling](#ShippingHandling) | Contains details about the shipping and handling costs for the invoice
`subtotal` | Money! | The subtotal of the invoice, excluding shipping, discounts, and taxes
`taxes` | [[TaxItem](#TaxItem)] | An array containing information about taxes on individual invoices
`taxes` | [[TaxItem]](#TaxItem) | An array containing information about taxes on individual invoices
`total_shipping` | Money! | The shipping amount for the invoice
`total_tax` | Money! | The amount of tax applied to all invoices

Expand Down Expand Up @@ -227,11 +227,11 @@ Attribute | Data type | Description

Attribute | Data type | Description
--- | --- | ---
`comments` | [[SalesCommentItem](#SalesCommentItem)] | Comments added to the shipment
`comments` | [[SalesCommentItem]](#SalesCommentItem) | Comments added to the shipment
`id` | ID! | The unique ID of the shipment
`items` | [[ShipmentItemInterface](#ShipmentItemInterface)] | Contains items included in the shipment
`items` | [[ShipmentItemInterface]](#ShipmentItemInterface) | Contains items included in the shipment
`number` | String! | The sequential credit shipment number
`tracking` | [[ShipmentTracking](#ShipmentTracking)] | Contains shipment tracking detail
`tracking` | [[ShipmentTracking]](#ShipmentTracking) | Contains shipment tracking detail

#### OrderTotal attributes {#OrderTotal}

Expand All @@ -240,11 +240,11 @@ The `OrderTotal` object contains details about the sales total amounts used to c
Attribute | Data type | Description
--- | --- | ---
`base_grand_total` | Money! | The final base grand total amount in the base currency
`discounts` | [Discount] | The applied discounts to the order
`discounts` | [[Discount]](#Discount) | The applied discounts to the order
`grand_total` | Money! | The final total amount, including shipping, discounts, and taxes
`shipping_handling` | [ShippingHandling](#ShippingHandling) | The shipping and handling costs for the order
`subtotal` | Money! | The subtotal of the order, excluding shipping, discounts, and taxes
`taxes` | [[TaxItem](#TaxItem)]! | An array containing information about taxes on individual orders
`taxes` | [[TaxItem]](#TaxItem)! | An array containing information about taxes on individual orders
`total_shipping` | Money! | The shipping costs for the order
`total_tax` | Money! | The amount of tax applied to the order

Expand All @@ -254,7 +254,7 @@ The PaymentMethod data type contains details about the payment method used to pa

Attribute | Data type | Description
--- | --- | ---
`additional_data` | [[KeyValue](#KeyValue)] | Additional data per payment method type
`additional_data` | [[KeyValue]](#KeyValue) | Additional data per payment method type
`name` | String! | The label that describes the payment method
`type` | String! | The payment method code that indicates how the order was paid for

Expand Down Expand Up @@ -378,8 +378,8 @@ Attribute | Data type | Description
--- | --- | ---
`amount_excluding_tax` | Money | The shipping amount, excluding tax
`amount_including_tax` | Money | The shipping amount, including tax
`discounts` | [ShippingDiscount] | The applied discounts to the shipping
`taxes` | [[TaxItem](#TaxItem)] | Contains details about taxes applied for shipping
`discounts` | [[ShippingDiscount]](#ShippingDiscount) | The applied discounts to the shipping
`taxes` | [[TaxItem]](#TaxItem) | Contains details about taxes applied for shipping
`total_amount`| Money! | The total amount for shipping

#### TaxItem attributes {#TaxItem}
Expand Down
12 changes: 9 additions & 3 deletions src/_includes/graphql/customer-output-24.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@
{% assign customeraddress_text = '[CustomerAddress](#customerAddressOutput)' %}
{% assign customeroutput_text = '[CustomerOrders](#customerOrders)' %}
{% assign crossref_text = '. See [`orders` input attributes](#orders) for details' %}
{% assign productreview_text = '[ProductReviews](#ProductReviews)!' %}
{% assign rewardpoints_text = '[RewardPoints](#RewardPoints)' %}
{% assign wishlist_text = '[Wishlist](#Wishlist)!' %}
{% else %}
{% assign customeraddress_text = 'CustomerAddress' %}
{% assign customeroutput_text = '[CustomerOrders]' %}
{% assign crossref_text = '' %}
{% assign productreview_text = '[ProductReviews]!' %}
{% assign rewardpoints_text = '[RewardPoints]' %}
{% assign wishlist_text = '[Wishlist]!' %}
{% endif %}

Attribute | Data Type | Description
Expand All @@ -26,8 +32,8 @@ Attribute | Data Type | Description
`middlename` |String | The customer's middle name
`orders(<FilterCriteria>)` | {{ customeroutput_text }} | A list of the customer's placed orders{{ crossref_text }}
`prefix` | String | An honorific, such as Dr., Mr., or Mrs.
`reviews(pageSize: Int = 20 currentPage: Int = 1)` | ProductReviews! | The list of reviews of the product
`reward_points` | RewardPoints | Details about the customer's reward points
`reviews(pageSize: Int = 20 currentPage: Int = 1)` | {{ productreview_text }} | The list of reviews of the product
`reward_points` | {{ rewardpoints_text }} | Details about the customer's reward points
`suffix` | String | A value such as Sr., Jr., or III
`taxvat` | String | The customer's Tax/VAT number (for corporate customers)
`wishlist` | Wishlist! | Contains the contents of the customer's wish lists
`wishlist` | {{ wishlist_text }} | Contains the contents of the customer's wish lists
4 changes: 2 additions & 2 deletions src/_includes/graphql/product-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Attribute | Data Type | Description
`average_rating` | Float! | The average rating for product review
`created_at` | String! | Date indicating when the review was created
`nickname` | String! | The customer's nickname. Defaults to the customer name, if logged in
`product` | ProductInterface! | Contains details about the reviewed product
`ratings_breakdown` | [ProductReviewRating!]! | An array of ratings by rating category, such as quality, price, and value
`product` | [ProductInterface!]({{ page.baseurl }}/graphql/interfaces/product-interface.html)| Contains details about the reviewed product
`ratings_breakdown` | [[ProductReviewRating!]](#ProductReviewRating)! | An array of ratings by rating category, such as quality, price, and value
`summary` | String! | The summary (title) of the review
`text` | String! | The review text

Expand Down
2 changes: 1 addition & 1 deletion src/guides/v2.3/graphql/queries/customer.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ The `customer` object can contain the following attributes:

Attribute | Data type | Description
--- | --- | ---
`items` | [[WishlistItem](#wishlistitem)] | An array of items in the customer's wish list
`items` | [[WishlistItem]](#wishlistitem) | An array of items in the customer's wish list
`items_count` | Int | The number of items in the wish list
`id` | ID | The unique identifier of the wish list
`sharing_code` | String | An encrypted code that Magento uses to link to the wish list
Expand Down
2 changes: 1 addition & 1 deletion src/guides/v2.4/graphql/interfaces/product-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Attribute | Data Type | Description

Attribute | Data Type | Description
--- | --- | ---
`items` | [ProductReview]! | An array of product reviews
`items` | [[ProductReview]](#ProductReview)! | An array of product reviews
`page_info` | [SearchResultPageInfo!]({{page.baseurl}}/graphql/queries/products.html#SearchResultPageInfo) | Metadata for pagination rendering

#### ProductReview object {#ProductReview}
Expand Down
4 changes: 2 additions & 2 deletions src/guides/v2.4/graphql/queries/customer.md
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ Attribute | Data Type | Description

Attribute | Data Type | Description
--- | --- | ---
`items` | [ProductReview]! | An array of product reviews
`items` | [[ProductReview]](#ProductReview)! | An array of product reviews
`page_info` | [SearchResultPageInfo!]({{page.baseurl}}/graphql/queries/products.html#SearchResultPageInfo) | Metadata for pagination rendering

#### ProductReview object {#ProductReview}
Expand All @@ -633,7 +633,7 @@ Attribute | Data Type | Description

Attribute | Data type | Description
--- | --- | ---
`items` | [[WishlistItem](#wishlistitem)] | An array of items in the customer's wish list
`items` | [[WishlistItem]](#wishlistitem) | An array of items in the customer's wish list
`items_count` | Int | The number of items in the wish list
`id` | ID | The unique identifier of the wish list
`sharing_code` | String | An encrypted code that Magento uses to link to the wish list
Expand Down