Form Property Prefill Mapping Using XPath

   Journey Manager (JM) The transaction engine for the platform.  |    Platform Developer  |  18.11 This feature was updated in 18.11.

Manager allows you to map form properties to values within the form's seed for prefill purposes using an XPathsXPath (XML Path Language) is a query language for selecting nodes from an XML document. In addition, XPath may be used to compute values (e.g., strings, numbers, or Boolean values) from the content of an XML document. XPath was defined by the World Wide Web Consortium (W3C)..

To map prefill data elements:

  1. Select Forms > Forms.
  2. Locate a form and click Edit.
  3. Select a form version and click Edit Form Data Config.
  4. Click the Property Prefill Mapping tab and click New to create a new mapping.
    Manager create and map a new data element
  5. Select a property scope from the Parameter Scope dropdown list that can be:
    • Client - a property configured for an organization and its forms, so it obtains its value dynamically from an organization.
    • Form - a property configured for form versions, so it obtains its value directly or dynamically from a form version. This property can override Client's scope property.
    • User - a property configured for user profiles, so it obtains the value from a user’s profile of a logged user.
  6. Select a parameter name from the Parameter Name dropdown list, for example, Email.
  7. Enter a XPath to the valid XML element, for example, //AvokaSmartForm/GettingStarted/Eligible/ContactDetails/EmailAddress.
  8. Click Save to update the changes.

    If the XPath value is invalid, the No XML element found for XPath: //EmailAddress error message is displayed, so you need to find the correct XPath to proceed. To do so, Select the Form XML Data tab to validate that the XPath is mapped correctly by checking the form XML structure as shown below:

    <AvokaSmartForm>
    	...
    	<GettingStarted>
    	...
    	<Eligible>
    	...
    	<ContactDetails>
    	   <EmailAddress>
    	   </EmailAddress>
    	...
    	</ContactDetails>
    	....
    </AvokaSmartForm>

  9. Check the created mapping.
  10. Click Close.

Next, go back to form property prefill mapping to finish the configuration.