B2B for Adobe Commerce only. Learn more.

deleteNegotiableQuotes mutation

The deleteNegotiableQuotes mutation causes the specified negotiable quotes to be invisible from the Admin or from the storefront. The quotes are still present in the database.

You can run the deleteNegotiableQuotes mutation when negotiable quotes are have the following statuses:

  • SUBMITTED
  • UPDATED
  • OPEN
  • CLOSED
  • DECLINED
  • EXPIRED

This mutation requires a valid customer authentication token.

Syntax

1
2
3
deleteNegotiableQuotes(
    input: DeleteNegotiableQuotesInput!
): DeleteNegotiableQuotesOutput

Example usage

The following example deletes the specified negotiable quote. The response includes a list of all the company negotiable quotes.

Request:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
mutation{
  deleteNegotiableQuotes(input:
  {
    quote_uids: ["FYGOCooAxSJnMdxI9v0cMI5EBaTPtwrr"]
  }){
    negotiable_quotes {
     items {
      uid
      name
      created_at
      buyer {
        firstname
        lastname
      }
      status
      updated_at
      prices {
        grand_total {
          value
          currency
        }
      }
    }
    }
  }
}

Response:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
  "data": {
    "deleteNegotiableQuotes": {
      "negotiable_quotes": {
        "items": [
          {
            "uid": "kw6mLEvl6vjjPNsjtJqwpamv5o0iT1bc",
            "name": "Discount request",
            "created_at": "2021-04-20 19:01:38",
            "buyer": {
              "firstname": "Taina",
              "lastname": "Garofalo"
            },
            "status": "ORDERED",
            "updated_at": "2021-04-21 18:29:28",
            "prices": {
              "grand_total": {
                "value": 110.95,
                "currency": "USD"
              }
            }
          },
          {
            "uid": "xCA4wSZEHsb5QbFiKfoq5k1Dk8vIPBgb",
            "name": "April 22 request",
            "created_at": "2021-04-22 15:59:47",
            "buyer": {
              "firstname": "Taina",
              "lastname": "Garofalo"
            },
            "status": "SUBMITTED",
            "updated_at": "2021-04-23 18:21:44",
            "prices": {
              "grand_total": {
                "value": 208.8,
                "currency": "USD"
              }
            }
          }
        ]
      }
    }
  }
}

Input attributes

The DeleteNegotiableQuotesInput object contains the following attribute.

Attribute Data Type Description
quote_uids [ID!]! An array of unique IDs indicating which items to remove from the negotiable quote

Output attributes

The DeleteNegotiableQuotesOutput output object contains the following attribute.

Attribute Data Type Description
negotiable_quotes (filter NegotiableQuoteFilterInput, pageSize = 20 Int, currentPage = 1 Int) NegotiableQuotesOutput A list of negotiable quotes that the customer can view

This attribute takes the following arguments.

Attribute Data Type Description
currentPage Int Specifies which page of results to return. The default value is 1
filter NegotiableQuoteFilterInput Defines a filter for narrowing the query results
pageSize Int Specifies the maximum number of results to return at once. Defaults to 20
sort NegotiableQuoteSortInput Specifies how to sort the results

NegotiableQuoteFilterInput attributes

The NegotiableQuoteFilterInput object defines the filter to use to return a list of negotiable quotes.

Attribute Data Type Description
ids FilterEqualTypeInput Filter by the ID of one or more negotiable quotes
name FilterMatchTypeInput Filter by the negotiable quote name

FilterEqualTypeInput attributes

Use the FilterEqualTypeInput object to construct a filter that returns values that are equal to the specified string or are in an array of values.

Attribute Data Type Description
eq String A string to filter on
in [String] An array of values to filter on

FilterMatchTypeInput attributes

Use the FilterMatchTypeInput object to construct a filter that returns products that exactly match a string or contain the specified pattern.

Attribute Data Type Description
match String One or more words to filter on

NegotiableQuoteSortInput attributes

Attribute Data Type Description
sort_field NegotiableQuoteSortableField! CREATED_AT (default), QUOTE_NAME, or UPDATED_AT
sort_direction SortEnum! ASC or DESC (default)

NegotiableQuote attributes

The NegotiableQuote object contains details of a negotiable quote, including its status, contents, and history.

Attribute Data Type Description
buyer NegotiableQuoteUser! The first and last name of the buyer
comments [NegotiableQuoteComment!] A list of comments made by the buyer and seller
created_at String Timestamp indicating when the negotiable quote was created
history [NegotiableQuoteHistoryEntry!] A list of status and price changes for the negotiable quote
items [CartItemInterface] The list of items in the negotiable quote
name String! The title assigned to the negotiable quote
prices CartPrices A set of subtotals and totals applied to the cart
status NegotiableQuoteStatus! The status of the negotiable quote. Possible values are SUBMITTED, PENDING, UPDATED, OPEN, ORDERED, CLOSED, DECLINED, and EXPIRED
uid ID! The unique ID of a NegotiableQuote object
updated_at String Timestamp indicating when the negotiable quote was updated

NegotiableQuoteComment attributes

The NegotiableQuoteComment object contains details about a single comment made by the seller or the buyer.

Attribute Data Type Description
author NegotiableQuoteUser! The first and last name of the commenter
created_at String! Timestamp indicating when the comment was created
creator_type NegotiableQuoteCommentCreatorType! Indicates whether a buyer or seller commented
text String! The plain text comment
uid ID! The unique ID of a NegotiableQuoteComment object

NegotiableQuoteCustomLogChange attributes

The NegotiableQuoteCustomLogChange object contains changes to a negotiable quote that were made by a third-party extension.

Attribute Data Type Description
new_value String! The new entry content
old_value String The previous entry in the custom log
title String! The title of the custom log entry

NegotiableQuoteHistoryChanges attributes

The NegotiableQuoteHistoryChanges object contains details about a single change in the history of a negotiable quote.

Attribute Data Type Description
comment_added NegotiableQuoteHistoryCommentChange The comment provided with a change in the negotiable quote history
custom_changes NegotiableQuoteCustomLogChange Lists log entries added by third-party extensions
expiration NegotiableQuoteHistoryExpirationChange The expiration date of the negotiable quote before and after a change in the quote history
products_removed NegotiableQuoteHistoryProductsRemovedChange Lists products that were removed as a result of a change in the quote history
statuses NegotiableQuoteHistoryStatusesChange The status before and after a change in the negotiable quote history
total NegotiableQuoteHistoryTotalChange The total amount of the negotiable quote before and after a change in the quote history

NegotiableQuoteHistoryCommentChange attributes

The NegotiableQuoteHistoryCommentChange object contains a plain-text comment.

Attribute Data Type Description
comment String! A simple (non-HTML) comment submitted by a seller or buyer

NegotiableQuoteHistoryEntry attributes

The NegotiableQuoteHistoryEntry object contains details about a change to a negotiable quote, including all previous changes made at that point.

Attribute Data Type Description
author NegotiableQuoteUser! The person who made a change in the status of the negotiable quote
change_type NegotiableQuoteHistoryEntryChangeType! An enum that describes why the entry in the negotiable quote history changed status. Possible values are CREATED, UPDATED, CLOSED, and UPDATED_BY_SYSTEM
changes NegotiableQuoteHistoryChanges The set of changes in the negotiable quote
created_at String Timestamp indicating when the negotiable quote entry was created
uid ID! The unique ID of a NegotiableQuoteHistoryEntry object

NegotiableQuoteHistoryExpirationChange attributes

The NegotiableQuoteHistoryExpirationChange object lists the current expiration date of the negotiable quote, and the previous expiration date, if applicable.

Attribute Data Type Description
new_expiration String! The expiration date after the change
old_expiration String The previous expiration date. The value will be ‘null’ if not previously set

NegotiableQuoteHistoryProductsRemovedChange attributes

The NegotiableQuoteHistoryProductsRemovedChange object provides details about products removed from a negotiable quote because of an action by a buyer or seller, or because the item was removed from the catalog.

Attribute Data Type Description
products_removed_from_catalog [ID] A list of product IDs the seller removed from the catalog
products_removed_from_quote [ProductInterface] A list of products removed from the quote by either the buyer or the seller

NegotiableQuoteHistoryStatusChange attributes

The NegotiableQuoteHistoryStatusChange object returns the status changes during the quote’s life cycle.

Attribute Data Type Description
new_status NegotiableQuoteStatus! The updated status
old_status NegotiableQuoteStatus The previous status. The value will be null for the first history entry in a negotiable quote

NegotiableQuoteHistoryStatusesChange attributes

The NegotiableQuoteHistoryStatusesChange object contains an array of all previous modifications to the negotiable quote.

Attribute Data Type Description
changes [NegotiableQuoteHistoryStatusChange!]! A list of status changes

NegotiableQuoteHistoryTotalChange attributes

The NegotiableQuoteHistoryTotalChange object contains the new total price of a negotiable quote after some change has been applied.

Attribute Data Type Description
new_price Money The total price as a result of the change
old_price Money The previous total price on the negotiable quote

NegotiableQuoteUser attributes

The NegotiableQuoteUser contains the first and last name of a buyer or seller.

Attribute Data Type Description
firstname String! The first name of the buyer or seller making a change
lastname String! The buyer’s or seller’s last name