CPQ setup
  • 07 Nov 2024
  • 10 Minutes to read
  • Dark
    Light

CPQ setup

  • Dark
    Light

Article summary

Before beginning import and export processes for accounts, quotes, and partners with SAP Cloud for Customer (C4C), you must also set up Zilliant CPQ to communicate with C4C.

Primary setup tasks are:

  1. Define the external system connection property.
  2. Define the remote business (ERP) system.
  3. Define mandatory settings in CPQ.
  4. Settings Available in CPQ.
  5. Add Mappings to the Extension File.
  6. Map the Namespaces for Custom Fields.

Define the external system connection properties

To make a web service call, you must define the properties in the CPQ application.properties file.

Complete the following setps to access the file:

  1. Log in to CPQ.
  2. From the CPQ left navigation area, select Administration.
  3. From the top navigation bar, select Content Management.
  4. Select conf to access the application.properties file.
    For more information on accessing this file, refer to General property and ontology files
Important

The conf folder is required by the system. Do not delete it.

  1. In the application properties file, define the following properties:
Cloud for Customer Settings:
com.imc. webapp.app.crm.enabled = true
com.imc.app.iss.integration.cfcUrl = https://my######.crm.ondemand.com
com.imc webapp.app.id.remote businesssytem =######
com.imc.webapp.app.keystore.password =###
com.imc.app.iss.integration.cfcUsername=#####
com.imc.app.iss.integration.cfcPassword=#####

The folllowing list provides descriptions of the properties and settings:

  • com.imc.webapp.app.crm.enabled—set to True if the customer wants to integrate with the C4C.
  • com.imc.app.iss.integration.cfcUrl—URI of the customer’s SAP Cloud For Customer (C4C).
  • com.imc.webapp.app.id.remote.businesssytem—ERP system that connects with the defined C4C.
  • system.com.imc.webapp.app.keystore.password—the web service keystore password that was used while downloading the keystore file from C4C.

Define the remote business (ERP) system

The remote business system refers to the ERP system. This information is needed to get the ERP ID of the account object and to export the ERP Sales Document ID to C4C.

The ERP ID shows up in the document flow and external document section of the C4C quote. The name of the ERP system is defined in [application.properties] and should be obtained from the implementation partner. An example follows:

* com.imc.webapp.app.id.remote.businesssytem=ERPIMC 

To define the business system in C4C:

  1. Log in to C4C.

  2. Go to Administrator in the left navigation area and select General Settings.

  3. In the General Settings page, go to the Integrations section and click the Communication Systems link to define a new communication system, or choose the one defined for integration with CPQ.

    General Settings: Integration

  4. Select IMC to open a screen where you can see the business instances and communication arrangements for the communication system.

  5. Click Edit to add the new business instance for the ERP system.

  6. Select the System Instances tab to add new ERP system instance.

  7. Click Add Row and enter the System Instance ID as ERPIMC (the ERP system instance ID is to be obtained from the actual ERP system).

  8. Click Save and Close.

When the CPQ quote is sent to ERP, the ERP sales document ID is also exported back to C4C. It should show up as follows in C4C if the setup of a remote business system is successful.

Define mandatory settings in CPQ

The following table lists settings you must define in CPQ.

Setting FragmentSetting TypeSetting NameSetting Value RangePurpose
SettingExternalCRMSettingStringSet the external CRM system ID (supported examples: CFC or SFDC)CFC, etc.This is to indicate the type of CRM system to integrate with the DSP. Currently, CFC was used to integrate.
SettingQuoteStatus-ControlInIssEnabledSettingBooleanEnables the Quote Status Control in CPQtrue or falseIf it is true, the approval flow of the Quote is managed by the CPQ
SettingExportQuote-StatusSettingBooleanEnables export of CPQ Quote Status to CRMtrue or falseIf it is true, DSP will set the quote status in C4C to be Rejected, Won/Lost
If the namespace and prefix of custom fields in C4C are not the same as the standard ones, the following settings are needed to be defined as customized namespace and prefix for custom fields.
Setting FragmentSetting TypeSetting NameSetting Value RangePurpose
SettingExportCRM-QuoteCustomField-NamespaceUrlSettingStringDefine the namespace uri used in custom field of quote in C4C. (Example : CPQQuoteStatusStringTo map with the name space used in DSP’s WSDL with the one obtained from customer system.
To map with the name space used in DSP’s WSDL with the one obtained from customer system.SettingBooleanEnables the Quote Status Control in DSPStringTo map wit the prefix used in DSP’s WSDL with the one obtained from customer system.

Settings available in CPQ

The following lists describe each setting available in CPQ and provides code examples for each.

SettingQuoteStatusControlInIssEnabled

This setting is used to enable the approval workflow in external system. By default, the approval workflow will be controlled in an external system. In order to enable the approval workflow in DSP, it is necessary to set it to be true, otherwise, the external quote status will be mapped to the DSP sales document status.

     <rdf:Description rdf:about="&as; SettingQuoteStatusControlInIssEnabled"
<as:settingValueBoolean rdf:datatype="&xsd;boolean">true</as:settingValueBoolean>
           </rdf:Description>

SettingImportOpportunityQuoteEnabled

This setting is used to disable the importing of opportunity associated with quote. By default, it will not import the associated opportunity of quote. To enable importing the associated opportunity of imported quote, the following settingValueBoolean needs to define in application-implementation.owl.

           <rdf:Description rdf:about="&as; SettingImportOpportunityQuoteEnabled ">
<as:settingValueBoolean rdf:datatype="&xsd;boolean">true</as:settingValueBoolean>
           </rdf:Description>

SettingImportOpportunityPartnersEnabled

This setting is used to enable the importing/synchronizing of associated partners of opportunity. By default, importing the opportunity will not import the associated partners of opportunity.

        <rdf:Description rdf:about="&as; SettingImportOpportunityPartnersEnabled">
<as:settingValueBoolean rdf:datatype="&xsd;boolean">true</as:settingValueBoolean>
           </rdf:Description>

SettingImportQuotePartnersEnabled

This setting is used to enable the importing/synchronizing of associated partners of quote. By default, importing the quote will not import the associated partners of quote.

       <rdf:Description rdf:about="&as; SettingImportQuotePartnersEnabled">
<as:settingValueBoolean rdf:datatype="&xsd;boolean">true</as:settingValueBoolean> 
         </rdf:Description>

SettingExportCRMQuoteCustomFieldPrefix

This setting is used to change the prefix for the custom fields (such as CPQQuoteStatus, CPQQuoteDiscount, CPQSalesItemDiscount,etc) if the name space and prefix used in custom fields are not same.

   <rdf:Description rdf:about="&as; SettingExportCRMQuoteCustomFieldPrefix">
<as:settingValueString rdf:datatype="&xsd;string">$$$</as:settingValueString>     
           </rdf:Description>

SettingExportCRMQuoteCustomFieldNamespaceUrl

This setting is used to change the namespace for the custom fields (such as CPQQuoteStatus, CPQQuoteDiscount, CPQSalesItemDiscount,etc) if the prefix used in the custom fields are not same.

 <rdf:Description rdf:about="&as; SettingExportCRMQuoteCustomFieldNamespaceUrl">
<as:settingValueString rdf:datatype="&xsd;string">$$$</as:settingValueString>     
           </rdf:Description>

SettingExportQuoteOptionalSalesItem

This setting is used to export optional line items with zero prices. By default, all the optional line items will be exported with price if there is no SPARQL to set zero prices.

   <rdf:Description rdf:about="&as; SettingExportQuoteOptionalSalesItem">
<as:settingValueBoolean rdf:datatype="&xsd;boolean">true</as:settingValueBoolean>
           </rdf:Description>

SettingExportQuoteStatus

This setting is used to change the C4C quote status (example OPEN, COMPLETED, WON OR LOST).

  <rdf:Description rdf:about="&as; SettingExportQuoteStatus">
<as:settingValueBoolean rdf:datatype="&xsd;boolean">true</as:settingValueBoolean>
           </rdf:Description>

SettingExportQuoteProposalReport

This setting is used to enable to export the proposal report for every quote status. By default, it will be exported to C4C if the quote is accepted or rejected.

 <rdf:Description rdf:about="&as; SettingExportQuoteProposalReport">
<as:settingValueBoolean rdf:datatype="&xsd;boolean">true</as:settingValueBoolean>
           </rdf:Description>

SettingExportQuoteAttachments

This setting is used to enable to export the attachments of quote for every quote status. By default, the attachments will only be exported to C4C if the quote is accepted or rejected.

<rdf:Description rdf:about="&as; SettingExportQuoteAttachments">
<as:settingValueBoolean rdf:datatype="&xsd;boolean">true</as:settingValueBoolean>
           </rdf:Description>

SettingExportQuoteWebServiceMonitoring

This setting is used to log the payload of the web service for import process as well as the export process. However, setting this to be true could decrease the performance thus it is recommended to enable when necessary.

      <rdf:Description rdf:about="&as; SettingExportQuoteAttachments">
<as:settingValueBoolean rdf:datatype="&xsd;boolean">true</as:settingValueBoolean>
           </rdf:Description>

SettingEnableImportCFCStatusWONLOSTOnly

If this setting is enabled, CPQ will update the Sales Document Status only when the Quote in C4C is set as won or lost and DSP is configured to use C4C status.

Add the mapping to extension fields

To map extension fields in C4C into CPQ, the following calculated Business Data Attributes (BDAs) are needed to define the SPARQL customization based on the business requirements. Following is a list of the BDAs:

  • objectName[0]** is mapped to CPQQuoteStatus
  • cpqQuoteDiscount BDA is mapped to CPQQuoteDiscount
  • cpqSalesItemDiscount BDA is mapped to CPQLineItemDiscount

Following are examples of SPARQL code that can be used to map the CPQ fields and C4C custom fields:

CPQ C4C SPARQL Code Sample 1

CPQ C4C SPARQL Code Sample 2

Map the namespaces for custom fields

Custom fields such as CPQQuoteStatus, CPQQuoteDiscount, and CPQSalesItemDiscount might have different namespaces and prefixes in the WSDL used by CPQ.

Therefore, you must change the default namespace and prefix by the following two settings if necessary:

  • SettingExportCRMQuoteCustomFieldPrefix: Define the prefix used for custom field of quote in C4C.( Example : CPQQuoteStatus )
  • SettingExportCRMQuoteCustomFieldNamespaceUrl: Define the namespace uri used in custom field of quote in C4C. For example, CPQQuoteStatus.

To obtain the prefix and namespace of the custom fields, it is necessary to open the WSDL file from C4C.

  1. Log into C4C.

  2. In C4C, go to Administrator and select General Settings in the left navigation bar.

  3. In the General Settings page, find the Integrations section and click the Communication Arrangements link.

  4. Search for Sales Quote Integration in communication scenario and select it.

  5. Select the Manage Sales Quote In line item.

  6. Click the Download WSDL button.

  7. To open the downloaded WSDL in the SOAP UI:

    1. Click New SOAP Project in SoapUI
    2. Click Browse to select the Sales_Quote_Manage.wsdl.
    3. Click to open the downloaded WSDL in the SOAP UI.
  8. Under Sales_Quote_ Manage > Binding > Maintain Bundle in the left navigation tree, click **Request1 .

  9. Search for the custom field in the WSDL to see which prefix is used for each custom field

  10. Look for the namespace used in the following custom fields:

    • CPQQuoteStatus: For example, a00:CPQLineItemDiscount.
    • CPQQuoteDiscount: For example, a00:CPQQuoteDiscount
    • CPQLineItemDiscount. For example, a00:CPQLineItemDiscount.
  11. Check the PRE and NAMESPACE in first line

Deactivate the Approval Flow in CPQ

CPQ allows you to disable the approval flow.

  • If the approval setting is TRUE, the approval process of the Sales Quote is managed by CPQ.
  • If the approval setting is FALSE, the approval process is controlled in C4C.

Note the limitations in mapping between status codes in C4C status codes in CPQ.

      <rdf:Description rdf:about="&as; SettingQuoteStatusControlInMXEnabled">
<as:settingValueBoolean rdf:datatype="&xsd;boolean">true</as:settingValueBoolean>
           </rdf:Description>

In C4C, there are three Statuses that indicate the lifecycle of a Quote as shown in the following table:

Customer Quote LifeCycle Status CodeDescriptionCustomer QuoteResult Status CodeDescriptionApproval Status CodeDescription
1Open1Not relevant1Not started
2In Process2Pending2Approval Not Necessary
3Completed3Won3In Approval
4Lost4
Rejected
6In Revision
7In Withdrawn

By disabling the approval control in CPQ, the application uses the following quote statuses returned from C4C, and maps them to the CPQ SalesDocumentStatus using predefined mapping.
For more information on approval flow and statuses in CPQ, see Approval process.

  • CustomerQuoteLifeCycleStatusCode
  • CustomerQuoteResultStatusCode
  • ApprovalStatusCode

The C4C quote status is imported from C4C and mapped to the CPQ sales document status. The CPQ quote status is exported as a custom field to C4C. The following table shows the mapping between the C4C quote status and the CPQ sales document status.

Status CodeProgress CodeApproval CodeCPQ StatusNotes
OPENNOT_RELEVANTNOT_STARTEDOPEN
OPENNOT_RELEVANTIN_REVISIONOPEN
OPENNOT_RELEVENTIN_APPROVALCOMPLETED
OPENPENDINGNOT_STARTEDCOMPLETED
OPENNOT_RELEVANTAPPROVEDAPPROVED
OPENPENDINGAPPROVEDAPPROVED
COMPLETEDPENDINGAPPROVEDAPPROVED
COMPLETEDWONAPPROVEDACCEPTED
COMPLETEDWONNOT_STARTEDACCEPTED
COMPLETEDWONAPPROVAL_NOT_NECESSARYACCEPTED
COMPLETEDWONNOT_FOUNDACCEPTED
COMPLETEDWONIN-APPROVALACCEPTED
COMPLETEDWONIN_REVISIONACCEPTED
COMPLETEDWONWITHDRAWNACCEPTED
COMPLETEDLOSTNOT_STARTEDREJECTED
COMPLETEDLOSTNOT_STARTEDREJECTED
OPENOPENIf mapping not found and status code is OPEN, MX status will be set to OPEN
PENDINGPENDINGIf mapping not found and progress code is PENDING, status will be set to PENDING
WONWONIf standard mapping was not found and progress code is WON, status will be set to WON
LOSTLOSTIf standard mapping was not found and progress code is LOST, CPQ status will be set to LOST
COMPLETEDIf none of them are satisfied, the status will be set to COMPLETED.
Important

The approval process for the quote should be enabled in C4C so that the response from the web service returns an approval code. Otherwise, no mapping will be found, and the CPQ quote status will always show as Completed.

If the approval is controlled in C4C, hide the following UI elements in the feature-based UI Profile in CPQ.

To hide UI elements complete the following:

  1. Log into CPQ.
  2. Go to Administration.
  3. Select Master Data and then UIProfile.
  4. Search for HIDE FEATURE WISE UI (QUOTE ) and select it.

CPQ UI Profile

  1. Define the following UI component IDs that are related to the approval process in CPQ.
  • id_quote_button_action_submit
  • id_quote_button_action_withdraw
  • id_quote_button_action_accepted
  • id_quote_button_action_rejected

The following image shows the Hide Feature WISE UI:

CPQ Define UI Components


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.