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

added create, rename, delete requisition lists #8093

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
15 changes: 15 additions & 0 deletions src/_data/toc/graphql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,11 @@ pages:
url: /graphql/mutations/create-product-review.html
exclude_versions: ["2.3"]

- label: createRequisitionList mutation
url: /graphql/mutations/create-requisition-list.html
edition: b2b-only
exclude_versions: [ "2.3" ]

- label: createWishlist mutation
url: /graphql/mutations/create-wishlist.html
edition: ee-only
Expand All @@ -271,6 +276,11 @@ pages:
- label: deletePaymentToken mutation
url: /graphql/mutations/delete-payment-token.html

- label: deleteRequisitionList mutation
url: /graphql/mutations/delete-requisition-list.html
edition: b2b-only
exclude_versions: [ "2.3" ]

- label: generateCustomerToken mutation
url: /graphql/mutations/generate-customer-token.html

Expand Down Expand Up @@ -315,6 +325,11 @@ pages:
url: /graphql/mutations/remove-store-credit.html
edition: ee-only

- label: renameRequisitionList mutation
url: /graphql/mutations/rename-requisition-list.html
edition: b2b-only
exclude_versions: [ "2.3" ]

- label: reorderItems mutation
url: /graphql/mutations/reorder-items.html
exclude_versions: ["2.3"]
Expand Down
1 change: 1 addition & 0 deletions src/_includes/graphql/store-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Attribute | Data Type | Description | Default or example value
`base_media_url` | String | The fully-qualified URL that specifies the location of user media files | `http://magentohost.example.com/pub/media/`
`base_static_url` | String | The fully-qualified URL that specifies the location of static view files | `http://magentohost.example.com/pub/static/`
`base_url` | String | The store's fully-qualified base URL | `http://magentohost.example.com/`
`btob_website_configuration_requisition_list_active` | String | Indicates if requisition lists are enabled. Possible values: 1 (Yes) and 0 (No) | 0
`cart_gift_wrapping` | String | Indicates if gift wrapping prices are displayed on the Shopping Cart page. Possible values: 1 (Yes) and 0 (No) | 1
`cart_printed_card` | String | Indicates if printed card prices are displayed on the Shopping Cart page. Possible values: 1 (Yes) and 0 (No) | 1
`catalog_default_sort_by` | String | The default sort order of the search results list | `position`
Expand Down
87 changes: 87 additions & 0 deletions src/guides/v2.4/graphql/mutations/create-requisition-list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
group: graphql
title: createRequisitionList mutation
b2b_only: true
contributor_name: Zilker Technology
contributor_link: https://www.ztech.io/
---
The `createRequisitionList` mutation creates a requisition list for the logged in customer.

This mutation requires a valid [customer authentication token]({{page.baseurl}}/graphql/mutations/generate-customer-token.html).

{:.bs-callout-info}
Use the [`storeConfig` query]({{page.baseurl}}/graphql/queries/store-config.html) with the `btob_website_configuration_requisition_list_active` attribute to determine whether requisition lists are supported.

## Syntax

```graphql
mutation {
createRequisitionList(
name: String!
description: String
) {
CreateRequisitionListOutput
}
}
```

## Example usage

The following example creates the `Frequently Ordered Products` requisition list.

**Request:**

```graphql
mutation {
createRequisitionList(
name: "Frequently Ordered Products",
description: "Frequently ordered products list"
) {
list {
uid
name
description
}
}
}
```

**Response:**

```json
{
"data": {
"createRequisitionList": {
"list": {
"uid": "4",
"name": "Frequently Ordered Products",
"description": "Frequently ordered products list"
}
}
}
}
```

## Input attributes

The `createRequisitionList` mutation requires the following input.

Attribute | Data Type | Description
--- | --- | ---
`description`| String | Description of the customer's requisition list
`name` | String! | The name of the customer's requisition list

## Output attributes

The `createRequisitionListOutput` object returns the `uid` of the new requisition list as well as the input attributes.

Attribute | Data Type | Description
--- | --- | ---
`description` | String | The requisition list description
`name` | String! | The requisition list name
`uid` | ID! | The ID of the new requisition list

## Related topics

* [renameRequisitionList mutation]({{page.baseurl}}/graphql/mutations/rename-requisition-list.html)
* [deleteRequisitionList mutation]({{page.baseurl}}/graphql/mutations/delete-requisition-list.html)
71 changes: 71 additions & 0 deletions src/guides/v2.4/graphql/mutations/delete-requisition-list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
group: graphql
title: deleteRequisitionList mutation
b2b_only: true
contributor_name: Zilker Technology
contributor_link: https://www.ztech.io/
---
The `deleteRequisitionList` mutation deletes a requisition list of the logged in customer.

This mutation requires a valid [customer authentication token]({{page.baseurl}}/graphql/mutations/generate-customer-token.html).

## Syntax

```graphql
mutation {
deleteRequisitionList(
uid: ID!
) {
deleteRequisitionListOutput
}
}
```

## Example usage

The following example deletes the requisition list with `uid` 4.

**Request:**

```graphql
mutation {
deleteRequisitionList(
uid: "4"
) {
result
}
}
```

**Response:**

```json
{
"data": {
"deleteRequisitionList": {
"result": true
}
}
}
```

## Input attributes

The `deleteRequisitionList` mutation requires the following input.

Attribute | Data Type | Description
--- | --- | ---
`uid` | ID! | The ID of the requisition list to delete

## Output attributes

The `deleteRequisitionListOutput` object returns the `uid` of the new requisition list as well as the input attributes.

Attribute | Data Type | Description
--- | --- | ---
`result` | Boolean | Indicates whether the requisition list was deleted

## Related topics

* [createRequisitionList mutation]({{page.baseurl}}/graphql/mutations/create-requisition-list.html)
* [renameRequisitionList mutation]({{page.baseurl}}/graphql/mutations/rename-requisition-list.html)
87 changes: 87 additions & 0 deletions src/guides/v2.4/graphql/mutations/rename-requisition-list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
group: graphql
title: renameRequisitionList mutation
b2b_only: true
contributor_name: Zilker Technology
contributor_link: https://www.ztech.io/
---
The `renameRequisitionList` mutation updates the name and, optionally, the description of a requisition list.

This mutation requires a valid [customer authentication token]({{page.baseurl}}/graphql/mutations/generate-customer-token.html).

## Syntax

```graphql
mutation {
renameRequisitionList(
uid: ID!
name: String!
description: String
) {
renameRequisitionListOutput
}
}
```

## Example usage

The following example renames the `Frequently Ordered Products` requisition list and updates its description.

**Request:**

```graphql
mutation {
renameRequisitionList(
uid: "4"
name: "Frequently Ordered Essential Products",
description: "Frequently ordered essential products list"
) {
list {
uid
name
description
}
}
}
```

**Response:**

```json
{
"data": {
"renameRequisitionList": {
"list": {
"uid": "4",
"name": "Frequently Ordered Essential Products",
"description": "Frequently ordered essential products list"
}
}
}
}
```

## Input attributes

The `renameRequisitionList` mutation requires the following input.

Attribute | Data Type | Description
--- | --- | ---
`description`| String | Description of the customer's requisition list
`name` | String! | The name of the customer's requisition list
`uid` | ID! | The ID of the new requisition list

## Output attributes

The `renameRequisitionListOutput` object returns the `uid` of the new requisition list as well as the input attributes.

Attribute | Data Type | Description
--- | --- | ---
`description` | String | The requisition list description
`name` | String! | The requisition list name
`uid` | ID! | The ID of the new requisition list

## Related topics

* [createRequisitionList mutation]({{page.baseurl}}/graphql/mutations/create-requisition-list.html)
* [deleteRequisitionList mutation]({{page.baseurl}}/graphql/mutations/delete-requisition-list.html)