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.
Settings
Create the document, select XML as the document type, then follow the instructions below.
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.
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."
- 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.
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.
XML Document Configuration
Form Model Version
V1 forms can only use V1 documents. V2 documents have a different format, and they are only compatible with V2 forms. Select the appropriate Form Model Version from the dropdown. If you do not see this option, it means that ProntoForms will automatically create the correct document version for you.
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.
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:
Sample XML Documents
V1
This sample uses a page from a Safety Meeting form that includes a timestamp, a dropdown question, and a multiselect question.
<pages>
<page name="Safety Meeting Details">
<answers>
<answer label="Date" dataType="Timestamp">
<question>Date</question>
<values>
<value>
<provided>
<time>2017-11-22T14:35:00-05:00</time>
<zone>America/Toronto</zone>
</provided>
<shifted>2017-11-22T14:35:00-05:00</shifted>
</value>
</values>
</answer>
<answer label="Employee conducting" dataType="FreeText">
<question>Employee conducting safety meeting</question>
<values>
<value>Harry Ford</value>
</values>
</answer>
<answer label="Attending" dataType="FreeText">
<question>Employees Attending</question>
<values>
<value>Sarah Porter</value>
<value>Scott Stevenson</value>
<value>Mary Caruthers</value>
<value>Harry Ford</value>
</values>
</answer>
</answers>
</page>
</pages>
V2
This sample uses a page from a Work Order form detailing required equipment. The first 'page' contains a regular section, aka a flow section. The Repeatable Section 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>