Mapping Dump Fields
Last updated
Was this helpful?
Last updated
Was this helpful?
Rather than create 'Receive from Keyfax' Mappings for every possible item of data, it may be advantagous to simply 'dump' snippets of the export data generated by Keyfax scripts into large text fields located on the Dynamics form (that launched Keyfax). This may be useful where the data doesn't need to be split out, field by field, but can be accessed in its raw form. It may be that this data might be handled and broken out by internal processes or workflows, or be forwarded to another system, more or less, as-is. In order to dump snippets of the export data, simply create Mappings into Target fields using the naming convention as per these examples:
cust_dump - will output to a text field named cust_dump in XML format (the default)
cust_xmldump - as above
cust_diagnosticdump - will output XML
cust_jsondump - will output JSON
cust_jsondiagnosticdump - will output JSON
cust_diagnosticjsondump - JSON, again
Ignoring the prefix, Target fields with any of these names will usually be Text fields on your form. Make sure these are large enough to hold the maximum amount of expected data. As a guide, a fairly 'standard' Repair Diagnostic produces export data of around 2.5KB of export data. This will be larger for Enquiry or other script types. So, any Target field name ending with the keyword 'dump' will deliver raw XML from the export data. If the keyword 'json' appears anywhere in the name, it will be delivered in JSON format.
IMPORTANT The JSON produced by the JSON dump functionality does not support deeply nested objects and does not consistently represent arrays. For more complex scenarios were reliable JSON is required please see Mapping JSON Results.
Here's an example Mapping. This will read the Repair node(s) from the Keyfax diagnostic's export data and will output it in JSON format to the field 'keyfax_jsondump':
...which may result in content such as this (note: 'root' unsurprisingly is always the root node!):
Similarly a mapping such as this will dump the snippet at Repair into a field named keyfax_xmldump:
...resulting in content such as this: