How-toInfor M3 (M3 Business Engine)MEC (M3 Enterprise Collaborator)

How to Build a Grid Mapping in M3 Enterprise Collaborator (MEC)

Question
How to create a grid mapping in M3 Enterprise Collaborator

Also searched as

  • MEC grid mapping tutorial
  • M3 Enterprise Collaborator EDI setup
  • MEC collection process delivery flow explained
  • how does MEC map incoming EDI to M3 API

Short answer

M3 Enterprise Collaborator (MEC) moves data between an external format (EDI, flat file, XML) and M3's own API by chaining a collection step (getting the document in), a grid mapping step (field-level transformation from source structure to M3 API call structure), and a delivery step (executing the mapped MI transaction). Building a new mapping means defining the source document structure, building the grid that maps each source field to its M3 API field, and testing with representative sample documents before going live.

Applies to: Infor M3 Enterprise Collaborator (MEC), all M3 Business Engine versions that ship with MEC as the integration/EDI middleware

Build a new MEC grid mapping

  1. 1Confirm the M3 API transaction the mapping will ultimately call (for example OIS100MI.Add for a sales order line) and pull its full field list before starting the mapping, since the grid's target side is defined by that transaction's input fields.
  2. 2Define the collection step for the source document - the file type, EDI standard/version (X12, EDIFACT) or XML schema, and where MEC will pick it up from (folder, AS2, queue).
  3. 3Create the grid mapping object and load or define the source structure so MEC knows each source field's name, position, and data type.
  4. 4Map each required M3 API field to its source counterpart in the grid, applying any transformation (date format, code translation, concatenation) at the field level rather than pre-processing the source file.
  5. 5Build code/value translation tables for anything that does not map one-to-one, such as an external customer or item code that needs to resolve to the internal M3 key.
  6. 6Set default or derived values for M3 API fields the source document does not supply but the transaction requires, so the API call is not rejected for a missing mandatory field.
  7. 7Configure the delivery step to call the mapped MI transaction and define what MEC should do with the M3 API response - log success, route errors to a review queue, or trigger a notification.
  8. 8Test with several representative real source documents, including at least one that is missing an optional field and one that should legitimately fail, before promoting the mapping to production.
  9. 9Turn on MEC's process/transaction logging for the first production runs so you can see exactly what was collected, how the grid transformed it, and what M3 API returned.

The three-stage MEC pattern

MEC's architecture separates concerns deliberately: collection handles getting a document into MEC regardless of source (file drop, AS2, message queue, a partner's SFTP), grid mapping handles pure data transformation with no awareness of how the document arrived, and delivery handles calling the target system - almost always an M3 API/MI transaction, but sometimes another external system. Keeping these separate is what makes a mapping reusable: the same grid can be fed by different collection methods without changing the transformation logic, and a change to the source file layout only touches the grid step, not the delivery step.

New MEC users often try to do transformation work in the collection step (renaming fields, restructuring) because that is where the document first becomes visible. Resist this - transformation belongs in the grid, where it is versioned, testable, and visible as a mapping artifact rather than buried in collection configuration.

Grid mapping mechanics

A grid is fundamentally a field-to-field crosswalk: each row represents one target M3 API field, with a source reference (a field from the incoming document), an optional transformation rule, and an optional default. Simple mappings are direct field-to-field copies; most real mappings need at least a handful of translation-table lookups (an external item code to an internal M3 item number, a partner's currency code to M3's currency code) and date or number format conversions, since EDI date formats rarely match M3's expected format out of the box.

Build translation tables as their own maintainable objects rather than hardcoding value lists inside the grid logic - trading partners add new codes over time, and a business user should be able to add a new code mapping without touching the grid mapping itself.

Grid row example:
Target field: OIS100MI.Add / ITNO
Source: EDI850 / LIN03 (buyer item number)
Transform: lookup via XREF table (partner item -> M3 ITNO)
Default: none (mandatory field, fail if lookup misses)

Error handling and delivery

Delivery is where a mapping meets the same M3 API behavior described elsewhere in this knowledge base - the target MI transaction can reject a call for a missing field, an unauthorized program, or a duplicate key, and MEC needs an explicit strategy for each. Route failed deliveries to a monitored error queue with the original source document attached, not just a log line, so someone can correct and resubmit without re-keying the transaction from scratch. For high-volume EDI (purchase orders, ASNs, invoices), decide up front whether a single bad document should halt the batch or be skipped and flagged, since the default behavior varies by how the process flow is configured.

Common pitfalls

  • !Doing data transformation in the collection step instead of the grid, which makes the mapping hard to reuse and hard to test in isolation.
  • !Hardcoding partner-specific value translations directly in the grid logic instead of a maintainable translation table.
  • !Not defining defaults for M3 API mandatory fields the source document never sends, causing every document to fail delivery on the same missing field.
  • !Testing only with clean sample documents and skipping edge cases like a missing optional segment or an unrecognized partner code.
  • !Sending every delivery failure to a single generic log without attaching the source document, making failed transactions hard to correct and resubmit.
  • !Changing a shared grid mapping for one trading partner's quirk without checking which other partners or processes reuse the same grid.

How an ERP-grounded AI assistant handles this

For the EDI and integration exceptions MEC deliveries generate, ERPray can read the failed delivery, the mapped M3 API error, and the original source document together and explain in plain language what field or translation lookup caused the rejection, which turns a MEC error-queue triage session from a manual document-by-document review into a quick, explainable first pass before a person fixes and resubmits.

Frequently asked questions

Is MEC the same thing as ION?

No - MEC is M3's older, purpose-built EDI and B2B integration middleware, while ION is Infor's newer cross-product integration platform. Many M3 customers run both: MEC for classic EDI/partner document flows, ION for broader cross-application integration and events.

Can a single grid mapping call more than one M3 API transaction?

A delivery step is typically built around one target transaction, but a process flow can chain multiple grid/delivery steps in sequence, for example creating an order header transaction followed by separate line-item transactions from the same source document.

How do I handle a source field that needs to become two different M3 API fields?

Map the same source field into two separate grid rows, each targeting a different M3 API field, with whatever transformation each target requires applied independently - the grid does not require a strict one-to-one source-to-target relationship.

What is the fastest way to debug a mapping that delivers the wrong value?

Turn on MEC's transaction-level logging for that process and compare the logged post-transformation value against the raw source document side by side - most mapping bugs are a wrong source field reference or a translation table entry that does not cover the value actually being sent.

Related

Error fix

M3 API Error: Record already exist

Record already exist means the MI Add transaction you called is trying to insert a key that is already present in the target M3 table, most often because a prior call succeeded and was retried, or because the key fields you built do not match what you think they match. Read the errorField and errorFieldGroup attributes on the response to see exactly which key field M3 flagged, then either switch to the matching Chg (change) transaction or fix the key construction in the caller.

Error fix

M3 API Error: Not Authorized to Program

Not authorized to program (or the equivalent transaction-level authorization error) means the M3 user ID the integration authenticates as can log in fine but has not been granted access to that specific MI program, transaction, or company/division through its authority group. Fixing it means adding the program/transaction to the integration user's authority group in M3, not changing anything in the calling code.

Advanced

Paging M3 API MI List Transactions Past the Default Record Limit

M3 List transactions (the read/browse transaction most MI programs expose, such as CRS610MI.LstByNumber or OIS100MI.LstOrderHead) cap the rows returned per call using the MaxReturnedRecords input field, and by default many clients leave it low or unset, which looks like the API silently truncating results. Set MaxReturnedRecords explicitly, then loop the call using the last key values from the previous page as the starting position until fewer rows than the limit come back.

How-to

How to Add a Personalization Script to an M3 H5 Panel

M3 H5 lets an administrator attach a JavaScript personalization script to a specific panel of a specific program, using the MForms client API to read fields, react to panel and field events, and adjust the UI (hide fields, set defaults, validate input) without modifying the underlying M3 program. Scripts are written and attached through Personalization mode in H5, saved against the panel/program combination, and deployed to the users or roles who should see the behavior.

How-to

How to Create a New Item in M3 (MMS001)

A new item in M3 is created in two stages: item basic data in MMS001 (Item. Open), which defines company-wide attributes such as description, item group and unit of measure, then facility-level data in MMS002 (Item/Facility. Connect), which attaches the item to a specific warehouse or plant with purchasing, planning and costing parameters. An item is not usable for orders, purchasing or MRP until both stages are complete.

How-to

How to Enter a Customer Order in M3 (OIS100)

OIS100 (Customer Order. Open) is the primary M3 program for entering and maintaining customer orders, built as a header-then-line workflow: you first create the order header with customer, order type and delivery terms, then add order lines that each carry their own item, quantity, price and delivery date defaulted from customer and item agreements.

AI for ERP

AI for Infor M3: A Practical Path from MI Programs to a Private Assistant

Add grounded AI to Infor M3: natural-language answers over MI programs and MEC, agents for distribution and manufacturing, on-prem or private cloud in Europe.

AI for ERP

AI Agents Over Infor ION API, BODs, and the Infor Data Lake

Build AI agents on Infor ION API Gateway, BODs, and Data Lake, alongside or instead of Infor's own GenAI features, with your choice of model and hosting.

Stuck on Infor M3 (M3 Business Engine)?

Talk to engineers who work inside Infor M3 (M3 Business Engine) every week, and who build private AI that answers these questions from your own ERP data.