- 07 Nov 2024
- 10 Minutes to read
- Print
- DarkLight
CPQ setup
- Updated on 07 Nov 2024
- 10 Minutes to read
- Print
- DarkLight
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:
- Define the external system connection property.
- Define the remote business (ERP) system.
- Define mandatory settings in CPQ.
- Settings Available in CPQ.
- Add Mappings to the Extension File.
- 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:
- Log in to CPQ.
- From the CPQ left navigation area, select Administration.
- From the top navigation bar, select Content Management.
- Select conf to access the application.properties file.
For more information on accessing this file, refer to General property and ontology files
The conf folder is required by the system. Do not delete it.
- 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:
Log in to C4C.
Go to Administrator in the left navigation area and select General Settings.
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.
Select IMC to open a screen where you can see the business instances and communication arrangements for the communication system.
Click Edit to add the new business instance for the ERP system.
Select the System Instances tab to add new ERP system instance.
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).
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 Fragment | Setting Type | Setting Name | Setting Value Range | Purpose |
---|---|---|---|---|
SettingExternalCRM | SettingString | Set 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-ControlInIssEnabled | SettingBoolean | Enables the Quote Status Control in CPQ | true or false | If it is true, the approval flow of the Quote is managed by the CPQ |
SettingExportQuote-Status | SettingBoolean | Enables export of CPQ Quote Status to CRM | true or false | If 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 Fragment | Setting Type | Setting Name | Setting Value Range | Purpose |
---|---|---|---|---|
SettingExportCRM-QuoteCustomField-NamespaceUrl | SettingString | Define the namespace uri used in custom field of quote in C4C. (Example : CPQQuoteStatus | String | To 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. | SettingBoolean | Enables the Quote Status Control in DSP | String | To 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:
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.
Log into C4C.
In C4C, go to Administrator and select General Settings in the left navigation bar.
In the General Settings page, find the Integrations section and click the Communication Arrangements link.
Search for Sales Quote Integration in communication scenario and select it.
Select the Manage Sales Quote In line item.
Click the Download WSDL button.
To open the downloaded WSDL in the SOAP UI:
- Click New SOAP Project in SoapUI
- Click Browse to select the Sales_Quote_Manage.wsdl.
- Click to open the downloaded WSDL in the SOAP UI.
Under Sales_Quote_ Manage > Binding > Maintain Bundle in the left navigation tree, click **Request1 .
Search for the custom field in the WSDL to see which prefix is used for each custom field
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.
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 Code | Description | Customer QuoteResult Status Code | Description | Approval Status Code | Description |
---|---|---|---|---|---|
1 | Open | 1 | Not relevant | 1 | Not started |
2 | In Process | 2 | Pending | 2 | Approval Not Necessary |
3 | Completed | 3 | Won | 3 | In Approval |
4 | Lost | 4 | |||
Rejected | |||||
6 | In Revision | ||||
7 | In 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 Code | Progress Code | Approval Code | CPQ Status | Notes |
---|---|---|---|---|
OPEN | NOT_RELEVANT | NOT_STARTED | OPEN | |
OPEN | NOT_RELEVANT | IN_REVISION | OPEN | |
OPEN | NOT_RELEVENT | IN_APPROVAL | COMPLETED | |
OPEN | PENDING | NOT_STARTED | COMPLETED | |
OPEN | NOT_RELEVANT | APPROVED | APPROVED | |
OPEN | PENDING | APPROVED | APPROVED | |
COMPLETED | PENDING | APPROVED | APPROVED | |
COMPLETED | WON | APPROVED | ACCEPTED | |
COMPLETED | WON | NOT_STARTED | ACCEPTED | |
COMPLETED | WON | APPROVAL_NOT_NECESSARY | ACCEPTED | |
COMPLETED | WON | NOT_FOUND | ACCEPTED | |
COMPLETED | WON | IN-APPROVAL | ACCEPTED | |
COMPLETED | WON | IN_REVISION | ACCEPTED | |
COMPLETED | WON | WITHDRAWN | ACCEPTED | |
COMPLETED | LOST | NOT_STARTED | REJECTED | |
COMPLETED | LOST | NOT_STARTED | REJECTED | |
OPEN | OPEN | If mapping not found and status code is OPEN, MX status will be set to OPEN | ||
PENDING | PENDING | If mapping not found and progress code is PENDING, status will be set to PENDING | ||
WON | WON | If standard mapping was not found and progress code is WON, status will be set to WON | ||
LOST | LOST | If standard mapping was not found and progress code is LOST, CPQ status will be set to LOST | ||
COMPLETED | If none of them are satisfied, the status will be set to COMPLETED. |
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:
- Log into CPQ.
- Go to Administration.
- Select Master Data and then UIProfile.
- Search for HIDE FEATURE WISE UI (QUOTE ) and select it.
- 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: