Skip to main content

Building Workflows and Mappings

Building is the work NxAgent takes on most directly: describe the workflow or the mapping you need, and it produces a draft for you to review. Both features stage their output for your approval rather than writing straight into the application.

Build a workflow

Use Build mode in the NxAgent chat panel to create a workflow from a description.

  1. Open the application you want the workflow to live in.
  2. Open the chat panel and select Build from the mode selector.
  3. Describe the workflow: what triggers it, what it should do, and what it should produce.
  4. Review the proposed workflow in the preview, then accept it.

State the trigger, the steps, and the outcome. A description that names the systems involved and the data moving between them produces a closer first draft than one that describes the goal alone.

Check what already exists

Before building from scratch, NxAgent looks for an existing workflow or template that already does something similar and offers it. Building on something proven is usually faster and lower-risk than starting fresh.

Edit an existing workflow

Open the workflow and describe the change you want:

Add a step after the mapping that writes the result to the ProcessedOrders table.

Add error handling — if the API call fails, log it and send an alert.

Changes apply to the open workflow, not to a copy. If you want a new workflow instead, say so explicitly.

Validation as it builds

NxAgent checks its own work as it goes, so problems surface in the preview rather than at run time. Review the preview before accepting: it is the last point at which a change costs nothing to reject.

Map data between schemas

When data moves between two systems, the shapes rarely match. One system sends customer_name, the other expects firstName and lastName. Rather than connecting fields one at a time, describe the transformation and let NxAgent build the mapping.

What it needs

InputWhy it is needed
SourceThe structure of the data coming in
TargetThe structure you need to produce
A descriptionWhat should go where, in your own words

If the source or target structure is missing, NxAgent asks for it rather than guessing.

Use Auto Map in the mapping screen

This is the usual route, and it keeps you in the mapper where you can see both schemas.

  1. Open the workflow and select the step where the data is transformed.
  2. In the mapper toolbar, select Auto Map.
  3. In the Explain how the mapping should be field, describe the mapping in plain language.
  4. Review the generated connections between source and target.
  5. To revise, reword the description and select Regenerate. To keep the mapping, apply it to the step.

If Auto Map is not available, AI mapping is not enabled for your account. Contact your organization administrator.

What it handles

SituationWhat it does
Straight acrossConnects matching fields between source and target
Different namesWorks out that cust_nm means customerName
Type changesConverts text to numbers, text to dates, and similar
Lists and arraysLoops through every item
Nested dataBuilds structures several levels deep
ConditionsApplies rules such as "only if the status is active"
Multiple casesHandles several branches at once, plus a fallback
Whole sectionsCopies an entire block across in one go
Built-in functionsUses platform functions for formatting, maths, and text
Existing mappingsPoint it at a mapping that is not working and it finds the problem field

Describe a mapping well

TipWhy it helps
Name the fields you care about"Map customer name, email, and phone" beats "map the customer stuff"
Say what to do with lists"For each order" tells it to loop rather than take only the first
Spell out conditions"Only active records", or "if the amount is over 100"
Mention conversions"The date arrives as text and needs to be a real date"
Regenerate rather than hand-fixA clearer description usually beats correcting the output by hand

Map from the chat panel

You can also request a mapping in Build mode without opening the mapper:

Create a mapping from the order schema to the invoice schema. Match the customer fields and calculate the total from the line items.

This suits you if you are already working in the chat panel, or want to talk the mapping through before committing to it.

How you know it worked

The generated workflow or mapping appears as a preview you can inspect. Fields NxAgent could not confidently match are flagged rather than silently skipped — check those first.

Next steps