cancel
Showing results for 
Search instead for 
Did you mean: 

How to trigger CPI flow from CPQ custom action?

sbslmhmt
Participant
0 Kudos
516

Hello everyone,

We would like to trigger CPI flow via CPQ custom action similar to "Place order to ERP" button does.

Anyone knows how to achive this?

Best regards.

Accepted Solutions (1)

Accepted Solutions (1)

yogananda
Product and Topic Expert
Product and Topic Expert

HI sbslmhmtWhat's your use case for using custom action why not Standard one?
If you want to call through custom action, then you have to write a script to call rest-client authentication with your CPI endpoint

sbslmhmt
Participant
0 Kudos

Hello yoganandamuthaiah ,

Thank you for your answer, our use case is basically sending quote to ERP before sales order.

If you want to call through custom action, then you have to write a script to call rest-client authentication with your CPI endpoint

Could you please aloborate on how to achive this?

Best regards.

yogananda
Product and Topic Expert
Product and Topic Expert

Hi

you can try this below example to call rest-client authentication. Change according to your need and call it through custom action.

#example of url service
url = 'https://testcallidus.com/CallidusPortal/services/some-example-service'

headers = { }

#example of input JSON data
data = '[{"name": "SaaS Net New Revenue", "periodType": "month", "type": "Measurement", "value": { "amount": 100, "unitType": "USD" }}]'

#make HTTPS POST and receive response in form of dynamic entity
response = RestClient.Post('AuthorizationCertificate' ,url, data, headers)

#Populate Quote custom fields
Quote.GetCustomField('Bonus type').Content = response.name
Quote.GetCustomField('Bonus amount').Content = str(response.value.amount)
Quote.GetCustomField('Bonut unit type').Content = response.value.unitType

Answers (0)