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

Commit 3c89838

Browse files
keharpersathiyaaarogyarchiranjeevi-cjdineshvb
authored
GraphQL: Merge requisition lists docs into 2.4.2-develop (#8428)
* Added documentation for copy, move and delete requisition list items mutations (#8202) * Added documentation for copy, move and remove requisition list items mutations * fixed json format * arranged the attributes alphabetically * added backticks and spaces as mentioned * Update src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md Co-authored-by: Yaroslav Rogoza <[email protected]> * modified attribute name * Modified the documentation according to the schema change * Apply suggestions from code review Co-authored-by: Kevin Harper <[email protected]> * modified as per review comments * removed a period * added a missing attribute * added the attributes alphabetically * deleted extra line * modified a description * modified the uid's and item uid's Co-authored-by: Yaroslav Rogoza <[email protected]> Co-authored-by: Kevin Harper <[email protected]> * 8341 requisition list mutations (#8354) * Added documentation for requisition list mutation * Added quotes to the status * removed cart object in clearCustomerCart input attributes table * Followed the standards and changed the anchor names * Update src/_includes/graphql/requisition-list.md Co-authored-by: Yaroslav Rogoza <[email protected]> * Apply suggestions from code review Co-authored-by: Yaroslav Rogoza <[email protected]> * arranged the attributes in alphabetical order and added uid in requisition list * removed blank space * Apply suggestions from code review Co-authored-by: Kevin Harper <[email protected]> * updated the updateRequisitionListItems mutation * Delete requisition-list.md * updated the files * Update add-requisition-list-items-to-cart.md * Update clear-customer-cart.md * Update update-requisition-list-items.md Co-authored-by: Yaroslav Rogoza <[email protected]> Co-authored-by: Kevin Harper <[email protected]> * issue-8376-made the requested changes (#8381) * issue-8376-made the requested changes * issue-8376-made some small changes * issue-8376-made the requested changes * Update create-requisition-list.md * Update update-requisition-list.md * Update delete-requisition-list.md Co-authored-by: Kevin Harper <[email protected]> * GraphQL: Requisition list updates (#8408) * GraphQL: Non-mutation requisition list updates * review draft * Designate topic as B2B only * Update StoreConfig attribute name * Update examples * Update deleteReqList output * Update deleteReqList output * Fit & finish * Reviewer comments * Corrected deleteReqList output * Update rel notes * linting Co-authored-by: Sathiya Prakash <[email protected]> Co-authored-by: Yaroslav Rogoza <[email protected]> Co-authored-by: chiranjeevi <[email protected]> Co-authored-by: Dinesh V B <[email protected]>
1 parent c7f4841 commit 3c89838

17 files changed

+1115
-82
lines changed

src/_data/toc/graphql.yml

Lines changed: 53 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,20 @@ pages:
181181
- label: addDownloadableProductsToCart mutation
182182
url: /graphql/mutations/add-downloadable-products.html
183183

184+
- label: addProductsToRequisitionList mutation
185+
url: /graphql/mutations/add-products-to-requisition-list.html
186+
edition: b2b-only
187+
exclude_versions: [ "2.3" ]
188+
184189
- label: addProductsToWishlist mutation
185190
url: /graphql/mutations/add-products-to-wishlist.html
186191
exclude_versions: ["2.3"]
187192

193+
- label: addRequisitionListItemsToCart mutation
194+
url: /graphql/mutations/add-requisition-list-items-to-cart.html
195+
edition: b2b-only
196+
exclude_versions: [ "2.3" ]
197+
188198
- label: addSimpleProductsToCart mutation
189199
url: /graphql/mutations/add-simple-products.html
190200

@@ -210,6 +220,16 @@ pages:
210220
- label: changeCustomerPassword mutation
211221
url: /graphql/mutations/change-customer-password.html
212222

223+
- label: clearCustomerCart mutation
224+
url: /graphql/mutations/clear-customer-cart.html
225+
edition: b2b-only
226+
exclude_versions: [ "2.3" ]
227+
228+
- label: copyItemsBetweenRequisitionLists mutation
229+
url: /graphql/mutations/copy-items-between-requisition-lists.html
230+
edition: b2b-only
231+
exclude_versions: [ "2.3" ]
232+
213233
- label: copyProductsBetweenWishlists mutation
214234
url: /graphql/mutations/copy-products-between-wishlists.html
215235
edition: ee-only
@@ -293,19 +313,24 @@ pages:
293313
- label: deleteCustomerAddress mutation
294314
url: /graphql/mutations/delete-customer-address.html
295315

296-
- label: deleteWishlist mutation
297-
url: /graphql/mutations/delete-wishlist.html
298-
edition: ee-only
299-
exclude_versions: ["2.3"]
300-
301-
- label: deletePaymentToken mutation
302-
url: /graphql/mutations/delete-payment-token.html
303-
304316
- label: deleteRequisitionList mutation
305317
url: /graphql/mutations/delete-requisition-list.html
306318
edition: b2b-only
307319
exclude_versions: [ "2.3" ]
308320

321+
- label: deleteRequisitionListItems mutation
322+
url: /graphql/mutations/delete-requisition-list-items.html
323+
edition: b2b-only
324+
exclude_versions: [ "2.3" ]
325+
326+
- label: deletePaymentToken mutation
327+
url: /graphql/mutations/delete-payment-token.html
328+
329+
- label: deleteWishlist mutation
330+
url: /graphql/mutations/delete-wishlist.html
331+
edition: ee-only
332+
exclude_versions: ["2.3"]
333+
309334
- label: generateCustomerToken mutation
310335
url: /graphql/mutations/generate-customer-token.html
311336

@@ -324,6 +349,11 @@ pages:
324349
edition: ee-only
325350
exclude_versions: ["2.3"]
326351

352+
- label: moveItemsBetweenRequisitionLists mutation
353+
url: /graphql/mutations/move-items-between-requisition-lists.html
354+
edition: b2b-only
355+
exclude_versions: [ "2.3" ]
356+
327357
- label: placeOrder mutation
328358
url: /graphql/mutations/place-order.html
329359

@@ -354,11 +384,6 @@ pages:
354384
url: /graphql/mutations/remove-store-credit.html
355385
edition: ee-only
356386

357-
- label: renameRequisitionList mutation
358-
url: /graphql/mutations/rename-requisition-list.html
359-
edition: b2b-only
360-
exclude_versions: [ "2.3" ]
361-
362387
- label: reorderItems mutation
363388
url: /graphql/mutations/reorder-items.html
364389
exclude_versions: ["2.3"]
@@ -449,6 +474,16 @@ pages:
449474
url: /graphql/mutations/update-products-in-wishlist.html
450475
exclude_versions: ["2.3"]
451476

477+
- label: updateRequisitionList mutation
478+
url: /graphql/mutations/update-requisition-list.html
479+
edition: b2b-only
480+
exclude_versions: [ "2.3" ]
481+
482+
- label: updateRequisitionListItems mutation
483+
url: /graphql/mutations/update-requisition-list-items.html
484+
edition: b2b-only
485+
exclude_versions: [ "2.3" ]
486+
452487
- label: updateWishlist mutation
453488
url: /graphql/mutations/update-wishlist.html
454489
edition: ee-only
@@ -505,6 +540,11 @@ pages:
505540
url: /graphql/interfaces/order-item-interface.html
506541
exclude_versions: ["2.3"]
507542

543+
- label: RequisitionListItemInterface attributes and implementations
544+
url: /graphql/interfaces/requisition-list-item-interface.html
545+
edition: b2b-only
546+
exclude_versions: ["2.3"]
547+
508548
- label: ShipmentItemInterface attributes and implementations
509549
url: /graphql/interfaces/shipment-item-interface.html
510550
exclude_versions: ["2.3"]

src/_includes/graphql/customer-output-24.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,25 @@ Attribute | Data Type | Description
2727
`firstname` | String | The customer's first name
2828
`gender` | Int | The customer's gender (Male - 1, Female - 2)
2929
`group_id` | Int | Deprecated. This attribute is not applicable for GraphQL. The group assigned to the user. Default values are 0 (Not logged in), 1 (General), 2 (Wholesale), and 3 (Retailer)
30-
`id` | Int | Deprecated. This attribute is not applicable for GraphQL.The ID assigned to the customer
30+
`id` | Int | Deprecated. This attribute is not applicable for GraphQL. The ID assigned to the customer
3131
`is_subscribed` | Boolean | Indicates whether the customer is subscribed to the company's newsletter
3232
`lastname` | String | The customer's family name
3333
`middlename` |String | The customer's middle name
34-
`orders(<FilterCriteria>)` | {{ customeroutput_text }} | A list of the customer's placed orders{{ crossref_text }}
34+
`orders(filter CustomerOrdersFilterInput, currentPage = 1 Int, pageSize = 20 Int)` | {{ customeroutput_text }} | A list of the customer's placed orders{{ crossref_text }}
3535
`prefix` | String | An honorific, such as Dr., Mr., or Mrs.
3636
`reviews(pageSize: Int = 20 currentPage: Int = 1)` | {{ productreview_text }} | The list of reviews of the product
3737
`reward_points` | {{ rewardpoints_text }} | Details about the customer's reward points
3838
`suffix` | String | A value such as Sr., Jr., or III
3939
`taxvat` | String | The customer's Tax/VAT number (for corporate customers)
40-
`wishlist` | {{ wishlist_text }} | Contains the contents of the customer's wish lists
40+
`wishlist` | Wishlist! | Deprecated. Use `wishlist_v2` instead. Contains the contents of the customer's wish lists
41+
`wishlist_v2(id ID!)` | {{ wishlist_text }} | Retrieve the specified wish list identified by the unique ID for a Wishlist object
4142

42-
For B2B, company users can have the following attributes.
43+
For B2B, company administrators and users can have the following attributes.
4344

4445
Attribute | Data Type | Description
4546
--- | --- | ---
4647
`job_title` | String | The job title for a B2B company user
48+
`requisition_lists (pageSize = 20 Int, currentPage = 1 Int, filter RequisitionListFilterInput)` | RequisitionLists | Contains the customer's requisition lists
4749
`role`| CompanyRole | The role name and permissions assigned to the company user
4850
`status` | CompanyUserStatusEnum | Indicates whether the company user is ACTIVE or INACTIVE
4951
`team` | CompanyTeam | The team the company user is assigned to
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
The `RequisitionList` object contains the following attributes.
2+
3+
Attribute | Data Type | Description
4+
--- | --- | ---
5+
`description` | String | Optional text that describes the requisition list
6+
`items` | [RequistionListItems](#RequistionListItems) | An array of products added to the requisition list
7+
`items_count` | Int! | The number of items in the list
8+
`name` | String! | The requisition list name
9+
`uid` | ID! | The unique requisition list ID
10+
`updated_at` | String | The time of the last modification of the requisition list
11+
12+
### RequistionListItems attributes {#RequistionListItems}
13+
14+
The `RequistionListItems` object contains the following attributes.
15+
16+
Attribute | Data Type | Description
17+
--- | --- | ---
18+
`items` | [[RequisitionListItemInterface]!]({{page.baseurl}}/graphql/interfaces/requisition-list-item-interface.html) | An array of items in the requisition list
19+
`page_info` | SearchResultPageInfo | Contains pagination metadata
20+
`total_pages` | Int! | The number of pages returned

src/_includes/graphql/store-config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ Attribute | Data Type | Description | Default or example value
1616
`base_media_url` | String | The fully-qualified URL that specifies the location of user media files | `http://magentohost.example.com/pub/media/`
1717
`base_static_url` | String | The fully-qualified URL that specifies the location of static view files | `http://magentohost.example.com/pub/static/`
1818
`base_url` | String | The store's fully-qualified base URL | `http://magentohost.example.com/`
19-
`btob_website_configuration_requisition_list_active` | String | Indicates if requisition lists are enabled. Possible values: 1 (Yes) and 0 (No) | 0
2019
`cart_gift_wrapping` | String | Indicates if gift wrapping prices are displayed on the Shopping Cart page. Possible values: 1 (Yes) and 0 (No) | 1
2120
`cart_printed_card` | String | Indicates if printed card prices are displayed on the Shopping Cart page. Possible values: 1 (Yes) and 0 (No) | 1
2221
`catalog_default_sort_by` | String | The default sort order of the search results list | `position`
@@ -42,6 +41,7 @@ Attribute | Data Type | Description | Default or example value
4241
`id` | Int | Deprecated. Use `store_code` instead. The ID number assigned to the store | `1`
4342
`is_default_store` | Boolean | Indicates whether the store view has been designated as the default within the store group | true or false
4443
`is_default_store_group` | Boolean | Indicates whether the store group has been designated as the default within the website | true or false
44+
`is_requisition_list_active` | String | Indicates if requisition lists are enabled. Possible values: 1 (Yes) and 0 (No) | 0
4545
`list_mode` | String | The format of the search results list | `grid-list`
4646
`list_per_page` | Int | The default number of products per page in List View | `10`
4747
`list_per_page_values` | String | A list of numbers that define how many products can be displayed in List View | `5,10,15,20,25`
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
---
2+
group: graphql
3+
title: RequisitionListItemInterface attributes and implementations
4+
b2b_only: true
5+
---
6+
7+
`RequisitionListItemInterface` provides details about items in a requisition list. It has the following implementations:
8+
9+
* [`BundleRequisitionListItem`](#BundleRequisitionListItem)
10+
* [`ConfigurableRequisitionListItem`](#ConfigurableRequisitionListItem)
11+
* [`DownloadableRequisitionListItem`](#DownloadableRequisitionListItem)
12+
* [`GiftCardRequisitionListItem`](#GiftCardRequisitionListItem)
13+
* [`SimpleRequisitionListItem`](#SimpleRequisitionListItem)
14+
* [`VirtualRequisitionListItem`](#VirtualRequisitionListItem)
15+
16+
{:.bs-callout-info}
17+
There is not an implementation for grouped products. The items within a grouped product are managed individually.
18+
19+
## Attributes
20+
21+
The `RequisitionListItemInterface` defines the following attributes.
22+
23+
Attribute | Data Type | Description
24+
--- | --- | ---
25+
`customizable_options` | [SelectedCustomizableOption] | Selected custom options for an item in the requisition list
26+
`product` | [ProductInterface!]({{page.baseurl}}/graphql/interfaces/product-interface.html) | Contains details about an item added to a requisition list
27+
`quantity` | Float! | The amount added
28+
`uid` | ID! | The unique ID for the requisition list item
29+
30+
## Implementations
31+
32+
### BundleRequisitionListItem attributes {#BundleRequisitionListItem}
33+
34+
The `BundleRequisitionListItem` implementation adds the following attribute.
35+
36+
Attribute | Data Type | Description
37+
--- | --- | ---
38+
`bundle_options`| [SelectedBundleOption]! | An array of selected options for a bundle product
39+
40+
### ConfigurableRequisitionListItem attributes {#ConfigurableRequisitionListItem}
41+
42+
The `ConfigurableRequisitionListItem` implementation adds the following attribute.
43+
44+
Attribute | Data Type | Description
45+
--- | --- | ---
46+
`configurable_options`| [SelectedConfigurableOption] | Selected configurable options for an item in the requisition list
47+
48+
### DownloadableRequisitionListItem attributes {#DownloadableRequisitionListItem}
49+
50+
The `ConfigurableRequisitionListItem` implementation adds the following attributes.
51+
52+
Attribute | Data Type | Description
53+
--- | --- | ---
54+
`links`| [DownloadableProductLinks] | An array of links for downloadable products in the requisition list
55+
`samples` | [DownloadableProductSamples] | An array of links to downloadable product samples
56+
57+
### GiftCardRequisitionListItem attributes {#GiftCardRequisitionListItem}
58+
59+
The `GiftCardRequisitionListItem` implementation adds the following attribute.
60+
61+
Attribute | Data Type | Description
62+
--- | --- | ---
63+
`gift_card_options` | GiftCardOptions! | An array that defines gift card properties
64+
65+
#### GiftCardOptions attributes {#GiftCardOptions}
66+
67+
The GiftCardOptions object provides details about a gift card. All attributes are optional for a requisition list.
68+
69+
Attribute | Data Type | Description
70+
--- | --- | ---
71+
`amount`| Money | The amount and currency of the gift card
72+
`custom_giftcard_amount` | Money | The custom amount and currency of the gift card
73+
`message` | String | A message to the recipient
74+
`recipient_email` | String | The name of the person receiving the gift card
75+
`sender_email` | String | The email address of the person sending the gift card
76+
`sender_name` | String | The name of the person sending the gift card
77+
78+
### SimpleRequisitionListItem attributes {#SimpleRequisitionListItem}
79+
80+
The SimpleRequisitionListItem data type does not provide additional attributes to the `RequisitionListItemInterface`.
81+
82+
### VirtualRequisitionListItem attributes {#VirtualRequisitionListItem}
83+
84+
The VirtualRequisitionListItem data type does not provide additional attributes to the `RequisitionListItemInterface`.
85+
86+
## Example usage
87+
88+
The following mutation adds a product to a requisition list and returns information about the products in the list.
89+
90+
**Request:**
91+
92+
```graphql
93+
mutation {
94+
addProductsToRequisitionList(
95+
requisitionListUid: "Mg=="
96+
requisitionListItems: [
97+
{
98+
sku: "MS10"
99+
quantity: 1
100+
selected_options: ["Y29uZmlndXJhYmxlLzkzLzUw","Y29uZmlndXJhYmxlLzE2MC8xNjg"]
101+
}
102+
]
103+
) {
104+
requisition_list {
105+
uid
106+
items {
107+
items {
108+
... on RequisitionListItemInterface {
109+
uid
110+
product {
111+
uid
112+
sku
113+
name
114+
}
115+
quantity
116+
}
117+
}
118+
}
119+
items_count
120+
}
121+
}
122+
}
123+
```
124+
125+
**Response:**
126+
127+
```json
128+
{
129+
"data": {
130+
"addProductsToRequisitionList": {
131+
"requisition_list": {
132+
"uid": "Mg==",
133+
"items": {
134+
"items": [
135+
{
136+
"uid": "Mg==",
137+
"product": {
138+
"uid": "MTA=",
139+
"sku": "24-WB05",
140+
"name": "Savvy Shoulder Tote"
141+
},
142+
"quantity": 1
143+
},
144+
{
145+
"uid": "Mw==",
146+
"product": {
147+
"uid": "NTk2",
148+
"sku": "MS10",
149+
"name": "Logan HeatTec&reg; Tee"
150+
},
151+
"quantity": 1
152+
}
153+
]
154+
},
155+
"items_count": 2
156+
}
157+
}
158+
}
159+
}
160+
```

0 commit comments

Comments
 (0)