XML Documents

About

Output data from your submitted forms in an XML format, for integration with your backend system. There are different options for structuring and customizing your XML format.

XML documents can be sent to cloud and enterprise services, web services, and more. A number of document types are available, and multiple documents can be sent with a single form submission. Read more about documents here.

Note:If an XML document is linked to a Multi-Language Form, the document displays form content in the form’s Selected Language. The document shows translated form content based on the form’s translation file. The key names and question Unique IDs don’t change. For your integrations, use the question Unique IDClosed A Unique ID refers to the specific identifier of a question, form page, form section, or Data Destination. Unique IDs are used as reference points when pulling data for conditional logic, Analytics projects, Data Destinations, and Documents. and not the question text.

Settings

Create the document, select XML as the document type, then follow the instructions below.

XML option on the Create Document page

Document Basics

Name/Description

Give the document a unique name. Optionally provide a description.

Filename

This name applies to all instances of the document, including downloaded documents and documents sent by Data Destinations.

Tip:A recognizable file name can help you quickly search for and identify files when:
  • You download files from multiple form submissions so that you can work locally.

  • You or your customers receive multiple messages generated by Email Destinations.

  • Use Data Reference Expression Language to reference answers in your forms.
  • Static text can also be included.
  • For example, %r -- %a[Customer Name] would name the file like "20140812-180001002  -- John Smith."

filename.png

  • Some data destinations will overwrite files with duplicate names. Make sure file names are unique by including one or more of:
    • %r - the submission's reference number -- e.g. 20140920-1815562464
    • %r[id] - the submission's ID - e.g. 1815562464
    • %t - the time the form was submitted

Document Timezone Source

Choose a document time zone source. This is the time zone for all dates and times in your document.

  • Team Preference Setting: Will use the time zone chosen for the team
  • Data Record: Will use the time zone the form submission is made from (as chosen on the mobile device).
  • Custom: Choose a time zone.

Document Time Zone Source

Auto-Link new forms to this document

Selecting this option will add the document as an "Additional Document" to forms created or imported after this option is set. Submissions made against these forms will be downloadable in this document format from the Data & Analytics tab of the portal.

autolink.png

XML Document Configuration

Embed attachments within the Data Record Document 

This will include the attachment "bytes" property, which is necessary if you need to use the images collected at any point.

Data Node Format

This setting changes how the nodes containing question/answer information are named. Read more about these options.

  • Standard: Uses generic, standardized node names for page, section, and question nodes.
  • Question Labels as Node Names: Uses the question's Unique ID in place of the generic question/answer node name.
  • All Labels as Node Names: Uses the page, section, and unique IDs in place of the generic page, section, and question node names.

2018-01-04-V2FB-DocsDataNodeFormat.png

Learn more about Unique IDs.

Image Compression Ratio

Enter a value between 0 and 1 to compress images embedded in this document. Compression will reduce the size of the document, at the cost of image quality. 0 is completely compressed, 1 is no compression.

When setup is complete, press "Create." Link the document to a form in order to use it. For instructions:

Form Settings: Documents

"Create" and "Cancel" an event document

Sample XML Document

Changes to the Data Record Format:
For TrueContext REST APIs and JSON/XML document formats, we maintain a practice of not deleting existing properties or objects. A mechanism for versioning is used to facilitate deletions to our JSON/XML formats when necessary. Customers will be contacted in advance if they will be affected.
However, we will occasionally add new properties to existing APIs to support new features in the TrueContext Platform. We do not create a new version of our APIs for new properties, and we advise that clients of our APIs are resilient to additions by ignoring unknown properties. Client applications should ignore any properties that are not relevant to their use case.

This sample uses a page from a Work Order form detailing required equipment. The first 'page' contains a regular sectionClosed A Regular Section is a set of related questions grouped together for easy reference. The data captured is “non-repeating”. That is, field users enter a single instance of each answer., aka a flow section. The Repeatable SectionClosed A Repeatable Section is a subform that contains a set of related questions. The data captured is “repeating”, because the field user can complete the same subform more than once, which creates multiple entries. contains three entries.

Regular Sections: Referred to as "flow section" in the XML, these are sections that can contain questions in a standard format.

Repeatable Section: A section containing a set of questions that can be answered multiple times. Each set of answers is displayed in a row node in the XML. For more information on Repeatable Sections, please read: Overview: Repeatable Sections.

<page label="AIBt" name="Account Information (Bill to:)">
<sections>
<section type="Flow" label="New Section 2" name="Contact Information">
<answers>
<answer label="Account - Name" dataType="FreeText">
<question>Account Name</question>
<values>
<value>LBM Drilling and Construction</value>
</values>
</answer>
<answer label="Account - Contact" dataType="FreeText">
<question>Account Contact</question>
<values>
<value>Virginia Lewis</value>
</values>
</answer>
<answer label="Account - Phone" dataType="PhoneNumber">
<question>Phone number</question>
<values>
<value>555-955-8202</value>
</values>
</answer>
<answer label="Account - Email" dataType="EmailAddress">
<question>Email</question>
<values>
<value>vlewis@email.com</value> </values>
</answer>
</answers>
</section>
</sections>
</page>
<page label="Equipment Info" name="Equipment Information">
<sections>
<section type="Repeat" label="Equipment details" name="Collect details about equipment">
<rows>
<row>
<pages>
<page label="ED" name="Equipment Details">
<sections>
<section type="Flow" label="Select Part" name="Select Part">
<answers>
<answer label="Make" dataType="FreeText">
<question>Make</question>
<values>
<value>Equipment Make 4</value>
</values>
</answer>
<answer label="Model" dataType="FreeText">
<question>Model</question>
<values>
<value>4A</value>
</values>
</answer>
<answer label="Serial" dataType="FreeText">
<question>Serial #</question>
<values>
<value>987653242</value>
</values>
</answer>
</answers>
</section>
</sections>
</page>
</pages>
</row>
<row>
<pages>
<page label="ED" name="Equipment Details">
<sections>
<section type="Flow" label="Select Part" name="Select Part">
<answers>
<answer label="Make" dataType="FreeText">
<question>Make</question>
<values>
<value>Equipment Make 5</value>
</values>
</answer>
<answer label="Model" dataType="FreeText">
<question>Model</question>
<values>
<value>5A</value>
</values>
</answer>
<answer label="Serial" dataType="FreeText">
<question>Serial #</question>
<values>
<value>5645756</value>
</values>
</answer>
</answers>
</section>
</sections>
</page>
</pages>
</row>
<row>
<pages>
<page label="ED" name="Equipment Details">
<sections>
<section type="Flow" label="Select Part" name="Select Part">
<answers>
<answer label="Make" dataType="FreeText">
<question>Make</question>
<values>
<value>Equipment Make 1</value>
</values>
</answer>
<answer label="Model" dataType="FreeText">
<question>Model</question>
<values>
<value>1B</value>
</values>
</answer>
<answer label="Serial" dataType="FreeText">
<question>Serial #</question>
<values>
<value>23123124312</value>
</values>
</answer>
</answers>
</section>
</sections>
</page>
</pages>
</row>
</rows>
</section>
</sections>
</page>