Documentation
Feedback
Guides
VTEX IO Apps

VTEX IO Apps
B2B Suite
B2B Quotes GraphQL API
vtex.b2b-quotes-graphql
Version: 2.9.3
Latest version: 2.9.3

This article provides a reference guide to the B2B Quotes GraphQL API, with details about the available queries and mutations for the B2B Quotes app. The API supports quote management and related configurations in a B2B environment, enabling users to retrieve, create, and update quotes, as well as manage application settings and permissions.

Schema overview

Query

classDiagram
  direction LR
  class AdminSetup {
    cartLifeSpan Int
    quotesManagedBy QuotesManagedBy!
  }

  class AppSettings {
    adminSetup AdminSetup
  }

  class QuoteUpdate {
    email String
    role String
    date String
    status String
    note String
  }

  class QuoteItem {
    name String
    skuName String
    refId String
    id String
    productId String
    imageUrl String
    listPrice Float
    price Float
    quantity Int
    sellingPrice Float
    seller String
  }

  class Quote {
    id String
    referenceName String
    creatorEmail String
    creatorRole String
    creationDate String
    expirationDate String
    lastUpdate String
    updateHistory [QuoteUpdate]
    items [QuoteItem]
    subtotal Float
    status String
    organization String
    organizationName String
    costCenter String
    costCenterName String
    viewedBySales Boolean
    viewedByCustomer Boolean
    salesChannel String
    seller String
    parentQuote String
    hasChildren Boolean
  }

  class Pagination {
    page Int
    pageSize Int
    total Int
  }

  class Quotes {
    data [Quote]
    pagination Pagination
  }

  class Query {
    getAppSettings AppSettings
    getQuoteEnabledForUser(email String!) Boolean
    getQuote(id String) Quote
    getQuotes(organization [String], costCenter [String], status [String], search String, page Int, pageSize Int, sortOrder String, sortedBy String) Quotes
    getChildrenQuotes(id String, page Int, pageSize Int, sortOrder String, sortedBy String) Quotes
  }

  AppSettings --> AdminSetup : adminSetup
  Query --> AppSettings : getAppSettings
  Quote --> QuoteUpdate : updateHistory
  Quote --> QuoteItem : items
  Query --> Quote : getQuote
  Quotes --> Quote : data
  Quotes --> Pagination : pagination
  Query --> Quotes : getQuotes
  Query --> Quotes : getChildrenQuotes

  click Query href "#query"
  click AppSettings href "#appsettings"
  click AdminSetup href "#adminsetup"
  click Quote href "#quote"
  click QuoteUpdate href "#quoteupdate"
  click QuoteItem href "#quoteitem"
  click Quotes href "#quotes"
  click Pagination href "#pagination"
FieldArgumentTypeDescription
getAppSettingsAppSettingsRetrieves the current configuration settings of the B2B Quotes app.
getQuoteEnabledForUserBooleanChecks if the specified user has permission to use the quotes feature.
emailString!Email address of the user to check permissions for.
getQuoteQuoteRetrieves a specific quote by ID.
idStringUnique identifier of the quote to retrieve.
getQuotesQuotesRetrieves a paginated list of quotes and saved carts with optional filters.
organization[String]Filters quotes and saved carts by organization IDs.
costCenter[String]Filters quotes and saved carts by cost center IDs.
status[String]Filters by status: READY, PENDING, REVISED, DECLINED, EXPIRED, or PLACED.
searchStringSearches quotes and saved carts by reference name.
pageIntPage number for pagination.
pageSizeIntNumber of quotes per page.
sortOrderStringSpecifies the sort direction (ASC or DESC).
sortedByStringField to sort the quotes by.
getChildrenQuotesQuotesRetrieves child quotes associated with a parent quote.
idStringID of the parent quote.
pageIntPage number for pagination.
pageSizeIntNumber of child quotes per page.
sortOrderStringSpecifies the sort direction (ASC or DESC).
sortedByStringField to sort the child quotes by.

Mutation

classDiagram
  direction LR
  class AdminSetup {
    cartLifeSpan Int
    quotesManagedBy QuotesManagedBy!
  }

  class AppSettings {
    adminSetup AdminSetup
  }

  class Mutation {
    createQuote(input QuoteInput!) String
    updateQuote(input QuoteUpdateInput!) String
    useQuote(id String, orderFormId String) String
    clearCart(orderFormId String) String
    saveAppSettings(input AppSettingsInput!) AppSettings
  }

  AppSettings --> AdminSetup : adminSetup
  Mutation --> AppSettings : saveAppSettings

  click Mutation href "#mutation"
  click AppSettings href "#appsettings"
  click AdminSetup href "#adminsetup"
FieldArgumentTypeDescription
createQuoteStringCreates a new quote (PENDING status) or saved cart (READY status) from the current shopping cart.
inputQuoteInput!Input data for creating a new quote.
updateQuoteStringUpdates an existing quote or saved cart, including price adjustments, quantities, and status changes.
inputQuoteUpdateInput!Input data for updating the quote.
useQuoteStringApplies a quote or saved cart to the current shopping cart and redirects to checkout.
idStringID of the quote to be applied.
orderFormIdStringID of the order form to apply the quote to.
clearCartStringRemoves all items from the current shopping cart before applying a quote.
orderFormIdStringID of the order form to be cleared.
saveAppSettingsAppSettingsUpdates the B2B Quotes app settings.
inputAppSettingsInput!New configuration to be saved.

Schema description

Arguments must be provided by the user. Required fields are marked with an exclamation mark (!).

AppSettings

FieldTypeDescription
adminSetupAdminSetupConfiguration settings for the B2B Quotes admin.
Query 🔼
Mutation 🔼

AppSettingsInput

FieldTypeDescription
cartLifeSpanIntDefault expiration period in days for quotes and saved carts. The minimum value is 1 day.
quotesManagedByQuotesManagedByDefines who has permission to manage quotes (marketplace admins or individual sellers).
Mutation 🔼

AdminSetup

FieldTypeDescription
cartLifeSpanIntDefault expiration period in days for quotes and saved carts. The minimum value is 1 day.
quotesManagedByQuotesManagedBy!Defines who has permission to manage quotes (marketplace administrators or individual sellers).
AppSettings 🔼

Quotes

FieldTypeDescription
data[Quote]Array of quotes matching the query parameters.
paginationPaginationPagination details for the quotes list.
Query 🔼

Quote

FieldTypeDescription
idStringUnique identifier for the quote.
referenceNameStringUser-defined name to identify the quote or saved cart.
creatorEmailStringEmail address of the user who created the quote.
creatorRoleStringRole of the user who created the quote.
creationDateStringDate and time when the quote was created.
expirationDateStringDate and time when the quote will expire.
lastUpdateStringDate of the last time when the quote or saved cart was updated.
updateHistory[QuoteUpdate]History of all events related to the quote, including creation, discounts, and notes.
items[QuoteItem]Products included in the quote.
subtotalFloatTotal price of all items, including any discounts offered by sales associates.
statusString

Current status of the quote. Possible values are:

  • READY (ready to place the order)
  • PENDING (waiting for review)
  • REVISED (waiting for additional review)
  • DECLINED (can't be used)
  • EXPIRED (past expiration date)
  • PLACED (already used)
organizationStringID of the organization the quote belongs to.
organizationNameStringName of the organization the quote belongs to.
costCenterStringID of the cost center associated with the quote.
costCenterNameStringName of the cost center associated with the quote.
viewedBySalesBooleanIndicates if a sales associate has viewed the quote or saved cart.
viewedByCustomerBooleanIndicates if the customer has viewed the quote or saved cart.
salesChannelStringSales channel associated with the quote or saved cart.
sellerStringID of the seller associated with the quote.
parentQuoteStringID of the parent quote if this is a child quote.
hasChildrenBooleanIndicates if this quote has associated child quotes.
Query 🔼
Quotes 🔼

QuoteInput

FieldTypeDescription
referenceNameStringUser-defined name to identify the quote.
items[QuoteItemInput]List of products to include in the quote.
subtotalFloatTotal price of all items, including any discounts offered by sales associates.
noteStringOptional note that will be visible in the quote's update history to salespeople and organization members.
sendToSalesRepBooleanIf true, creates a quote with PENDING status for sales review. If false, creates a saved cart with READY status.
Mutation 🔼

QuoteUpdate

FieldTypeDescription
emailStringEmail of the user who made the update.
roleStringRole of the user who made the update (such as sales associate or organization buyer).
dateStringDate when the update was made.
statusStringStatus change made in this update, if any.
noteStringOptional comment or instruction added during this update.
Quote 🔼

QuoteItem

FieldTypeDescription
nameStringProduct name.
skuNameStringName of the specific SKU variant.
refIdStringReference ID of the product.
imageUrlStringURL of the product image.
listPriceFloatOriginal price before any discounts.
priceFloatOriginal product price before any discounts.
quantityIntNumber of items.
sellingPriceFloatProduct price including any discounts offered by sales associates.
Quote 🔼

QuoteUpdateInput

FieldTypeDescription
idStringUnique identifier of the quote to be updated.
items[QuoteItemInput]Updated list of products with their quantities and prices.
subtotalFloatUpdated total price of all items.
noteStringOptional comment or instruction that will be displayed in the quote's update history.
declineBooleanWhen true, changes the quote status to DECLINED, preventing further use.
expirationDateStringNew expiration date for the quote or saved cart.
Mutation 🔼

QuoteItemInput

FieldTypeDescription
nameStringProduct name.
skuNameStringName of the specific SKU variant.
refIdStringReference ID of the product.
idStringUnique identifier for the SKU.
productIdStringUnique identifier for the product.
imageUrlStringURL of the product image.
listPriceFloatOriginal price before any discounts.
priceFloatOriginal product price before any discounts.
quantityIntNumber of items.
sellingPriceFloatProduct price including any discounts offered by sales associates.
sellerStringID of the seller offering this item.

Pagination

FieldTypeDescription
pageIntCurrent page number.
pageSizeIntNumber of items per page.
totalIntTotal number of items across all pages.
Quotes 🔼

Enums

QuotesManagedBy

FieldDescription
MARKETPLACEQuotes are managed by the marketplace admins.
SELLERQuotes are managed by individual sellers.
AdminSetup 🔼
See also
Vtex.b2b Quotes Graphql
VTEX IO Apps
VTEX App Store
VTEX IO Apps