You can define a formula action to configure products and service bundles directly from any page in the org without having to navigate through the Catalog or Cart page. The custom button allows the Sales rep to configure products or service bundles from any other page in the org by opening the Configuration or Service Configuration pages directly. The Sales rep can configure attributes, options, sub-bundles, and related line items on the configuration pages. For example, you can add the custom button on the Quote Detail page or the Line Item Detail page.

For Service CPQ flow, service products and related line items must already be configured before using this feature. You cannot add a new service bundle to the cart using this feature.

You can define the custom button to either add a new product to the cart or edit an existing product or service in the product configuration which is saved or finalized. For service bundles, you can only configure existing service bundles. The formula for the custom button is different based on the functionality you want to define. 

You must modify URL structures to either add a new product to the cart or edit an existing product in the product configuration. 

You must use the following structures of URL to navigate directly to the Configuration page. Select the URL structure based on how you are configuring the custom setting. You can configure Custom Settings differently for different flows or you can configure common custom settings for all flows. For more information on flow-based settings, see Configuring Custom Settings for Different Flows.

Conga recommends using the URL structure for flow-based custom settings for all buttons for direct access, regardless of the type of custom setting configuration.

TaskCustom Setting Configuration TypeURL
Add a new productCommon

<instanceURL>/apex/Apttus_Config2__Cart#!/flows/<flow name>/businessObjects/<businessObjectsId>/products/<productId>/configure

Flow-based<instanceURL>/apex/Cart?flow=<flow name>#!/businessObjects/<businessObjectsId>/products/<productId>/configure
Edit an existing product or service bundle in the quoteCommon

<instanceURL>/apex/Apttus_Config2__Cart#!/flows/<flow name>/businessObjects/<businessObjectsId>/lines/<primaryLineNumbers>/configure

Flow-based<instanceURL>/apex/Cart?flow=<flow name>#!/businessObjects/<businessObjectsId>/lines/ <primaryLineNumbers>/


To modify the URL you must gather the following values.

ValueDescription
Instance URL

You can find the Instance URL from the URL of any page in your org. For example, https://cpq--test.my.salesforce.com/apex/Cart#!/flows/CartGrid/businessObjects/a0Y7A000001kWce/products/01t3C000002Rao3/configure

Flow name

The name of the flow using which you want to configure your product.  For example, https://cpq--test.my.salesforce.com/apex/Cart#!/flows/CartGrid/businessObjects/a0Y7A000001kWce/products/01t3C000002Rao3/configure

Smart Cart flows and Partner Portal are not supported.

Business Object ID

The ID of your quote/proposal, order, or agreement which you can find in the URL of the Quote Detail page. For example, https://cpq--test.my.salesforce.com/apex/Cart#!/flows/CartGrid/businessObjects/a0Y7A000001kWce/products/01t3C000002Rao3/configure

Product ID

The ID of the product which can find in the URL of the Product Detail page. You need the ID of the product to add a new product to the cart. For example, https://cpq--test.my.salesforce.com/apex/Cart#!/flows/CartGrid/businessObjects/a0Y7A000001kWce/products/01t3C000002Rao3/configure

In the following scenarios, the Sales rep is directed to the Catalog page instead of the Configuration page and CPQ displays anerror message:

  • The Product ID provided is incorrect
  • The Product ID belongs to a different price list that is not associated with the Business Object
  • The Business Object is not associated with any price list.
Primary Line Numer

The Primary Line Number of a product is generated on the line item after the product is added to the cart. You can find the Primary Line Number of the product on the Line Item Detail page. You need the Primary Line Number of the product to edit an existing product in the configuration. For example, https://cpq--test.my.salesforce.com/apex/Cart#!/flows/CartGrid/businessObjects/a0Y7A000001kWce/lines/1/configure


The following use cases describe how to define both the functionalities. The custom button on the Quote Detail page allows the Sales rep to add a new product or service each time the button is clicked. However, the custom button on the Line Item Detail page allows the Sales rep to update and modify the existing product or service.

Custom Button on Quote Detail Page to Add a New Product

On the Quote Detail page, the Sales rep must provide the URL of the product in a custom text field to open the Configuration page for that product. When the Sales rep clicks the custom button on the Quote Detail page, the product corresponding to the URL provided in the custom text field is added to the cart and the Configuration page of that product is displayed. If the Sales rep clicks the button multiple times, the same product is added to the cart again. You must create a custom text field on the Quote/Proposal object where the Sales rep can enter the product URL.

Pre-requisite

Create a custom text field in the Quote/Proposal object.

To create a custom button on Quote Detail page

  1. Go to Setup > Create > Objects and search for Quote/Proposal object.
  2. In the Custom Fields & Relationships related list, click New.
  3. From Step 1. Choose the field type, choose Formula as Data Type, and click Next.
  4. From Step 2. Choose the output type, Type Configure (Flow) in the Field Label. Choose Text as Formula Return Type.
  5. In Step 3. Enter formula, paste the following URL under the Simple Formula tab and click Next:


    Custom Setting TypeURL
    Common
    IF ( LEN( Apttus_QPConfig__PriceListId__c ) > 0 , HYPERLINK("/apex/Apttus_Config2__Cart#!/flows/CartGrid/businessObjects/" &Id & "/products/"&ProductId__c&"/configure" , IMAGE("/resource/Apttus_Config2__Button_Configure", "Configure Products"),"_self"), NULL)
    Flow-based
    IF ( LEN( Apttus_QPConfig__PriceListId__c ) > 0 , HYPERLINK("/apex/Apttus_Config2__Cart?flow=CartGrid#!/businessObjects/" &Id & "/products/"&ProductId__c&"/configure" , IMAGE("/resource/Apttus_Config2__Button_Configure", "Configure Products"),"_self"), NULL)


    Ensure that you enter the name of your Flow setting in the flow parameter in the above formula. In our example, it is CartGrid.

    Ensure that you replace ProductId__c with the name of the custom text field that you created in the Quote/Proposal object.

  6. Select appropriate Field Level Security and click Next.
  7. Choose the page layouts on which you want to display this field.
  8. Click Save.

Custom Button on Line Item Detail page to Edit an Existing Product or Service Bundle

You can add the custom button on the Line Item Detail page to allow the Sales rep to update or modify the existing product configuration of a product or a service bunble. The formula for the custom buttons refers to the Primary Line Number that is generated by CPQ upon adding a product to the cart, to open the Configuration page for the specific product or service bundle.

To create a custom button on the Line Item Detail page

  1. Go to Setup > Create > Objects and search for Line Item object.
  2. In the Custom Fields & Relationships related list, click New.
  3. From Step 1. Choose the field type, choose Formula as Data Type, and click Next.
  4. From Step 2. Choose the output type, Type Configure (Flow) in the Field Label. Choose Text as Formula Return Type.
  5. In Step 3. Enter formula, paste the following URL under the Simple Formula tab and click Next:


    Custom Setting TypeURL
    Common
    IF ( LEN( Apttus_Config2__PriceListId__c ) > 0 && TEXT(Apttus_Config2__LineType__c) = "Product/Service" , HYPERLINK("/apex/Apttus_Config2__Cart#!/flows/CartGrid/businessObjects/" & Apttus_Config2__ConfigurationId__r.Apttus_QPConfig__Proposald__c & "/lines/" & TEXT(Apttus_Config2__PrimaryLineNumber__c)&"/configure", IMAGE("/resource/Apttus_Config2__Button_Configure", "Config"),"_self"), NULL)
    Flow-based
    IF ( LEN( Apttus_Config2__PriceListId__c ) > 0 && TEXT(Apttus_Config2__LineType__c) = "Product/Service" , HYPERLINK("/apex/Apttus_Config2__Cart?flow=CartGrid#!/businessObjects/" & Apttus_Config2__ConfigurationId__r.Apttus_QPConfig__Proposald__c & "/lines/" & TEXT(Apttus_Config2__PrimaryLineNumber__c)&"/configure", IMAGE("/resource/Apttus_Config2__Button_Configure", "Config"),"_self"), NULL)

    Ensure that you enter the name of your Flow setting in the flow parameter in the above formula. In our example, it is CartGrid.

  6. Select appropriate Field Level Security and click Next.
  7. Choose the page layouts on which you want to display this field.
  8. Click Save.