Skip to main content

Is there an example of using the ‘Configuration Variable’ with A SOQL Query in an Update Variable Value Step?

https://support.docusign.com/s/document-item?language=en_US&bundleId=yks1643320936212&topicId=man1576610096178.html&_LANG=enus

Configuration Variable: Specifies an XML variable whose value contains a valid SOQL query describing the data to read from the Salesforce record. The variable’s value must also contain the schema of the output variable that stores the result. A configuration variable works similarly to a configuration document, except the XML variable’s value gets crafted directly in the workflow. In the Update Variable Value workflow step, you use an expression to craft the SOQL query. The step then assigns the query to an XML variable. Use a configuration variable when your query contains dynamic parameters. The parameters can be dynamically inserted into the SOQL query when using the expression. An example is a query with a WHERE clause that uses a data point whose value might change for each workflow.

The ETL step keeps failing; what would the Update Variable Value step look like?

Hi ​@Jayme D,

It’s recommended to use the Doc Gen form as it’s easier to configure and easier to maintain for customers.

However, if you can’t use the Doc Gen form, here is an example of what the XML file would look like (this example is for querying for data on the Salesforce user object):

<EtlConfig>
    <OutputClass type='ADEXS.Etl.Visitors.FormMappingVisitor, ADEXS.Etl' />
    <Container targetIdentifier='Root'>
        <Container displayName='Custom' type='repeating' targetIdentifier='User' objectType='Composite' sourceIdentifier="Query|UserInfo|SELECT Id, FirstName, LastName FROM User where Email = 'kgatling@docusign.com'" extractionSourceId='SalesforceUser'>
            <Field displayName='UserId' targetIdentifier='UserId' objectType='Text' sourceIdentifier='UserInfo.Id' extractionSourceId='SalesforceUser' />
            <Field displayName='UserFirstName' targetIdentifier='UserFirstName' objectType='Text' sourceIdentifier='UserInfo.FirstName' extractionSourceId='SalesforceUser' />
            <Field displayName='UserLastName' targetIdentifier='UserLastName' objectType='Text' sourceIdentifier='UserInfo.LastName' extractionSourceId='SalesforceUser' />
        </Container>
    </Container>
</EtlConfig>

 

Store this value in a variable. I do this by saving as an XML file, adding XML file to the CLM account and using a Find Document step to find the XML file and store it in a variable. 

Some details:

extractionSourceId (required)
The name of the Salesforce API object name that the query is reading data from. Must have the word Salesforce prepended e.g. to retrieve data from Organization, use SalesforceOrganization

targetIdentifier (required)
Name of the XML node for the Query Results 

displayName (not required)
The value of the display name attribute added to the target identifier xml node

Type (required)
For the purpose of custom SOQL this should be set to repeating so it will return all results from the query 
objectType (required)
This by default is set to Composite 

Hope this helps!
Kelly


@Kelly.Gatling I’ve not able to find any example on how to use “ Excel ETL” workflow step in DocuSign CLM/ SpringCm documentation. Could you please provide an example for “ETL configuration XML file” to be used in “ Excel ETL” Step.  Thanks!

 


Hi ​@Jayme D,

It’s recommended to use the Doc Gen form as it’s easier to configure and easier to maintain for customers.

However, if you can’t use the Doc Gen form, here is an example of what the XML file would look like (this example is for querying for data on the Salesforce user object):

<EtlConfig>
    <OutputClass type='ADEXS.Etl.Visitors.FormMappingVisitor, ADEXS.Etl' />
    <Container targetIdentifier='Root'>
        <Container displayName='Custom' type='repeating' targetIdentifier='User' objectType='Composite' sourceIdentifier="Query|UserInfo|SELECT Id, FirstName, LastName FROM User where Email = 'kgatling@docusign.com'" extractionSourceId='SalesforceUser'>
            <Field displayName='UserId' targetIdentifier='UserId' objectType='Text' sourceIdentifier='UserInfo.Id' extractionSourceId='SalesforceUser' />
            <Field displayName='UserFirstName' targetIdentifier='UserFirstName' objectType='Text' sourceIdentifier='UserInfo.FirstName' extractionSourceId='SalesforceUser' />
            <Field displayName='UserLastName' targetIdentifier='UserLastName' objectType='Text' sourceIdentifier='UserInfo.LastName' extractionSourceId='SalesforceUser' />
        </Container>
    </Container>
</EtlConfig>

 

Store this value in a variable. I do this by saving as an XML file, adding XML file to the CLM account and using a Find Document step to find the XML file and store it in a variable. 

Some details:

extractionSourceId (required)
The name of the Salesforce API object name that the query is reading data from. Must have the word Salesforce prepended e.g. to retrieve data from Organization, use SalesforceOrganization

targetIdentifier (required)
Name of the XML node for the Query Results 

displayName (not required)
The value of the display name attribute added to the target identifier xml node

Type (required)
For the purpose of custom SOQL this should be set to repeating so it will return all results from the query 
objectType (required)
This by default is set to Composite 

Hope this helps!
Kelly

Hey Kelly,
I had a use case for it and I tried your code and it works but I’m unable to add any dynamic data to it. Could you help me understand if in your code I have the email stored in a variable  named emailAddress in the workflow then how can I add that value and then store the complete xml into an xml variable. I have tried all I knew, used all the AI models and colleagues I know of but we aren’t able to add any conditional data.
It would be a great help if you could help me out with the same


@habEshete,

Here is a sample query I found on excel ETL:

 

<EtlConfig outputFileExtension="xml"> <OutputClass type='XMLMappingVisitor' /> <Container targetIdentifier='Parties'> <Container targetIdentifier='Party' type='repeating' sourceIdentifier='Parties.A2:D100000.Row' extractionSourceId='workflowfile'> <Specifications> <Specification type='StringEqualsSpecification' sourceIdentifier='Parties.A2:D100000.D' extractionSourceId='workflowfile'> <Parameter name='ComparisonValue'>Division 1</Parameter> </Specification> </Specifications> <Container targetIdentifier='PartyName' sourceIdentifier='Parties.A2:D100000.A' extractionSourceId='workflowfile' /> <Container targetIdentifier='PartyEntityType' sourceIdentifier='Parties.A2:D100000.B' extractionSourceId='workflowfile' /> <Container targetIdentifier='PartyCode' sourceIdentifier='Parties.A2:D100000.C' extractionSourceId='workflowfile' /> </Container> </Container> </EtlConfig>

 

This is from some internal documentation I found, but I have not used this step before. 

Hope this helps!
Kelly 

 

 


Reply