Skip to Content
Technical Articles

SAP Cloud for Customer and SAP CPQ Integration using web services

Hi All,

In this blog, I will be sharing how we can integrate SAP CPQ API integration in SAP Cloud for Customer using web service integration and ABSL coding.

The SAP CPQ API are available in two services. One is Admin Web services which has 7 operations and one is User Web services which has close to 30 operations.

The web services description file and details can be referred in the following link.

User Operations:- http://www.webcomcpq.com/wsAPI/CPQAPI.asmx

Admin Operations:- http://www.webcomcpq.com/wsAPI/wssrv.asmx

The web services of SAP CPQ are flexible to use. However, we need to understand the parameter which we have to pass in order to make the web services working and functional to use.

I have taken a simple example here where SAP C4C and SAP CPQ integration is done using external web services configuration via ABSL coding.

Create a Communication System in SAP C4C

The WSDL of SAP CPQ needs to be imported using external web service integration.

I name this as ExternalWebService_CPQ.

Once the web service is added then communication scenario needs to be created.

Create a communication arrangement

 

In the communication arrangement when using userid/pwd, the userid needs to be given as cpq user id # domain. If domain is not given then API call will not happen.

The service can be tested in Cloud Application Studio

Checking DoUSeeMe service. This is like a ping or a heartbeat service to check if communication from source system (SAP C4C) to SAP CPQ system is successful or not.

Results will give the username and domain

The endpoint URL for CPQ services

  • <CPQ URL>/wsAPI/CPQAPI.asmx – this is the set of user level functions
  • <CPQ URL>/wsAPI/wssrv.asmx –      this is the set of admin level functions

I have taken user level functions so the endpointURL will be <CPQ URL>/wsAPI/CPQAPI.asmx. If SOAPUI tool is used for checking then use version greater than 5.4.0. SOAPUI with lesser version may not be able to invoke the SAP CPQ API successfully.

You can even use Postman tool as per convenience.

Request will be

<soap:Envelope xmlns:soap=”http://www.w3.org/2003/05/soap-envelope” xmlns:web=”http://webcominc.com/”>
<soap:Header/>
<soap:Body>
<web:doUSeeMe>
<!–Optional:–>
<web:username>CPQ USER ID # DOMAIN</web:username>
<!–Optional:–>
<web:password>PASSWORD</web:password>
</web:doUSeeMe>
</soap:Body>
</soap:Envelope>

Response:-

<soap:Envelope xmlns:soap=”http://www.w3.org/2003/05/soap-envelope” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema”>
<soap:Body>
<doUSeeMeResponse xmlns=”http://webcominc.com/”>
<doUSeeMeResult><![CDATA[<ICANSEEYOU><USERNAME>CPQ USER ID</USERNAME><DOMAIN>DOMAIN</DOMAIN></ICANSEEYOU>]]></doUSeeMeResult>
</doUSeeMeResponse>
</soap:Body>
</soap:Envelope>

ABSL Coding:-

When calling the service in Custom BO or standard BO extension then we need to use Library to get the web services variables. The code will look something like this

import ABSL;

var Request : Library::ExternalWebService_CPQ.doUSeeMe.Request;

var Response =

Library::ExternalWebService_CPQ.doUSeeMe(Request, ” ” , “<Communication Scenario Name>”);

var output = Response.doUSeeMeResult;

Now the output variable will have the results of external web service and it can be used in SAP C4C for further processing.

Be the first to leave a comment
You must be Logged on to comment or reply to a post.