B2B-GRAPHQL-UAT-API

(0 reviews)

Mutation

Commerce Modern – Mutation Operations

This document describes all root Mutation operations exposed by the Commerce Modern API, along with the key input and result types, and the common interfaces, scalars, and enums they rely on.

All mutations are defined on the Mutation type in common.s and are state-changing operations.

Queries| Mutations| Subscriptions

1. Mutation Operations

1.1 createEstimate

Signature

createEstimate(input: EstimateInput): Estimate

Description

Creates a new estimate using the provided estimate details (header, line items, parties, pricing context, etc.).

Used when starting a new pricing/estimate scenario.

1.2 updateEstimate

Signature

updateEstimate(input: EstimateInput): Estimate

Description

Updates an existing estimate.

Supports partial or full updates, allowing clients to change quantities, items, discounts, dates, and other estimate attributes.

1.3 deleteEstimate

Signature

deleteEstimate(input: [EstimateInput]): Estimate

Description

Deletes one or more estimates identified in the input list.

Depending on backend rules, this may perform a logical (soft) or physical (hard) delete.

1.4 cloneEstimate

Signature

cloneEstimate(input: EstimateInput): Estimate

Description

Creates a new estimate by cloning an existing one.

All eligible header and line-level details are copied, and a new estimate identifier is created.

1.5 shareEstimate

Signature

shareEstimate(input: EstimateInput): Estimate

Description

Shares an estimate with additional users or partner contacts.

Typically updates sharing configuration, access control, or collaboration metadata on the estimate.

1.6 createQuote

Signature

createQuote(input: QuoteInput): Quote

Description

Creates a new quote using the provided QuoteInput.

Often used to convert an estimate into a quote or to directly create a quote in deal/offer flows.

1.7 updateQuote

Signature

updateQuote(input: QuoteInput): Quote

Description

Updates an existing quote with new or modified information—such as pricing, terms, products, or parties.

1.8 deleteQuote

Signature

deleteQuote(input: [QuoteInput]): Quote

Description

Deletes one or more quotes identified in the input list.

May be subject to business rules (for example, only draft quotes can be deleted).

1.9 cloneQuote

Signature

cloneQuote(input: QuoteInput): Quote

Description

Creates a new quote by cloning an existing one, including applicable header and line data.

Useful for “renewal”, “follow-on”, or “what-if” quoting scenarios.

1.10 shareQuote

Signature

shareQuote(input: QuoteInput): Quote

Description

Shares a quote with other users or partners, updating access control and collaboration configuration on the quote.

1.11 submitOrder

Signature

submitOrder(input: OrderInput): Order

Description

Submits a new order for processing.

Typically used after validating and finalizing cart/quote information, and may trigger downstream orchestration and fulfillment.

1.12 validateOrder

Signature

validateOrder(input: OrderInput): Order

Description

Validates an order prior to submission.

Runs business and technical checks (for example, eligibility, credit, inventory, pricing) and returns an Order with validation messages and status.

1.13 changeOrder

Signature

changeOrder(input: ChangeOrderInput): Order

Description

Applies changes to an existing order (for example, address changes, item changes, cancellations, or modifications).

The exact behavior depends on the underlying order orchestration and lifecycle rules.

1.14 updateMySubscription

Signature

updateMySubscription(input: MySubscriptionInput): MySubscriptionResult

Description

Updates the current user’s subscription details or settings.

May include operations such as changing term, options, entitlements, or other subscription attributes allowed for modification.

1.15 cancelMySubscription

Signature

cancelMySubscription(input: [MySubscriptionInput]): MySubscriptionResult

Description

Cancels one or more of the current user’s subscriptions based on the inputs provided.

Result includes business status and messages that indicate success, partial success, or failure for each requested cancellation.

1.16 acknowledgeEvent

Signature

acknowledgeEvent(input: EventInput): EventResult

Description

Acknowledges one or more events delivered to the client (for example, via subscription or polling).

Typically used to mark events as processed so they are not re-delivered or to advance offset/state in event workflows.

1.17 acknowledgeAlert

Signature

acknowledgeAlert(input: AlertInput): AlertResult

Description

Acknowledges one or more alerts associated with orders, subscriptions, billing, or other business objects.

Used to close or mark alerts as handled in the system.


Reviews