Magento 2 Quote SystemMagento 2 Quote System
Live Demo
Buy Now
Support
Live Demo
Buy Now
Support
  • Getting Started

    • Introduction
    • Requirements
    • Installation
    • Activate & Connect
  • Configuration

    • Overview
    • General
    • Product Display
    • Button & Cart
    • Conversation
    • Workflow
    • Attachments
    • Dynamic Form
    • Email
  • Using the Extension

    • Enable a Product
    • Requesting a Quote
    • The Quote Cart
    • Guest Quotes
    • My Quotes
    • Managing Quotes in Admin
    • Conversation
    • Purchasing a Quote
    • GraphQL API
  • Help

    • Troubleshooting
    • FAQ

GraphQL API

The whole storefront flow is available over GraphQL, so a PWA or headless front end can offer quoting without the Luma or Hyvä templates.

Point your client at the store's usual /graphql endpoint. Customer operations use the standard Authorization: Bearer <customer token> header; guest operations identify the cart by a masked ID instead.

Queries

QueryReturns
raqConfigThe storefront settings — whether quoting is on, guests are allowed, minimums, attachment rules, dynamic fields
raqCartThe open quote cart of the customer, or of the guest identified by raq_cart_id
raqQuotesThe submitted quotes of the signed-in customer, filtered and paged
raqQuoteOne quote, by id for the owner or by token for a guest

Two fields are added to existing types:

FieldOnMeaning
wk_raq_enabledProductInterfaceWhether this product can be quoted
quote_system_enabledstoreConfigWhether the extension is on for this store

Mutations

MutationDoes
createRaqCartCreates an empty guest quote cart and returns its masked ID
addProductsToRaqCartAdds products with the price the buyer proposes
updateRaqCartItemsChanges quantity, proposed price or note on lines
removeItemFromRaqCartRemoves a line — child lines go with their parent
clearRaqCartEmpties the quote cart
submitRaqCartSends the request, or starts email verification
verifyRaqQuoteConfirms the emailed code
resendRaqVerificationCodeSends the code again
postRaqMessagePosts a conversation message
markRaqQuoteReadClears the buyer's unread count
purchaseApprovedQuoteAdds an approved quote to the shopping cart at the negotiated prices

A guest flow, end to end

mutation {
  createRaqCart {
    raq_cart_id
  }
}

Keep the returned raq_cart_id and pass it to every later call.

mutation {
  addProductsToRaqCart(
    raq_cart_id: "aBcD1234..."
    cart_items: [
      {
        sku: "24-MB01"
        quantity: 10
        requested_price: 28.50
        note: "Bulk order for a corporate gift run."
      }
    ]
  ) {
    raq_cart {
      items { id product { name } quantity requested_price }
      subtotal { value currency }
    }
  }
}
mutation {
  submitRaqCart(input: {
    raq_cart_id: "aBcD1234..."
    email: "buyer@example.com"
    firstname: "Alex"
    lastname: "Brown"
    note: "Please quote for delivery before the end of the month."
  }) {
    quote { increment_id status }
    requires_verification
  }
}

If requires_verification comes back true, a code has been emailed — confirm it:

mutation {
  verifyRaqQuote(input: { raq_cart_id: "aBcD1234...", code: "123456" }) {
    quote { increment_id status }
  }
}

Product options

Options use the same inputs as Magento's own addProductsToCart, so anything your front end already does for the shopping cart works here unchanged:

InputUse
selected_optionsChosen option UIDs — configurable variants, dropdown custom options
entered_optionsValues the customer types
bundle_optionsBundle selections
grouped_optionsThe children of a grouped product — specific to quoting
dynamic_fieldsAnswers to your dynamic form fields

Tips

For a configurable, pass the child SKU as sku and the parent's as parent_sku, exactly as addProductsToCart expects.

Attachments

Attachments can be read over GraphQL but not uploaded — Magento's GraphQL endpoint has no multipart upload. Headless front ends that need uploads should post the file to a REST endpoint of their own and attach it server-side.

Full reference

Every type, field and argument is documented in API.md, shipped in the extension package as UserGuideGraphQl.txt. The schema is also introspectable, so tools like GraphQL Playground and Altair will autocomplete against it.

Prev
Purchasing a Quote