Solved

Getting Updates from CLM Document

  • 18 April 2024
  • 8 replies
  • 105 views

Badge +1

Hello, Im newer when it comes to CLM and Im having an issue with getting updated information from the Document that is getting updated by end users.

 

How everything is setup:

  1. Form is completed by a user in Salesforce which we pass in field values that then merge into our CLM Document
  2. The new Document triggers the workflow to kickoff.
  3. Then we update Salesforce based on the document and the changes. We want to track changes made in the document with fields that we merged from salesforce. 

The issue:

I have successful been able to update salesforce with hard coded data but when I try to pull the values from Params.TemplateFieldData.FieldName its not showing the updated value from the document its showing what was first passed into the Form at the start of the process. 

Any help would be much appreciated!

icon

Best answer by Kelly.Gatling 22 April 2024, 21:20

View Original

8 replies

Userlevel 5
Badge +12

@jafisher 

It sounds like you’re experiencing an issue with updating Salesforce data from DocuSign. The problem seems to be that the value you’re trying to pull from Params.TemplateFieldData.FieldName in DocuSign is not reflecting the updated value from the document, but rather showing the initial value that was passed into the form at the start of the process.

This could be due to a few reasons:

Caching: Sometimes, systems cache data for performance reasons. If this is the case, the data you’re seeing might be the cached data, not the updated data. You might need to clear the cache or wait for it to update.


Data Synchronization: If the data in Salesforce is updated after the DocuSign envelope is sent, the changes might not be reflected in DocuSign. You might need to ensure that the data is updated in Salesforce before the DocuSign envelope is sent.


Incorrect Field Mapping: The field in DocuSign might not be correctly mapped to the updated field in Salesforce. You might need to check the field mapping in your DocuSign Connect configuration.


API Call Timing: If you’re using an API call to update the data in Salesforce, there might be a delay, or the API call might be happening before the data in DocuSign is updated. You might need to check the timing of the API call.


Without more specific details about your implementation, it’s hard to provide a more precise answer. However, I hope these suggestions help you troubleshoot the issue. If you continue to experience problems, you might want to consider reaching out to DocuSign or Salesforce support for more assistance. They might be able to provide more insight into why the updated data isn’t being reflected in DocuSign. 

Badge +2

Hello! Welcome to the Docusign Community! 

Great job getting Salesforce updated (even with hardcoded data)! To track changes made in the document, you must use a TrackName attribute on the merge tag or a Tracked Content Merge tag wrapped around the doc verbiage.
Via workflow, you would use the Get Tracked Content workflow step to bring any changed document content into the workflow as a variable for referencing. This is the variable data you would reference to update back into Salesforce. Referencing Params.TemplateFieldData.FieldName will always be the original data inputted onto the Document Generation form initially.

To read more about TrackName, see this article and scroll to "TrackName": https://support.docusign.com/s/document-item?language=en_US&bundleId=uqj1643324072491&topicId=clj1674491157243.html

To read more about the Tracked Content merge tag, see this article: https://support.docusign.com/s/document-item?language=en_US&bundleId=uqj1643324072491&topicId=tfj1674510359018.html

I've provided a screenshot of the Get Tracked Content workflow step to use.

 

Badge +1

@Kelly.Gatling 

Thank you for the help on this! 

 

Im still having issues with getting the value after adding the “Get Tracked Content”. When looking at workflow activity I can see the value is being updated under the CDATA section when calling the variable to set it for the salesforce update no update has been done.

 

Params Data for Audit Narrative data

<TrackedContent><UniqueName>Audit_Narrative_1</UniqueName><ParentPath></ParentPath><TrackName>Audit_Narrative</TrackName><Instance>1</Instance><Value><![CDATA[<w:p w:rsidP="3DBF9DC2" wp14:paraId="21A63C78" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordml" wp14:textId="759015D1" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"> <w:pPr> <w:pStyle w:val="Normal" /> <w:suppressLineNumbers w:val="0" /> <w:bidi w:val="0" /> <w:spacing w:before="0" w:beforeAutospacing="off" w:after="200" w:afterAutospacing="off" w:line="276" w:lineRule="auto" /> <w:ind w:left="0" w:right="0" /> <w:jc w:val="left" /> <w:rPr> <w:rFonts w:cs="Arial" w:cstheme="minorAscii" /> <w:sz w:val="20" /> <w:szCs w:val="20" /> </w:rPr> </w:pPr> <w:r w:rsidRPr="3DBF9DC2" w:rsidR="3DBF9DC2"> <w:rPr> <w:rFonts w:cs="Arial" w:cstheme="minorAscii" /> <w:sz w:val="20" /> <w:szCs w:val="20" /> </w:rPr> <w:t>1245 test</w:t> </w:r> </w:p>]]></Value><ValuePlainText>1245 test</ValuePlainText></TrackedContent>

 

This is variable that Im giving to Update the field in salesforce:

<%#XmlVariables.Params.TemplateFieldData.Audit_Narrative%>

 

 

Badge +1

@JohnSantos With my above comment do you think this is the Caching issue?

Badge +2

I believe the problem might be in how you are updating the field in Salesforce. Referencing Params.TemplateFieldData.FieldName will always be the ORIGINAL data inputted onto the Document Generation form. You will want to reference the update from the variable you used to capture the Tracked Content as that contains the new value. It’s better to use a separate variable as the output, do not try and override Params as this might cause confusion. Here is an example:

 

 

 

Additionally, this is a challenging use case to handle as the Track Content variable is in a repeated format if you tracking more than one field change. In the example below, I’m tracking 2 Customer Name field changes so I have two sets of <TrackedContent> in the variable (this is a repeated variable format) 

<TrackedContent>
        <UniqueName>Customer_Name_1</UniqueName>
        <ParentPath/>
        <TrackName>Customer_Name</TrackName>
        <Instance>1</Instance>
        <Value><![CDATA[<w:r xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"> <w:rPr> <w:b /> <w:bCs /> <w:color w:val="0070C0" /> <w:sz w:val="28" /> <w:szCs w:val="28" /> </w:rPr> <w:t>test</w:t> </w:r><w:r w:rsidR="00AF28C6" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"> <w:rPr> <w:b /> <w:bCs /> <w:color w:val="0070C0" /> <w:sz w:val="28" /> <w:szCs w:val="28" /> </w:rPr> <w:t xml:space="preserve"> changes</w:t> </w:r>]]></Value>
        <ValuePlainText>test changes</ValuePlainText>
    </TrackedContent>
    <TrackedContent>

        <UniqueName>Customer_Name_2</UniqueName>
        <ParentPath/>
        <TrackName>Customer_Name</TrackName>
        <Instance>2</Instance>
        <Value><![CDATA[<w:r xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"> <w:rPr> <w:rFonts w:eastAsia="Times New Roman" w:cs="Arial" /> <w:b /> <w:color w:val="0070C0" /> <w:sz w:val="22" /> <w:szCs w:val="22" /> </w:rPr> <w:t>test</w:t> </w:r><w:r w:rsidR="00AF28C6" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"> <w:rPr> <w:rFonts w:eastAsia="Times New Roman" w:cs="Arial" /> <w:b /> <w:color w:val="0070C0" /> <w:sz w:val="22" /> <w:szCs w:val="22" /> </w:rPr> <w:t xml:space="preserve"> new update</w:t> </w:r>]]></Value>
        <ValuePlainText>test new update</ValuePlainText>
    </TrackedContent>

 

To handle, your workflow has to loop through the <TrackContent> nodes to find the correct one to use for the Salesforce update. The ValuePlainText contains my updated value for both fields but since there are two, I have to loop through and find the right one to update for the Salesforce field. You would use a Combination of the ForEachLoop and NextLoop workflow steps to build your loop. 

You may not need this loop if you are only going to be tracking 1 field that changes. 

 

 

Badge +1

@Kelly.Gatling Is their another way of doing what Im trying to accomplish because this has to be done with 100’s of fields and tracking the changes and syncing those back to Salesforce?

 

If not Im trying to follow the steps that I need to do to get the track fields:

Step 1: Get Tracked Content - This needs to be set to a new variable. Done

Step 2: ForEachLoop

  • When trying to do this step im not seeing an iterator that I can use how can I set one?

Step 3: Next Step

  • Im not seeing NextStep but I see Next loop is that what I need to use?
Badge +2

An iterator variable has to be created and then set based on what you are looping on (for example: set it to TrackedContent which is repeated in the tracked content xml). 

Apologies - yes it’s “Next Loop” which I’ve corrected in my above statement. 


To my knowledge, I do not know of a better way to do this. Although, with it being a more advanced used case, it would be better to reach out to your Docusign Account team to see what available support options you have (Professional Services, Partner, or Customer Success) and one of these options will be well equipped to help you dive into the details of this particular use case. 


 

Userlevel 2
Badge +7

Hello!

 

I hope you are doing well. Try creating a iterator variable. The for loop is promising.

 

If there are any questions, please do not hesitate to reach out.
 
Very Respectfully,
Justin Jiang

 

Reply