Happy Business Starts Here

Zuora Support

Zuora api : v1/quotes/document, not adds attachments on opportunity in Salesforce.

In a specific use case user would like to generate dynamicly pdf and word (with quote template) quote document when quote is added in salesforce through API. User used Zuora api : v1/quotes/document with the right data and gets success response with file path in Zuora. However, the file was not added to attachements on opportunity in salesforce. 

 

Please check below the solution for same.






If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

3 REPLIES 3
Zuora Support

Re: Zuora api : v1/quotes/document, not adds attachments on opportunity in Salesforce.

When you generate Quote Document via Zuora API, in output you will get the URL of the generated quote document if the file was successfully generated, it is not attached to the quote automatically. You will need to attach it to the Salesforce Quote/Opportunity using SF call, call Zuora to retrieve the file information, and store as a Blob into the Attachment.

 

Related SF article: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/api/sforce_api_objects_attac...






If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

Master

Re: Zuora api : v1/quotes/document, not adds attachments on opportunity in Salesforce.

Heh - as it happens I just came here to post an example where I've done just that! 

Relevant code is at https://github.com/musmuris/Zuora-Quote-PDF-Generation 

Tags (1)
Zuora Support

Re: Zuora api : v1/quotes/document, not adds attachments on opportunity in Salesforce.

@Nigel Thanks for the sample code, this will be very helpful.






If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √