Skip to main content
Version: V2

Configure Price Quote

Configure Price Quote engines are the part of the solution that guides the frontend user through the process of creating a quote.
They are central to ensuring accurate and efficient sales operations, from retrieving current pricing and discount data to finalizing offers and generating contracts.

Entities Involved

Here are the primary entities involved in the sales process as supported by the Configurator API:

  • Attachment: Represents a document that can be used when generating the PDF of the contract.
  • Cart: A set of products and/or services composed of a main product/service and any additional product/service selected during the offert configuration process.
  • Configurator: A specific tool used to define product and/or service combinations and rules.
  • Contract: The entity that contains all the information in the contract.
  • ContractPdf: A legally binding document generated after finalizing the quote.
  • Customer: A registered client associated with the quote being configured.
  • Product: An item available for configuration, which can be a main product/service or an add-on.
  • Quote: The offer being prepared for the customer. It is comprised of all the carts.
  • QuotePdf: The finalized PDF version of the offer.

Entity Relationships

Below is a diagram illustrating the relationships between the entities:

Features and Functionalities

The configurator API has the following functionalities:

1. Retrieve Available Configurators

  • Endpoint: GET /v2/cpq/list

  • Use Case: Returns a list of all available configurators that can be used to start a configuration session.

  • Example:

      fetch('https://api.apparound.com/v2/cpq/list', {
    method: 'GET',
    headers: {
    'Authorization': 'Bearer <accessToken>',
    'Content-Type': 'application/json'
    }
    })
    .then(response => {
    if (!response.ok) {
    throw new Error(`Errore HTTP: ${response.status}`);
    }
    return response.json();
    })
    .then(cpqs => {
    let cpqId;
    for (let { name, id } of cpqs) {
    if (name === "Sample Cpq") {
    cpqId = id;
    break;
    }
    }
    console.log("Cpq found:", cpqId);
    })
    .catch(error => {
    console.error("Request error:", error);
    });

    2. Initialize Configuration Session

    • Endpoint: POST /v2/cpq/{cpqId:int}/customer/{customerId:int}/init
    • Use Case: Initializes a new session for a specific configurator.
    • Example:
        fetch('https://api.apparound.com/v2/cpq/48425/customer/14/init', {
    method: 'POST',
    headers: {
    'Authorization': 'Bearer <accessToken>',
    'Content-Type': 'application/json'
    },
    body: ''
    })
    .then(response => {
    if (!response.ok) {
    throw new Error(`Error HTTP: ${response.status}`);
    }
    return response.json();
    })
    .then(data => {
    const { sessionId, tofList: [tof] } = data;
    console.log("Session ID:", sessionId);
    console.log("TOF ID:", tof.id);

    })
    .catch(error => {
    console.error("Request error:", error);
    });

3. Manage Carts and Products

  • Endpoint: POST /v2/cpq/{cpqId:int}/tof/{tofId:int}/addcart
  • Use Case: Creates a cart containing a main product linked to a newly generated quote.
  • Example:
    fetch('https://api.apparound.com/v2/cpq/48425/tof/2/addcart', {
    method: 'POST',
    headers: {
    'Authorization': 'Bearer <accessToken>',
    'Content-Type': 'application/json',
    'X-SessionId' : <sessionId>
    },
    body: JSON.stringify({
    "productId" : 1,
    "tofProductId": 1,
    "customerId" : 14,
    "customerQuoteId" : 15,
    "label" : "Test Gas"
    })
    })
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error("Request error:", error));

Endpoint: POST /v2/cpq/{cpqId:int}/tof/{tofId:int}/addcart&quoteId=1001

  • Use Case: Creates a new cart starting from a main product but linked to an existing quote with identifier 1001.

  • Example:

    fetch('https://api.apparound.com/v2/cpq/48425/tof/2/addcart&quoteId=1001', {
    method: 'POST',
    headers: {
    'Authorization': 'Bearer <accessToken>',
    'Content-Type': 'application/json',
    'X-SessionId' : <sessionId>
    },
    body: JSON.stringify({

    })
    })
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error("Request error:", error));
  • Endpoint: POST /v2/cpq/{cpqId:int}/quote/{quoteId:long}/basket/{basketId:long}/parent/{parentId:long}/additemtocart

  • Use Case: Add a product or add-on under a specific parent item in the cart.

  • Example:

    fetch('https://api.apparound.com/v2/cpq/48425/quote/1001/basket/201/parent/301/additemtocart', {
    method: 'POST',
    headers: {
    'Authorization': 'Bearer <accessToken>',
    'Content-Type': 'application/json',
    'X-SessionId' : <sessionId>
    },
    body: JSON.stringify({
    "offerTypeId": 3,
    "productId": 23,
    "offerTypeProductId": 49,
    "itemUniqueId": "cd1c3010-aea5-438a-8f20-55c1b2778476"
    })
    })
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error("Request error:", error));
  • Endpoint: DELETE /v2/cpq/{cpqId:int}/quote/{quoteId:long}/basket/{basketId:long}/node/{nodeId:long}/parent/{parentId:long}

  • Use Case: Remove a specific item from a cart under a given parent.

  • Example:

    fetch('https://api.apparound.com/v2/cpq/48425/quote/1001/basket/2001/node/401/parent/301', {
    method: 'DELETE',
    headers: {
    'Authorization': 'Bearer <accessToken>',
    'X-SessionId' : <sessionId>
    }
    })
    .then(response => {
    if (response.ok) {
    console.log("Item removed successfully");
    }
    })
    .catch(error => console.error("Request error:", error));
  • Endpoint: DELETE /v2/cpq/{cpqId:int}/quote/{quoteId:long}/basket/{basketId:long}

  • Use Case: Remove an entire cart from the current quote.

  • Example:

    fetch('https://api.apparound.com/v2/cpq/48425/quote/1001/basket/2001', {
    method: 'DELETE',
    headers: {
    'Authorization': 'Bearer <accessToken>',
    'X-SessionId' : <sessionId>
    }
    })
    .then(response => {
    if (response.ok) {
    console.log("Cart removed successfully");
    }
    })
    .catch(error => console.error("Request error:", error));
  • Endpoint: PUT /v2/cpq/{cpqId:int}/quote/{quoteId:long}/basket/{basketId:long}/quantity

  • Use Case: Change the quantity of a specific product/service in the cart.

  • Example:

    fetch('https://api.apparound.com/v2/cpq/48425/quote/1001/basket/2001/quantity', {
    method: 'PUT',
    headers: {
    'Authorization': 'Bearer <accessToken>',
    'Content-Type': 'application/json',
    'X-SessionId' : <sessionId>
    },
    body: JSON.stringify({
    quantity: 5
    })
    })
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error("Request error:", error));
  • Endpoint: GET /v2/cpq/{cpqId:int}/tof/{tofId:int}/validproducts

  • Use Case: Get the list of products/services that can be added to the cart for a given TOF.

  • Example:

    fetch('https://api.apparound.com/v2/cpq/48425/tof/123/validproducts', {
    method: 'GET',
    headers: {
    'Authorization': 'Bearer <accessToken>',
    'X-SessionId' : <sessionId>
    }
    })
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error("Request error:", error));
  • Endpoint: GET /v2/cpq/{cpqId:int}/customer/{customerId:int}/quote/{quoteId:long}/toflist

  • Use Case: Retrieve the list of TOFs for a specific quote.

  • Example:

      fetch('https://api.apparound.com/v2/cpq/48425/customer/14/quote/1001/toflist', {
    method: 'GET',
    headers: {
    'Authorization': 'Bearer <accessToken>'
    }
    })
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error("Request error:", error));

  • Endpoint: GET /v2/cpq/{cpqId}/quote/{quoteId}/applicableDiscounts

  • Use Case: Retrieve Applicable Discounts for a Quote.

  • Example:

      fetch('https://api.apparound.com/v2/cpq/48425/quote/1001/applicableDiscounts', {
    method: 'GET',
    headers: {
    'Authorization': 'Bearer <accessToken>',
    'Content-Type': 'application/json',
    'X-SessionId' : <sessionId>
    }
    })
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error("Request error:", error));
  • Endpoint: PUT /v2/cpq/{cpqId}/quote/{quoteId}/applyDiscounts

  • Use Case: Update the quote by applying one or more discounts to the products or services in the cart.

  • Example:

      fetch('https://api.apparound.com/v2/cpq/48425/quote/1001/applyDiscounts', {
    method: 'PUT',
    headers: {
    'Authorization': 'Bearer <accessToken>',
    'Content-Type': 'application/json',
    'X-SessionId' : <sessionId>
    },
    body: JSON.stringify({
    "appliedDiscounts": [
    25
    ],
    "extraDiscountList": [
    {
    "discountId": 26,
    "discountValue": 30
    }
    ]
    })
    })
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error("Request error:", error));
  • Endpoint: PUT /v2/cpq/{cpqId}/quote/{quoteId}/reprice

  • Use Case: Recalculate the prices for the quote.

  • Example:

      fetch('https://api.apparound.com/v2/cpq/48425/quote/1001/reprice', {
    method: 'PUT',
    headers: {
    'Authorization': 'Bearer <accessToken>',
    'Content-Type': 'application/json',
    'X-SessionId' : <sessionId>
    },
    body: JSON.stringify({
    "activationPrice": 20,
    "recurringPrice": 10,
    "basketId": 2001,
    "cartItemId": 3041
    })
    })
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error("Request error:", error));
  • Endpoint: GET /v2/cpq/{cpqId}/tof/{tofId}/package/{quoteId}

  • Use Case: Retrieve the package configuration for a specific quote and TOF.

  • Example:

      fetch('https://api.apparound.com/v2/cpq/48425/tof/2/package/1001', {
    method: 'GET',
    headers: {
    'Authorization': 'Bearer <accessToken>',
    'X-SessionId' : <sessionId>
    }
    })
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error("Request error:", error));
  • Endpoint: POST /v2/cpq/{cpqId}/package

  • Use Case: Add a new package configuration to the CPQ.

  • Example:

      fetch('https://api.apparound.com/v2/cpq/48425/package', {
    method: 'POST',
    headers: {
    'Authorization': 'Bearer <accessToken>',
    'Content-Type': 'application/json',
    'X-SessionId' : <sessionId>
    },
    body: JSON.stringify({
    "customerId": 14,
    "customerQuoteId": 20,
    "packageId": 1,
    "tofId": 123,
    "quoteId": 1001,
    "assigneeUserId": 0
    })
    })
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error("Request error:", error));
  • Endpoint: PUT /v2/cpq/{cpqId}/quote/{quoteId}/changePricelist

  • Use Case: Change the price list associated with a quote.

  • Example:

      fetch('https://api.apparound.com/v2/cpq/48425/quote/1001/changePricelist', {
    method: 'PUT',
    headers: {
    'Authorization': 'Bearer <accessToken>',
    'Content-Type': 'application/json',
    'X-SessionId' : <sessionId>
    },
    body: JSON.stringify({
    "pricelistId": 2,
    "cartId": 2001
    })
    })
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error("Request error:", error));

4. Manage Contract

  • Endpoints:
    • POST /v2/attachment/file/quote/{quoteId:long}/attachmentType/{attachmentType}: Save an attachment.
    • DELETE /v2/attachment/{attachmentid:int}/quote/{quoteId:long}: Delete an attachment.
    • GET /v2/attachment/{attachmentid:int}/quote/{quoteId:long}: Download an attachment.
    • POST /v2/contract/{quoteId:long}/generate: Generate a contract from the quote.
  • Use Case: Manage contracts and their associated attachments.

5. Manage Contract Signature

  • Endpoints:
    • POST /v2/signature: Send a request to sign the contract via email.
    • DELETE /v2/signature: Remove the request for signature of the contract.
  • Use Case: Handle the process of contract signature requests.

Process Overview

Steps to Create a Quote

Below is a diagram showing the main steps to create a quote using the Configurator API:


Quote Lifecycle Stages

Below is a stage diagram showing how a quote evolves through the sales process: