1

I'm trying to write a small automation bridging Salesforce CPQ and a third-party vendor.

The workflow I would like to address is to (i) generate a CPQ Quote document and (ii) save the generated PDF locally to then send this file somewhere else.

To automate this I need to access the generated PDF quote document using Salesforce REST API but I couldn't find a way to access the data blob like I was used to do with normal Salesforce files (i.e. ContentDocument and ContentVersion).

The only way I can get these documents is to click the 'view' button and download manually the file locally and I need to automate this step.

Does anyone know a way to access these CPQ documents using Salesforce API ?

2

1 Answer 1

0

I'm not sure this will work for you exactly, but there is a field on the quote document object that stores the id of the PDF document. Once the async job is complete, you can query the new quote document (SBQQ__QuoteDocument__c) for the SBQQ__ViewRecordId__c field. This will return the ID of the attachment or document id. You can then retrieve it from the appropriate object using another API call.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.