SAP Configure, Price and Quote APIs with OAuth2SAMLBearerAssertion |
SAP CPQ configure, price, and quote solution is part of the SAP Customer Experience solutions portfolio. Furthermore, SAP CPQ offers a reach palette of integration capabilities with other SAP Solutions, for instance, with SAP Commerce Cloud So how does SAP Configure, Price and Quote relate to SAP Kyma and SAP Cloud SDK? Surprise, surprise... |
With API you can update quotes, execute quote actions, create customers or business partners, update users and so on.
For example, if a company uses a separate application to process shipping information after an order has been placed, SAP CPQ API can be used to update a quote with shipping information, such as a tracking number, tracking URL, estimated shipping date, and so on.
The focus of this brief is the SAP CPQ REST APIs with Token API Authentication as documented here: SAP CPQ API Documentation | SAP Help SAP CPQ API Documentation | SAP PDF. |
executeHttpRequest
SAP Cloud-SDK method with a built-in resilience mechanism.OAuth 2.0 Assertion Profiles authentication is implemented in SAP CPQ with the aim of standardizing server-to-server authentication. This type of authentication allows administrators to generate an access token without relying on the logged-in user (no need to store passwords).
Issuer - the URL of the system to which the access token needs to be issued. From that URL users will be accessing SAP CPQ .
redirect_uri
is to be used only with the Authorization code grant type so best is to void it.SAP BTP sub-account and instance level destination definitions |
For the assertionIssuer property to work, one would need to have KeyStoreLocation and KeyStorePassword defined (a key pair) for a SAP CPQ destination.
Otherwise, as a fallback, the sub-account's trust key pair would be used, but these settings are configured to always use the issuer which doesn't have https://.
The solution here is to generate or upload a keystore (for example in a p12 file) through the Certificates button, and point KeyStoreLocation to the name of such certificate, with KeyStorePassword as the appropriate password if applicable. Then the assertionIssuer property of a destination would work.
user_name
if NameId
selected in SAP CPQ OAuth2 client definition, as depicted above)https://<approuter host>/srv/harmony?destination=cpq-anywhere&path=/customapi/executescript?scriptname=GetOpportunityQuotes
{
"data": [
{
"Quotes": [
{
"DateCreated": "<DateCreated>",
"Offer_Exp_Date": "<Offer_Exp_Date>",
"EditableforSAP": null,
"QuoteEngine": "Quote 1.0",
"TotalSummary": {
"TotalRevenue": 0,
"Service": 0,
"Cloud": 0,
"TotalContractValue": 0,
"OnPremise": 0
},
"OnPremiseRevenue": false,
"DealHealth": "High Risk",
"ContractStart": "<ContractStart>",
"ProcessTypeCode": null,
"IsECS": false,
"ServiceRevenue": false,
"QuoteNumber": "<QuoteNumber>",
"LinkedServicesContract": "New Contract",
"CMSID": "",
"CloudRevenue": true,
"Currency": "EUR",
"QuoteStatus": "Quote In Progress",
"Description": null,
"ValidUntilDate": "<ValidUntilDate>",
"Total": 0,
"ProcessType": "",
"WriteAccess": true,
"IsMain": true,
"QuoteStatusId": 45,
"RestructureType": null,
"PSBundleExtConfigFlag": false,
"ReadAccess": true,
"VisibletoChannelPartner": null,
"ContractEnd": "<ContractEnd>",
"WorkAtRisk": false
}
],
"OpportunityId": "<OpportunityId>"
}
]
}
curl
command as explained here.You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
17 | |
16 | |
11 | |
9 | |
9 | |
8 | |
8 | |
8 | |
7 | |
7 |