placeNegotiableQuoteOrderV2 mutation
This mutation is part of the B2B Storefront Compatibility Package and is only available on Adobe Commerce as a Cloud Service.
The placeNegotiableQuoteOrderV2 mutation converts a negotiable quote into an order and returns the full order object.
The negotiable quote must have one of the following statuses:
- SUBMITTED
- DECLINED
- EXPIRED
If the status is DECLINED or EXPIRED, the negotiable quote is processed like a standard cart, without applying any discounts. The negotiable quote is not converted to a standard cart.
Perform the following actions before using the placeNegotiableQuoteOrderV2 mutation. It might be necessary to perform additional steps during the process of coming to an agreement during the negotiable quote lifecycle.
- Create an empty cart
- Add one or more products to the cart
- Request a negotiable quote
- Set the billing address
- Set the shipping address
- Set the shipping method
- Set the payment method
You cannot manage orders with GraphQL, because orders are part of the backend. You can use REST calls to manage orders to their completion.
Syntax
Copied to your clipboardmutation {placeNegotiableQuoteOrderV2(input: PlaceNegotiableQuoteOrderInput) {PlaceNegotiableQuoteOrderOutputV2}}
Reference
The placeNegotiableQuoteOrderV2 reference provides detailed information about the types and fields defined in this mutation.
Example usage
Request:
Copied to your clipboardmutation {placeNegotiableQuoteOrderV2(input: {quote_uid: "xCA4wSZEHsb5QbFiKfoq5k1Dk8vIPBgb"}) {order {numbertoken#...}errors {messagecode}}}
Response:
Copied to your clipboard{"data": {"placeNegotiableQuoteOrderV2": {"order": {"number": "000000006","token": "0:3:OSScWU6PKLn3kFyMhNWyskG0opgVvFBnJmtuaFHKGwDFT83S6Kv9U39iYwixuU+vhwDz2AF4pCs3GtLhHbQ="},"errors": []}}}
Errors
| Code | Error | Description |
|---|---|---|
CART_NOT_FOUND | Could not find a cart with ID | The specified cart ID is invalid. |
CART_NOT_ACTIVE | The cart isn't active. | The specified cart ID is not active. |
GUEST_EMAIL_MISSING | Guest email for cart is missing. | The guest attempted to place an order but did not provide an email address. See setGuestEmailOnCart mutation. |
UNABLE_TO_PLACE_ORDER | A server error stopped your order from being placed. Please try to place your order again | The shopper tried to place an order when no products are in the shopping cart. |
UNABLE_TO_PLACE_ORDER | Some addresses can't be used due to the configurations for specific countries | The shipping method was not set. See setShippingMethodsOnCart mutation. |
UNABLE_TO_PLACE_ORDER | The shipping method is missing. Select the shipping method and try again | The shipping method was not set. See setShippingMethodsOnCart mutation. |
UNABLE_TO_PLACE_ORDER | Please check the billing address information | The billing address was not set. See setBillingAddressOnCart mutation. |
UNABLE_TO_PLACE_ORDER | Enter a valid payment method and try again | The payment method was not set. See setPaymentMethodOnCart mutation. |
UNABLE_TO_PLACE_ORDER | Some of the products are out of stock | One of the products in the shopping cart are currently out of stock. |
UNDEFINED | UNDEFINED | The error message does not match any error code |
