diff --git a/src/_data/toc/graphql.yml b/src/_data/toc/graphql.yml index 9b4e18c7c84..a6a825c826e 100644 --- a/src/_data/toc/graphql.yml +++ b/src/_data/toc/graphql.yml @@ -195,6 +195,16 @@ pages: edition: b2b-only exclude_versions: [ "2.3" ] + - label: addReturnComment mutation + url: /graphql/mutations/add-return-comment.html + edition: ee-only + exclude_versions: ["2.3"] + + - label: addReturnTracking mutation + url: /graphql/mutations/add-return-tracking.html + edition: ee-only + exclude_versions: ["2.3"] + - label: addSimpleProductsToCart mutation url: /graphql/mutations/add-simple-products.html @@ -375,6 +385,11 @@ pages: url: /graphql/mutations/remove-products-from-wishlist.html exclude_versions: ["2.3"] + - label: removeReturnTracking mutation + url: /graphql/mutations/remove-return-tracking.html + edition: ee-only + exclude_versions: ["2.3"] + - label: removeRewardPointsFromCart mutation url: /graphql/mutations/remove-reward-points.html edition: ee-only @@ -392,13 +407,18 @@ pages: url: /graphql/mutations/request-password-reset-email.html exclude_versions: ["2.3"] - - label: revokeCustomerToken mutation - url: /graphql/mutations/revoke-customer-token.html + - label: requestReturn mutation + url: /graphql/mutations/request-return.html + edition: ee-only + exclude_versions: ["2.3"] - label: resetPassword mutation url: /graphql/mutations/reset-password.html exclude_versions: ["2.3"] + - label: revokeCustomerToken mutation + url: /graphql/mutations/revoke-customer-token.html + - label: sendEmailToFriend mutation url: /graphql/mutations/send-email-to-friend.html diff --git a/src/_includes/graphql/customer-orders-output.md b/src/_includes/graphql/customer-orders-output.md index 26dcb1ba377..218c73e310f 100644 --- a/src/_includes/graphql/customer-orders-output.md +++ b/src/_includes/graphql/customer-orders-output.md @@ -45,21 +45,23 @@ Attribute | Data type | Description `carrier` | String | The shipping carrier for the order delivery `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 -`grand_total` | Float | Deprecated. Use the `totals.grand_total` attribute instead +`credit_memos` | [[CreditMemo](#CreditMemo)] | Contains a list of credit memos for the order `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! | The unique ID for a `CustomerOrder` object +`grand_total` | Float | Deprecated. Use the `totals.grand_total` attribute instead +`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 +`items_eligible_for_return` | [[OrderItemInterface](#OrderItemInterface)] | A list of order items eligible to be in a return request `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 `printed_card_included` | Boolean! | Indicates if the customer requested a printed card for the order -`shipments` | [[OrderShipment]](#OrderShipment) | Shipment list for the order +`returns (pageSize = 20 Int, currentPage = 1 Int)` | [Returns](#Returns) | Return requests associated with this 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 diff --git a/src/_includes/graphql/customer-output-24.md b/src/_includes/graphql/customer-output-24.md index bf8d1f6f1b2..0e09afb212b 100644 --- a/src/_includes/graphql/customer-output-24.md +++ b/src/_includes/graphql/customer-output-24.md @@ -33,7 +33,9 @@ Attribute | Data Type | Description `middlename` |String | The customer's middle name `orders(filter CustomerOrdersFilterInput, currentPage = 1 Int, pageSize = 20 Int)` | {{ 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)` | {{ productreview_text }} | The list of reviews of the product +`return(uid: ID!)` | Return | Gets details about the specified return request +`returns(pageSize: Int = 20 currentPage: Int = 1)` | Returns | Information about the customer's return requests +`reviews(pageSize: Int = 20 currentPage: Int = 1)` | ProductReviews! | 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) diff --git a/src/_includes/graphql/return.md b/src/_includes/graphql/return.md new file mode 100644 index 00000000000..a760ac4cd24 --- /dev/null +++ b/src/_includes/graphql/return.md @@ -0,0 +1,109 @@ +The `Return` object can contain the following attributes: + +Attribute | Data Type | Description +--- | --- | --- +`available_shipping_carriers` | [ReturnShippingCarrier] | A list of shipping carriers available for returns +`comments`| [ReturnComment] | A list of comments posted for the return request +`created_at` | String! | The date the return was requested +`customer_email` | String! | Email of the person who created the return request +`customer` | [ReturnCustomer](#ReturnCustomer) | The name of the person who requested the return +`items`| [[ReturnItem]](#ReturnItem) | A list of items being returned +`number` | String! | Human-readable return number +`order` | [CustomerOrder]({{page.baseurl}}/graphql/queries/customer.html#orders) | The order associated with the return +`shipping` | [ReturnShipping](#ReturnShipping) | Shipping information for the return +`status` | ReturnStatus | An enum indicating the status of the return request. Possible values are APPROVED, AUTHORIZED, CLOSED, DENIED, PARTIALLY_APPROVED, PARTIALLY_AUTHORIZED, PARTIALLY_RECEIVED, PARTIALLY_REJECTED, PENDING, PROCESSED_AND_CLOSED, RECEIVED, and REJECTED +`uid` | ID! | The unique ID of a `Return` object + +#### ReturnComment attributes {#ReturnComment} + +The ReturnComment object provides details about an individual comment in a refund request. Comments can be added by a customer or the merchant. + +Attribute | Data Type | Description +--- | --- | --- +`author_name` | String! | The name or author who posted the comment +`created_at` | String! | The date and time the comment was posted +`text` | String! | The contents of the comment +`uid` | ID! | The unique ID of a `ReturnComment` object + +#### ReturnCustomAttribute attributes {#ReturnCustomAttribute} + +Attribute | Data Type | Description +--- | --- | --- +`label` | String! | A description of the attribute +`uid` | ID! | The unique ID of a `ReturnCustomAttribute` attribute +`value` | String! | A JSON-encoded value of the attribute + +#### ReturnCustomer attributes {#ReturnCustomer} + +The ReturnCustomer object contains information about the person requesting a return. + +Attribute | Data Type | Description +--- | --- | --- +`email` | String! | The email address of the refund requester +`firstname` | String | The first name of the refund requester +`lastname` | String | The last name of the refund requester + +#### ReturnItem attributes {#ReturnItem} + +The ReturnItem object provides details about an individual item in a return request. + +Attribute | Data Type | Description +--- | --- | --- +`custom_attributes` | [[ReturnCustomAttribute]](#ReturnCustomAttribute) | Return item custom attributes that are visible on the storefront +`order_item` | [OrderItemInterface!]({{page.baseurl}}/graphql/interfaces/order-item-interface.html) | Provides access to the product being returned, including information about selected and entered options +`quantity` | Float! | The quantity of the item the merchant authorized to be returned +`request_quantity` | Float! | The quantity of the item requested to be returned +`status`| ReturnItemStatus! | An enum indicating the return status of the item. Possible values are APPROVED, AUTHORIZED, DENIED, PENDING, RECEIVED, and REJECTED +`uid`| ID! | The unique ID of an item of a `Return` object + +#### ReturnShipping attributes {#ReturnShipping} + +The ReturnShipping object can contain the merchant's shipping address and tracking information. + +Attribute | Data Type | Description +--- | --- | --- +`address`| [ReturnShippingAddress](#ReturnShippingAddress) | The merchant-defined return shipping address +`tracking(uid: ID)` | [[ReturnShippingTracking](#ReturnShippingTracking)] | The unique ID for a `ReturnShippingTracking` object. If a single UID is specified, contains a single tracking record. Otherwise, contains all tracking information + +#### ReturnShippingAddress attributes {#ReturnShippingAddress} + +The ReturnShippingAddress object defines the merchant address for receiving returned items. + +Attribute | Data Type | Description +--- | --- | --- +`city` | String! | The city for product returns +`contact_name` | String | The merchant's contact person +`country` | Country! | An object that defines the country for product returns +`postcode` | String! | The postal code for product returns +`region` | Region! | An object that defines the state or province for product returns +`street` | [String]! | The street address for product returns +`telephone` | String | The telephone number for product returns + +#### ReturnShippingCarrier attributes {#ReturnShippingCarrier} + +The ReturnShippingCarrier object contains details about the shipping carrier used to return a product. + +Attribute | Data Type | Description +--- | --- | --- +`label` | String! | A description of the shipping carrier +`uid` | ID! | The unique ID of a `ReturnShippingCarrier` object + +#### ReturnShippingTracking attributes {#ReturnShippingTracking} + +The ReturnShippingTracking object contains tracking information for an approved return. + +Attribute | Data Type | Description +--- | --- | --- +`carrier` | [ReturnShippingCarrier!](#ReturnShippingCarrier) | Contains details of a shipping carrier +`status` | [ReturnShippingTrackingStatus](#ReturnShippingTrackingStatus) | Contains details about the status of a shipment +`tracking_number` | String! | A tracking number assigned by the carrier +`uid` | ID! | The unique ID assigned of a `ReturnShippingTracking` object + +#### ReturnShippingTrackingStatus attributes {#ReturnShippingTrackingStatus} + +The ReturnShippingTrackingStatus object contains tracking status information for an approved return. + +Attribute | Data Type | Description +--- | --- | --- +`text` | String! | Text that describes the status +`type` | ReturnShippingTrackingStatusType! | An enum indicating whether the status type is INFORMATIONAL or an ERROR diff --git a/src/_includes/graphql/store-config.md b/src/_includes/graphql/store-config.md index 7af85a072eb..7ea020cc856 100644 --- a/src/_includes/graphql/store-config.md +++ b/src/_includes/graphql/store-config.md @@ -72,6 +72,7 @@ Attribute | Data Type | Description | Default or example value `product_reviews_enabled` | String | Indicates whether product reviews are enabled. Possible values: 1 (Yes) and 0 (No) | 1 `product_url_suffix` | String | The suffix applied to product pages, such as `.htm` or `.html` | `.html` `required_character_classes_number` | String | The number of different character classes required in a password (lowercase, uppercase, digits, special characters).
Configuration path: customer/password/required_character_classes_number | 2 +`returns_enabled` | String! | Indicates whether RMA is enabled on the storefront. Possible values: enabled/disabled | Disabled `root_category_id` | Int | Deprecated. Use `root_category_uid` instead. The ID of the root category | 2 `root_category_uid` | Int | The unique ID for the root category object implementing `CategoryInterface` | 2 `sales_fixed_product_tax_display_setting` | [FixedProductTaxDisplaySettings](#FixedProductTaxDisplaySettings) | Corresponds to the **Display Prices In Sales Modules** field. It indicates how Fixed Product Taxes information is displayed on cart, checkout, and order pages | FPT_DISABLED diff --git a/src/guides/v2.4/graphql/mutations/add-return-comment.md b/src/guides/v2.4/graphql/mutations/add-return-comment.md new file mode 100644 index 00000000000..077bab5b306 --- /dev/null +++ b/src/guides/v2.4/graphql/mutations/add-return-comment.md @@ -0,0 +1,103 @@ +--- +group: graphql +title: addReturnComment mutation +--- + +The `addReturnComment` mutation adds a comment to an existing return request. + +## Syntax + +```graphql +mutation: { + addReturnComment(input: AddReturnCommentInput!): AddReturnCommentOutput +} +``` + +## Example usage + +The following example adds a comment in response to the merchant. + +**Request:** + +```graphql +mutation{ + addReturnComment(input: { + return_uid: "Mw==" + comment_text: "I'd like a refund"}) + { + return { + uid + status + comments { + uid + author_name + text + } + } + } +} +``` + +**Response:** + +```json +{ + "data": { + "addReturnComment": { + "return": { + "uid": "Mw==", + "status": "PENDING", + "comments": [ + { + "uid": "NQ==", + "author_name": "Customer Service", + "text": "We placed your Return request." + }, + { + "uid": "Ng==", + "author_name": "Bob Loblaw", + "text": "I want to return the shirt because I don't like the texture of the fabric" + }, + { + "uid": "Nw==", + "author_name": "Customer Service", + "text": "OK. Would you like a refund or store credit?" + }, + { + "uid": "OA==", + "author_name": "Bob Loblaw", + "text": "I'd like a refund" + } + ] + } + } + } +} +``` + +## Input attributes + +The `AddReturnCommentInput` object must contain the following attributes: + +Attribute | Data Type | Description +--- | --- | --- +`comment_text` | String! | The text added to the return request +`return_uid` | ID! | The unique ID of a `Return` object + +## Output attributes + +The `AddReturnCommentOutput` object contains the `Return` object. + +Attribute | Data Type | Description +--- | --- | --- +`return` | Return | Contains details about the modified return + +### Return object {#Return} + +{% include graphql/return.md %} + +## Related topics + +* [`requestReturn` mutation]({{page.baseurl}}/graphql/mutations/request-return.html) +* [`addReturnTracking` mutation]({{page.baseurl}}/graphql/mutations/add-return-tracking.html) +* [`removeReturnTracking` mutation]({{page.baseurl}}/graphql/mutations/remove-return-tracking.html) diff --git a/src/guides/v2.4/graphql/mutations/add-return-tracking.md b/src/guides/v2.4/graphql/mutations/add-return-tracking.md new file mode 100644 index 00000000000..47db817b6b5 --- /dev/null +++ b/src/guides/v2.4/graphql/mutations/add-return-tracking.md @@ -0,0 +1,87 @@ +--- +group: graphql +title: addReturnTracking mutation +--- + +The `addReturnTracking` mutation adds customer-entered shipping tracking information to the specified return request. Use the `available_shipping_carriers` object in the [`customer` query]({{page.baseurl}}/graphql/queries/customer.html) to retrieve valid `carrier_uid` values. + +## Syntax + +```graphql +mutation: { + addReturnTracking(input: AddReturnTrackingInput!): AddReturnTrackingOutput +} +``` + +## Example usage + +The following example adds the shipping carrier and a tracking number for the specified return request. + +**Request:** + +```graphql +mutation{ + addReturnTracking(input: { + return_uid: "Mw==" + carrier_uid: "dXBzLTE=" + tracking_number: "1Z9876543" + }){ + return_shipping_tracking { + uid + carrier { + uid + label + } + tracking_number + } + } +} +``` + +**Response:** + +```json +{ + "data": { + "addReturnTracking": { + "return_shipping_tracking": { + "uid": "Mw==", + "carrier": { + "uid": "dXBzLTE=", + "label": "United Parcel Service" + }, + "tracking_number": "1Z9876543" + } + } + } +} +``` + +## Input attributes + +The `AddReturnTrackingInput` object must contain the following attributes: + +Attribute | Data Type | Description +--- | --- | --- +`carrier_uid`| ID! | The unique ID of a `ReturnShippingCarrier` object +`return_uid` | ID! | The unique ID of a `Return` object +`tracking_number` | String! | The shipping tracking number for this return request + +## Output attributes + +The `AddReturnTrackingOutput` object contains the following attributes. + +Attribute | Data Type | Description +--- | --- | --- +`return` | [Return](#Return) | Contains details about the modified return +`return_shipping_tracking` | [ReturnShippingTracking](#ReturnShippingTracking) | Contains details about shipping for a return + +### Return object {#Return} + +{% include graphql/return.md %} + +## Related topics + +* [`requestReturn` mutation]({{page.baseurl}}/graphql/mutations/request-return.html) +* [`addReturnComment` mutation]({{page.baseurl}}/graphql/mutations/add-return-comment.html) +* [`removeReturnTracking` mutation]({{page.baseurl}}/graphql/mutations/remove-return-tracking.html) diff --git a/src/guides/v2.4/graphql/mutations/remove-return-tracking.md b/src/guides/v2.4/graphql/mutations/remove-return-tracking.md new file mode 100644 index 00000000000..f5adeab5716 --- /dev/null +++ b/src/guides/v2.4/graphql/mutations/remove-return-tracking.md @@ -0,0 +1,103 @@ +--- +group: graphql +title: removeReturnTracking mutation +--- + +The `removeReturnTracking` mutation deletes a customer-entered entry that defines the shipping carrier and tracking number for a return request. Use the [`customer` query]({{page.baseurl}}/graphql/queries/customer.html) to retrieve valid `carrier_uid` values. + +## Syntax + +```graphql +mutation: { + removeReturnTracking(input: RemoveReturnTrackingInput!): RemoveReturnTrackingOutput +} +``` + +## Example usage + +The following example removes customer-entered tracking information for the specified return request. In the response, the `shipping` object is empty because the tracking information has been deleted. + +**Request:** + +```graphql + +mutation{ + removeReturnTracking(input: { + return_shipping_tracking_uid: "Mw==" + }){ + return { + uid + shipping { + tracking { + carrier { + uid + label + } + tracking_number + status { + text + type + } + } + } + items { + order_item { + product_name + product_sku + } + } + } + } +} +``` + +**Response:** + +```json +{ + "data": { + "removeReturnTracking": { + "return": { + "uid": "Mw==", + "shipping": { + "tracking": [] + }, + "items": [ + { + "order_item": { + "product_name": "Ryker LumaTech™ Tee (Crew-neck)", + "product_sku": "MS09-M-Red" + } + } + ] + } + } + } +} +``` + +## Input attributes + +The `RemoveReturnTrackingInput` object must contain the following attributes: + +Attribute | Data Type | Description +--- | --- | --- +`return_shipping_tracking_uid` | ID! | The encoded ID of the tracking item to delete + +## Output attributes + +The `RemoveReturnTrackingOutput` object contains the following attributes. + +Attribute | Data Type | Description +--- | --- | --- +`return` | [Return](#Return) | Contains details about the modified return + +### Return object {#Return} + +{% include graphql/return.md %} + +## Related topics + +* [`requestReturn` mutation]({{page.baseurl}}/graphql/mutations/request-return.html) +* [`addReturnComment` mutation]({{page.baseurl}}/graphql/mutations/add-return-comment.html) +* [`addReturnTracking` mutation]({{page.baseurl}}/graphql/mutations/add-return-tracking.html) diff --git a/src/guides/v2.4/graphql/mutations/request-return.md b/src/guides/v2.4/graphql/mutations/request-return.md new file mode 100644 index 00000000000..8a45fa251b5 --- /dev/null +++ b/src/guides/v2.4/graphql/mutations/request-return.md @@ -0,0 +1,194 @@ +--- +group: graphql +title: requestReturn mutation +ee_only: true +--- + +The `requestReturn` mutation initiates a buyer's request to return an item for replacement or refund. The merchant subsequently decides whether to accept or reject the request. + +The following examples illustrate how to retrieve the order ID and item ID values needed to run the `requestReturn` mutation: + +* [Retrieve a summary of the customer's order history]({{page.baseurl}}/graphql/queries/customer.html#order-history) +* [Retrieve detailed information about a specific order]({{page.baseurl}}/graphql/queries/customer.html#order-details) + +{:.bs-callout-info} +Use the [`storeConfig` query]({{page.baseurl}}/graphql/queries/store-config.html) with the `returns_enabled` attribute to determine whether returned merchandise authorization (RMAs) are enabled. + +## Syntax + +```graphql +mutation { + requestReturn(input: RequestReturnInput!): RequestReturnOutput +} +``` + +## Example usage + +The following example requests a product return. At this point, the merchant hasn't taken action, but the response acknowledges the request was received. + +**Request:** + +```graphql +mutation{ + requestReturn(input: { + order_uid: "NQ==" + contact_email: "test1@example.com" + comment_text: "I want to return the shirt because I don't like the texture of the fabric" + items: { + order_item_uid: "MTE=" + quantity_to_return: 1 + } + }){ + return { + uid + items { + uid + status + request_quantity + quantity + order_item { + id + eligible_for_return + product_sku + product_sku + product_type + quantity_returned + status + } + } + number + status + comments { + uid + author_name + text + created_at + } + customer { + firstname + lastname + email + } + } + } +} +``` + +**Response:** + +```json +{ + "data": { + "requestReturn": { + "return": { + "uid": "Mw==", + "items": [ + { + "uid": "Mw==", + "status": "PENDING", + "request_quantity": 1, + "quantity": 0, + "order_item": { + "id": "MTE=", + "eligible_for_return": true, + "product_sku": "MS09-M-Red", + "product_type": "configurable", + "quantity_returned": 0, + "status": "Shipped" + } + } + ], + "number": "000000003", + "status": "PENDING", + "comments": [ + { + "uid": "NQ==", + "author_name": "Customer Service", + "text": "We placed your Return request.", + "created_at": "2020-11-19 18:20:28" + }, + { + "uid": "Ng==", + "author_name": "Bob Loblaw", + "text": "I want to return the shirt because I don't like the texture of the fabric", + "created_at": "2020-11-19 18:20:28" + } + ], + "customer": { + "firstname": "Bob", + "lastname": "Loblaw", + "email": "test1@example.com" + } + } + } + } +} +``` + +## Input attributes + +The `requestReturn` mutation requires the following input. + +Attribute | Data Type | Description +--- | --- | --- +`comment_text` | String | Text the buyer entered that describes the reason for the refund request +`contact_email` | String | An email address the buyer enters to receive notifications about the status of the return +`items`| [RequestReturnItemInput!]! |An array of items to be returned +`order_uid` | ID! | The unique ID for an `Order` object + +### RequestReturnItemInput attributes {#RequestReturnItemInput} + +The RequestReturnItemInput object + +Attribute | Data Type | Description +--- | --- | --- +`entered_custom_attributes`| [EnteredCustomAttributeInput!] | Contains details about a custom attribute that was entered, such as text or a file +`order_item_uid` | ID! | The unique ID for an `OrderItemInterface` object +`quantity_to_return` | Float! | The quantity of the item to be returned +`selected_custom_attributes` | [SelectedCustomAttributeInput!] | An array of selected custom option IDs associated with the item to be returned. For example, the IDs for the selected color and size of a configurable product + +### EnteredCustomAttributeInput attributes {#EnteredCustomAttributeInput} + +The EnteredCustomAttributeInput object + +Attribute | Data Type | Description +--- | --- | --- +`attribute_code` | String! | A string that identifies the entered custom attribute +`value` | String! | The text or other entered value + +### SelectedCustomAttributeInput attributes {#SelectedCustomAttributeInput} + +The SelectedCustomAttributeInput object +Attribute | Data Type | Description +--- | --- | --- +`attribute_code` | String! | A string that identifies the selected attribute +`value` | ID! | The unique ID for a `CustomAttribute` object + +## Output attributes + +The `RequestReturnOutput` object can contain the following attributes. + +Attribute | Data Type | Description +--- | --- | --- +`return` | Return | Contains details about a single return request") +`returns(pageSize, currentPage)` | Returns | Contains an array of return requests + +### Return attributes {#Return} + +{% include graphql/return.md %} + +### Returns attributes {#Returns} + +The `Returns` object contains an array of `Return` objects and pagination information. + +Attribute | Data Type | Description +--- | --- | --- +`items` | [Return] | A list of return requests +`page_info` SearchResultPageInfo | Pagination metadata +`total_count` | Int | The total number of return requests + +## Related topics + +* [`addReturnComment` mutation]({{page.baseurl}}/graphql/mutations/add-return-comment.html) +* [`addReturnTracking` mutation]({{page.baseurl}}/graphql/mutations/add-return-tracking.html) +* [`removeReturnTracking` mutation]({{page.baseurl}}/graphql/mutations/remove-return-tracking.html) diff --git a/src/guides/v2.4/graphql/queries/customer.md b/src/guides/v2.4/graphql/queries/customer.md index d342526e0f6..a0691eddb74 100644 --- a/src/guides/v2.4/graphql/queries/customer.md +++ b/src/guides/v2.4/graphql/queries/customer.md @@ -74,7 +74,7 @@ The following call returns information about the logged-in customer. Provide the } } ``` -### Retrieve a summary of the customer's order history +### Retrieve a summary of the customer's order history {#order-history} The following example returns a summary of the logged-in customer's previous orders. @@ -172,7 +172,7 @@ query { } ``` -### Retrieve detailed information about a specific order +### Retrieve detailed information about a specific order {#order-details} The following example returns details about one of the customer's previous orders. @@ -209,6 +209,7 @@ These topics contain examples with fragments and provide even more details: quantity_ordered quantity_invoiced quantity_shipped + eligible_for_return } carrier shipments { @@ -289,10 +290,9 @@ These topics contain examples with fragments and provide even more details: "items": [ { "id": "MQ==", - "carrier": "Flat Rate", "number": "000000001", - "order_date": "2020-03-18 17:25:20", - "status": "Complete", + "order_date": "2020-11-14 22:25:48", + "status": "Processing", "items": [ { "product_name": "Iris Workout Top", @@ -304,9 +304,11 @@ These topics contain examples with fragments and provide even more details: }, "quantity_ordered": 1, "quantity_invoiced": 1, - "quantity_shipped": 1 + "quantity_shipped": 1, + "eligible_for_return": true } ], + "carrier": "Flat Rate", "shipments": [ { "id": "MDAwMDAwMDAx", @@ -717,6 +719,10 @@ Attribute | Data Type | Description {% include graphql/customer-orders-output.md %} +#### ProductReview object {#ProductReview} + +{% include graphql/product-review.md %} + #### ProductReviews object {#ProductReviews} `ProductReviews` contains an array of reviews written about the product. @@ -726,9 +732,13 @@ Attribute | Data Type | Description `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} +### Return attributes {#Return} -{% include graphql/product-review.md %} +{% include graphql/return.md %} + +### Returns attributes {#Returns} + +The Returns object contains an array of [Return](#Return) objects. ### Store credit attributes diff --git a/src/guides/v2.4/release-notes/commerce-2-4-2.md b/src/guides/v2.4/release-notes/commerce-2-4-2.md index bd995ffdbeb..9793f033c76 100644 --- a/src/guides/v2.4/release-notes/commerce-2-4-2.md +++ b/src/guides/v2.4/release-notes/commerce-2-4-2.md @@ -90,7 +90,7 @@ This release adds GraphQL coverage for the following features: * Added support for multiple wish lists. You can use GraphQL to [create]({{ page.baseurl }}/graphql/mutations/create-wishlist.html), [delete]({{ page.baseurl }}/graphql/mutations/delete-wishlist.html), and [rename]({{ page.baseurl }}/graphql/mutations/update-wishlist.html) wish lists as well as [move]({{ page.baseurl }}/graphql/mutations/move-products-between-wishlists.html) or [copy]({{ page.baseurl }}/graphql/mutations/copy-products-between-wishlists.html) items between them. -* Added support for returned merchandise authorizations (RMA) +* Added support for returned merchandise authorizations (RMA). Shoppers can [request a return]({{page.baseurl}}/graphql/mutations/request-return.html). If the merchant accepts the request, the shopper can perform tasks such as [adding a comment]({{page.baseurl}}/graphql/mutations/add-return-comment.html) and [add tracking information]({{page.baseurl}}/graphql/mutations/add-return-tracking.html). * Added support for the following B2B features: * Companies. You can add company [administrators]({{page.baseurl}}/graphql/mutations/create-company.html), [users]({{page.baseurl}}/graphql/mutations/create-company-user.html), [roles]({{page.baseurl}}/graphql/mutations/create-company-role.html), and [teams]({{page.baseurl}}/graphql/mutations/create-company-team.html).