Mass updates in Infor M3 from Excel, without writing code

· Stewart Rutledge

Sooner or later every M3 team gets the spreadsheet. New prices for a few thousand item and customer combinations, items that need to be connected to a new warehouse, test data to load after a refresh, or master data to move from one environment to another. The data is right there in Excel, and the question is how to get it into Infor M3 without a day of typing or a request to a developer.

This article goes through the usual ways to do a mass update in M3, Cloud or on-premises, and then how we do it in Loupe with Automate: MI transactions run for every row of a file, with checks before anything is changed.

The usual ways to mass update M3

There are a few options, and each has its place.

  • Typing it in. Fine for twenty rows. For two thousand it's slow, and every row is a chance to make a mistake.
  • Infor's own import tooling and ION based flows. These suit integrations that run again and again. Setting one up for a one-off price update usually takes someone who knows ION, and that's often the same person everyone else is waiting for.
  • Excel add-ins. They let you read M3 into a spreadsheet and write it back, and many teams like working that way.
  • Scripts. A developer writes something that calls the MI transactions for each row. It works, but the script tends to live on one person's computer, and the next update needs that person again.

What most real jobs have in common is that they're more than one transaction per row. Orders have heads and lines. Some items already exist and some don't. Some rows shouldn't run at all.

How an automation works

In Loupe, an automation is a list of steps, and each step is an M3 transaction that runs once for every row it's given.

  1. Data initialization is your input. Upload an Excel or CSV file, paste rows from a spreadsheet, or pick a file you exported from M3 or from Compare. Name each column after the M3 field it feeds, such as ITNO, and the mapping later is automatic.
  2. API steps each run one MI transaction, for example MMS200MI/AddItmWhs. You map its inputs to your columns, to fixed values or to the output of an earlier step. The current company and division are always available, so you never hard-code a company number.
  3. Data export collects the result, and Export to Excel gives you the file.

Steps can feed each other. A typical pattern is a Lst transaction that fans out rows, a Get that adds detail to each one and an export that collects it all.

Once per row or once per order

A step can run for every row, or once for each unique key, such as an order number. That's how a file of order lines becomes one OIS100MI/AddBatchHead per order, an AddBatchLine per line and a Confirm per order.

Where conditions

Add condition decides which rows a step runs for, such as only rows where STAT is 20. Conditions compare values with equals, greater than, contains, is empty and so on, and are joined with and and or, where and binds tighter, the way it does in SQL.

Split by result

A condition can also test whether an earlier step succeeded or failed for that row. Run MMS200MI/Get for every item, and add the item only for the rows where the Get failed because it doesn't exist yet. You also choose whether a run stops at the first error or carries on past failed rows.

Several files and workbook sheets

Some jobs need more than one file, such as customers in one and their addresses in another. A Data initialization can hold several files, or several sheets of one workbook, and you say which column links them. Each step then runs for one file and can read the matching row of the other, for example the town of a customer's address.

The rows themselves stay on your computer. Only the file names, columns and how they relate are saved with the automation.

Transform values on the way in

Migration data rarely arrives the way M3 wants it. Instead of fixing the file first, you fix the values on the way:

  • Field transforms trim spaces, change case, pad numbers (42 becomes 00042), convert decimal separators, reformat dates into yyyyMMdd and join values.
  • Lookup tables swap a value for its match, such as the old warehouse STHLM for the new warehouse 110. A table can have several keys and several results, * matches anything, and you can fill it by pasting from Excel.
  • Variables hold a value like a cut-over date once for every automation in the collection, and the date and time of the run is always available.

There's more on this in our docs on transforming and translating data.

Check it before it changes anything

An automation that changes data is treated as such.

  • Enabled environments. Each automation lists the environments it may run in, and won't start anywhere else. Leave production off until it has proven itself in test.
  • Dry run. Steps that read run for real, and steps that write build their transactions and stop just before sending them. You see how many transactions each step would send and every field of each one. Required fields you haven't set are listed in red.
  • Confirmation. Before a real run, Loupe names the environment, company and division it will change and asks you to confirm.
  • Your M3 rights. Every transaction runs as the person who started it, so M3 security decides what's allowed.

After a run, each step shows how many transactions succeeded and failed, the errors grouped by error code, and every transaction's input and output. Only display errors shows just the failures, so you can fix the mapping or the input and run again.

Building an automation with AI

With Loupe Code, Build with AI drafts the steps for you. You describe the job the way you'd explain it to a colleague, attach the data files and, if you have them, a mapping sheet or a specification. The AI checks every transaction and field against your M3 and asks you about anything your files don't answer. It only sees the column names of your data files, plus up to five values per column if you allow it. The rows stay on your computer.

The result is a draft for you to review and dry run before anything reaches M3.

Questions we get

Does this work on M3 on-premises as well as Cloud?
Yes. Loupe works with M3 CloudSuite, and with M3 on-premises on 13.4 with Infor OS.

Which transactions can I use?
Any MI transaction your M3 user is allowed to run, plus reading an M3 table with filters.

Can I save an automation and run it again next quarter?
Yes. Automations are saved and shared in collections, with a history of every change, so the one that worked last time is there next time.

What does it cost?
Automate is part of the standard Loupe subscription, 10 000 EUR a year with as many users as you want. Building with AI is part of Loupe Code, where AI usage is billed close to cost.

Got a spreadsheet that needs to go into M3? Send it to hello@loupeapp.net and we'll show you the automation for it, or read more about Loupe Automate.

This article started as a post on LinkedIn. Join the conversation there.

Got something on your M3 backlog?

Send it our way and we'll show you what Loupe Code does with it, on your own M3.

Mass updates in Infor M3 from Excel, without writing code