- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
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 √
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
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 √
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
@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 √
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
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 √
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
@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 √