• Last edited on: 13 April 2016

cXML Webform Data

As part of Release 11 and later versions of Release 10, Webform Data can now be transmitted on cXML Purchase Orders. Only webform fields marked as public will be transmitted via cXML. Below is documentation for guiding suppliers on how to parse the data contained within a webform and the associated field responses. 

Form Responses will be output at the ItemDetail level, in the following format:

<Extrinsic name="FORM_NAME">
<Value name="LABEL">VALUE</Value>
<Array name="LABEL">
  • Only public fields will be exported
  • If the field is an array, then the Array tag will be generated.
  • If the field is not an array, then the Value tag is used.
  • Edge case: The Extrinsic name should be unique within an ItemDetail. It is possible for the FORM_NAME to clash with a purchase order's custom field's name. In this case, we will automatically add a sequence number, starting from 1, to the name of the name. For example, if "basic_details" conflicts, the second instance will be automatically renamed to "basic_details1"
  • From cXML's User's Guide, page 137:
    Each named Extrinsic can appear only once within the lists associated with the OrderRequestHeader and individual ItemOut elements (within the contained ItemDetail elements). The same name must not appear in both the OrderRequestHeader list and any list associated with the ItemOut elements. If the same Extrinsic name and value is repeated in all ItemOut lists, it should be moved to the OrderRequestHeader.

For example, if the public_labels fields, for a "Basic Details" web form, returns the following data:

{9=>["Name", "Benjamin", :external], 10=>["Age", "23", :external], 11=>["Gender", "Female", :external], 12=>["Like", ["", "Shrimp", "Fish"], :external], 13=>["Country", "Taiwan", :external], 14=> ["Biography", "Kesera sera\nWhat ever will be will be\nThe future is up to me", :external]}

We will generate:

<Extrinsic name="Basic Details">
<Value name="Name">Benjamin</Value>
<Value name="Age">23</Value>
<Value name="Gender">Female</Value>
<Array name="Like">
<Value name="Country">Taiwan</Value>
<Value name="Biography">Kesera sera
Whatever will be will be
The future is up to me</Value>