How to define a cross reference table or codelist in XML to X12  mapping?

  • 6 September 2023
  • 1 reply


How to define a cross reference table or codelist in XML to X12  mapping?


Collect = CC

Prepaid = PP

Per Contract = DE


Best answer by James B 6 September 2023, 19:12

View original

1 reply

Userlevel 4

This is something that you would want to address in a previous step in the flow, prior to generating the XML for the X12 connector to translate. There are multiple ways to approach this, but in general, I would recommend that you do one of the following:


  1. Use a set of conditionals in the XML Map to map alternate conditions to the same element (use for small numbers of values)


To do this, you’ll want to create multiple nodes in your XML file that are mapped to the same value, but have alternate conditionals applied:

For each conditional, use a different value in the condition, and hard code the expression:


  1. Use the Custom Script to create a select/case statement for that node for a larger finite list using the arc:select and arc:case keywords. Whatever is set in result.text before the code block exists will be the result:



If you have a larger list to sort through, you can use the 

  1. Use the Lookup Action of a corresponding database connection to look up the value from a table where those values are stored (for large lists or ones that require dynamic updates)



This would be used as a separate processing step in your flow instead of being used within XML Map, but for queries that would return a single value (which can be repeated if there are multiple matching XPaths for the lookup), this will amend the XML to include a new node in the output, which you can map against directly in the XML Map step