AI Accelerator, Map
Give the Accelerator chat the source shape, the destination shape, and the rules between them, and it generates the XSLT for an Art2link map.
Maps fail in a particular way: the XSLT compiles, the map runs, and a field comes out empty or wrong, because the Accelerator guessed at a field that wasn’t obvious from the schema names alone. The way to avoid that class of failure is to put the source shape, the destination shape, and the field-level intent all on the table in the prompt, before any XSLT gets written. It is good at lining fields up by meaning, so the pairs that are obvious you can leave to it; the pairs that are not obvious are exactly the ones to spell out.
None of the following is required. Ask for a map in a sentence and you get a map. These are the facts the Accelerator cannot infer, so each one you include is one it does not have to guess:
- The source shape, sample, schema, or both.
- The destination shape, sample, schema, or both.
- Field-level mapping intent, which source field feeds which destination field, including any field whose mapping is not obvious from name similarity.
- Per-field transformations, format conversions, casing, defaulting, conditional logic.
- Lookups or enrichments, whether a destination field needs data from a custom function (database lookup, API call, computed value) and which function to use.
- Loop and grouping rules, how many destination records correspond to how many source records, and what the grouping key is.
- How missing or empty source data should be represented in the destination.
Pasting a real source sample and a real destination sample is the shortest route to a good first draft; it settles the two shapes in one move and leaves the prompt to cover the rules between them.
A request like this states all of it and gets the map back in one pass. Note the transformations, the loop rule, and the missing-value behaviour, all named rather than assumed:
Generate a map from an inbound EDI 850 purchase order to our canonical PurchaseOrder JSON. Map BEG03 to orderNumber and BEG05 to orderDate, converting CCYYMMDD to an ISO date. Turn each PO1 loop into a lines[] entry with sku from PO1-07, quantity from PO1-02, and unitPrice from PO1-04. Look up the buyer name from the N1*BY party. When unitPrice is missing, output 0. Group every PO1 line under the one order.