Skip to content
Open
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
30 changes: 30 additions & 0 deletions src/data/navigation/sections/graphql.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,10 @@ module.exports = [
title: "Mutations",
path: "/graphql/schema/b2b/company/mutations/",
pages: [
{
title: "assignChildCompany",
path: "/graphql/schema/b2b/company/mutations/assign-child-company/",
},
{
title: "createCompany",
path: "/graphql/schema/b2b/company/mutations/create/",
Expand Down Expand Up @@ -447,6 +451,10 @@ module.exports = [
title: "updateCompany",
path: "/graphql/schema/b2b/company/mutations/update/",
},
{
title: "unassignChildCompany",
path: "/graphql/schema/b2b/company/mutations/unassign-child-company/",
},
{
title: "updateCompanyRole",
path: "/graphql/schema/b2b/company/mutations/update-role/",
Expand Down Expand Up @@ -1149,10 +1157,22 @@ module.exports = [
title: "deleteRequisitionListItems",
path: "/graphql/schema/b2b/requisition-list/mutations/delete-items/",
},
{
title: "importSharedRequisitionList",
path: "/graphql/schema/b2b/requisition-list/mutations/import-shared-requisition-list/",
},
{
title: "moveItemsBetweenRequisitionLists",
path: "/graphql/schema/b2b/requisition-list/mutations/move-items/",
},
{
title: "shareRequisitionListByEmail",
path: "/graphql/schema/b2b/requisition-list/mutations/share-requisition-list-by-email/",
},
{
title: "shareRequisitionListByToken",
path: "/graphql/schema/b2b/requisition-list/mutations/share-requisition-list-by-token/",
},
{
title: "updateRequisitionList",
path: "/graphql/schema/b2b/requisition-list/mutations/update/",
Expand All @@ -1163,6 +1183,16 @@ module.exports = [
},
],
},
{
title: "Queries",
path: "/graphql/schema/b2b/requisition-list/queries",
pages: [
{
title: "sharedRequisitionList",
path: "/graphql/schema/b2b/requisition-list/queries/shared-requisition-list/",
},
]
},
{
title: "Interfaces",
path: "/graphql/schema/b2b/requisition-list/interfaces/"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
title: assignChildCompany mutation
edition: saas
keywords:
- B2B
---

import CommerceOnly from '/src/_includes/commerce-only.md'

<CommerceOnly />

# assignChildCompany mutation

<InlineAlert variant="info" slots="text1" />

This mutation is part of the B2B Storefront Compatibility Package and is only available on [Adobe Commerce as a Cloud Service](https://experienceleague.adobe.com/en/docs/commerce/cloud-service/overview).

The `assignChildCompany` mutation allows company administrators to assign a child company to a parent company within the company hierarchy. This mutation requires `parentId` and `childId` as unique IDs of the companies as parameters. This mutation returns a `company_hierarchy` object if successful.

## Syntax

```graphql
{
assignChildCompany(
input: AssignChildCompanyInput!
): AssignChildCompanyOutput
}
```

[//]: # (## Reference)
[//]: # ()
[//]: # (The [`assignChildCompany`]&#40;https://developer.adobe.com/commerce/webapi/graphql-api/saas/index.html#mutation-assignChildCompany&#41; reference provides detailed information about the types and fields defined in this mutation.)

## Example usage

The following example assigns a child company to a parent company by the company admin.

**Request:**

```graphql
mutation assignChildCompany($parentId: ID!, $childId: ID!) {
assignChildCompany(
input: {parent_company_id: "ODM5", child_company_id: "ABCD=="}
) {
company_hierarchy {
parent {
name
}
children {
name
}
}
}
}
```

**Response:**

```json
{
"data": {
"assignChildCompany": {
"company_hierarchy": {
"parent": {
"name": "ParentCompanyName"
},
"children": [
{
"name": "ChildCompanyName"
}
]
}
}
}
}
```
1 change: 1 addition & 0 deletions src/pages/graphql/schema/b2b/company/mutations/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ The B2B company mutations allow you to perform the management operations:
* Create, update, and delete company teams.
* Move the position of a company team in the company hierarchy.
* Create, update, and delete company roles.
* Assign and unassign a company to a company hierarchy.
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
title: unassignChildCompany mutation
edition: saas
keywords:
- B2B
---

import CommerceOnly from '/src/_includes/commerce-only.md'

<CommerceOnly />

# unassignChildCompany mutation

<InlineAlert variant="info" slots="text1" />

This mutation is part of the B2B Storefront Compatibility Package and is only available on [Adobe Commerce as a Cloud Service](https://experienceleague.adobe.com/en/docs/commerce/cloud-service/overview).

The `unassignChildCompany` mutation allows company administrators to unassign a child company from a parent company within the company hierarchy. This mutation requires `child_company_id` as unique IDs of the child company as parameters. This mutation returns a `company_hierarchy` object if successful.

## Syntax

```graphql
{
unassignChildCompany(
input: UnassignChildCompanyInput!
): UnassignChildCompanyOutput
}
```

[//]: # (## Reference)
[//]: # ()
[//]: # (The [`unassignChildCompany`]&#40;https://developer.adobe.com/commerce/webapi/graphql-api/saas/index.html#mutation-unassignChildCompany&#41; reference provides detailed information about the types and fields defined in this mutation.)

## Example usage

The following example unassigns a child company from a parent company by the company admin.

**Request:**

```graphql
mutation {
unassignChildCompany(
input: {
child_company_id: "ABCD=="
}
) {
company_hierarchy {
parent {
name
}
children {
name
}
}
}
}
```

**Response:**

```json
{
"data": {
"unassignChildCompany": {
"company_hierarchy": {
"parent": null,
"children": []
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
---
title: importSharedRequisitionList mutation
edition: saas
keywords:
- B2B
---

import CommerceOnly from '/src/_includes/commerce-only.md'

<CommerceOnly />

# importSharedRequisitionList mutation

<InlineAlert variant="info" slots="text1" />

This mutation is part of the B2B Storefront Compatibility Package and is only available on [Adobe Commerce as a Cloud Service](https://experienceleague.adobe.com/en/docs/commerce/cloud-service/overview).

The `importSharedRequisitionList` mutation allows recipients within the same company to import or clone a shared requisition list. You must specify a valid token, generated by the [shareRequisitionListByToken](share-requisition-list-by-token.md) mutation, as an input parameter. This mutation returns a `requisition_list` object and `user_errors`, if any.

## Syntax

```graphql
{
importSharedRequisitionList(
token: String!
): ImportSharedRequisitionListOutput
}
```

[//]: # (## Reference)
[//]: # ()
[//]: # (The [`importSharedRequisitionList`]&#40;https://developer.adobe.com/commerce/webapi/graphql-api/saas/index.html#mutation-importSharedRequisitionList&#41; reference provides detailed information about the types and fields defined in this mutation.)

## Example usage

The following example demonstrates how to import a shared requisition list using the specified token as its identifier.

**Request:**

```graphql
mutation ImportSharedRequisitionList {
importSharedRequisitionList(
token: "Ra4yCcOAesVKIHNKuqUy6G3PMbcWt6HMohgcwDMXmnwrbB2SCeMMDPGlmDukDXGc"
) {
requisition_list {
description
name
uid
items(currentPage: 1, pageSize: 20) {
items {
quantity
sku
uid
product {
attribute_set_id
uid
name
}
}
page_info {
current_page
page_size
total_pages
}
}
}
user_errors {
code
message
}
}
}
```

**Response:**

```json
{
"data": {
"importSharedRequisitionList": {
"requisition_list": {
"description": null,
"name": "John's Favorites",
"uid": "MTA5Nw==",
"items": {
"items": [
{
"quantity": 2,
"sku": "Augusta",
"uid": "NDgx",
"product": {
"attribute_set_id": 4,
"uid": "MzQ3",
"name": "Augusta"
}
}
],
"page_info": {
"current_page": 1,
"page_size": 20,
"total_pages": 1
}
}
},
"user_errors": []
}
}
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ The B2B requisition list mutations allow you to perform the following operations
- [Update items in a requisition list](update-items.md)
- [Delete items from a requistion list](delete-items.md)

- Share requisition lists
- [Share requisition list with a token](share-requisition-list-by-token.md)
- [Share requisition list by email](share-requisition-list-by-email.md)
- [Import shared requisition list](import-shared-requisition-list.md)

- Manage the cart
- [Add requisition list items to the cart](add-items-to-cart.md)
- [Clear the cart](clear-customer-cart.md)

Loading
Loading