Conga Product Documentation

Welcome to the new doc site. Some of your old bookmarks will no longer work. Please use the search bar to find your desired topic.

Merging Images from Salesforce Files

How to merge an image from Salesforce Files into Microsoft.

You can merge images from Salesforce Files in Conga Composer.

Tip: We highly recommend queries and formulas are copied and pasted into supported Text Editors. Ensure single-quote marks are used. Avoid curly brackets and double-quote marks.

To merge an image from Salesforce Files:

  1. Build a custom formula field on the Salesforce Files Object to form a URL to the Content document: (Salesforce Classic) Navigate toSetup > Build > Customize > Salesforce Files > Field


    • (Salesforce Lightning) Navigate to Setup > Object Manager > Content Version > Fields and Relationships > New
  2. Create a new formula Field.
    • For example, Field Image URL: LEFT( $Api.Enterprise_Server_URL_100, FIND( ".com", $Api.Enterprise_Server_URL_100 ) + 4)& "sfc/servlet.shepherd/version/renditionDownload?rendition=THUMB720BY480&versionId=" & Id & "&operationContext=CHATTER"
  3. Write a Conga query to retrieve the formula field. Use the dot syntax to go from the ContentDocumentLink Object up through the ContentDocument through the LatestPublishedVersion Object to retrieve the custom formula:

    SELECT ContentDocument.Latestpublishedversion.Field_Image_URL__c FROM ContentDocumentLink WHERE LinkedEntityId = '{pv0}' AND ContentDocument.FileType IN ('PNG','JPG','JPEG')

  4. Use the Detail Regions and the IMAGE special merge field to merge the image into the template.

    For example in Microsoft Word: {{TableStart:FileImage}}{{IMAGE:LATESTPUBLISHEDVERSION_FIELD_IMAGE_URL:W=350}}{{TableEnd:FileImage}}