Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Salesforce Merging Product Line Items

New Here ,
Jan 31, 2018 Jan 31, 2018

I need assistance merging Product Line Items into a file. I am using a Contract as the Master Object type in the Agreement Template and not Opportunity.  In V19 of the Field Mapping & Templates, it states "In the Map Salesforce Product Line Item Fields to Adobe Document Fields section, you can add product lists tied to an opportunity."  which I do thru the Reference Object Opportunity.  The Agreement's Account, Opportunity, and Contract lookups are properly populated and all the Object Fields in the Merge Mapping are properly populated in the file.  The only exception are the Product Line Item merge fields which are not being populated.  I used the example steps to create the merge fields as listed in the reference document.

1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 29, 2020 Jul 29, 2020

Did you find any solution?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 18, 2022 Aug 18, 2022
LATEST

You will need to use the "Form Field Name" from the product mapping section of the merge mapping you have set up and then put this in the word document as a normal tag i.e. {{formfieldname}} but you will need to add a number at the end to reference the number of the line item

{{formfieldname1}}

{{formfieldname2}}

etc

The main issue with this is that a business presumably sells very different numbers of products to each customer. So if you might sell 100 line items but most clients buy 20 line items then the template will end up with 100 rows 80 of which will remain blank. These templates are not dynamic and add the number of rows that are related to the opportunity. 

 

One workaround that I have used for a client whose contracts would not have more than 10 rows is create a template for each option 1-10. A custom field on the opportunity rolls up a count of the product lines. Then using an CASE statement in the button that generates the contract insert the correct template ID. I have given an example of that button below:

{! URLFOR('/apex/echosign_dev1__AgreementTemplateProcess', null, [masterId= Opportunity.Id ]) }&templateID={!CASE(Opportunity.Count_Opp_Lines__c,1,relevanttemplateID1,2,relevanttemplateID2,3,relevanttemplateID3,4,relevanttemplateID4,5,relevanttemplateID5,6,relevanttemplateID6,7,relevanttemplateID7,8,relevanttemplateID8,9,relevanttemplateID9,10,relevanttemplateID10,Error)}

This is not the nicest workaround and will mean that any change to a template has to be made 10 times but best I could work out.

 

Possible enhancement Adobe?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines