M3 users are building their own scripts and apps with AI. How do you keep them maintainable?
· Stewart Rutledge
With AI tools becoming more common, a lot of Infor M3 users have started building their own H5 scripts and apps. We've seen it at several customers. Someone who knows the process asks a chat tool for a script, gets it working after an afternoon, and the problem they had is solved.
That part is good news. The trouble shows up later. The code usually lives on that person's computer, nobody else knows how it works, and when they move on or something changes in M3, the solution stops working and nobody can fix it.
This article goes through what makes a user built M3 customization maintainable, whichever tool wrote it.
What goes wrong with scripts and apps built this way
Writing the code is only part of building a solution for a company. The rest is everything around it, and that's what a chat tool doesn't do for you:
- There's one copy. The source is on a laptop or in a download folder. What runs in M3 is a compiled file someone deployed, and nobody can say for sure which version of the source it came from.
- Nobody can tell what it does. There's no description, no tests and no history of why it changed.
- It depends on one person. They know how to build it, how to deploy it and which M3 user it was tested with.
- It falls behind. Libraries get old, M3 changes, and in the case of the M3 REST API, whole versions get retired. We wrote about that in moving H5 apps and scripts to the v2 API.
None of this is the user's fault. They solved a real problem with the tools they had. The question for the organization is how to keep what users build without taking on that risk.
What maintainable looks like for an M3 customization
Versions and releases
You should be able to say which version of a script runs in production and which one is being tested, and go back to the previous one when something goes wrong. That means releases with a version number, the same way you'd expect from any software you buy.
In Loupe Code, apps, scripts and programs are released under a version number with the click of a button, so you can have a production version, a test version and anything in between.
The source in the company's own git repository
Most IT departments require that code lives in the company's repository. For a normal user that's hard to set up, so it doesn't happen, and the code stays on the laptop.
Loupe Code keeps the source for every app and script and can sync it to your company's own git repository. It's readable TypeScript, so a developer can review it, and it stays yours whether or not you keep using Loupe.
No local development environment
Building an H5 app normally means installing Node, the right Angular version, Infor's SDK and a build setup, and keeping all of it working. Every user who builds becomes the administrator of their own development machine.
With Loupe Code nothing is installed locally. The build runs on our side, and you preview the result against your own M3 from the desktop app.
Tests that keep behaviour from changing
For a lot of projects, testing falls by the wayside. There are deadlines and new requirements, and testing ends up manual, which misses things as the code grows.
Loupe Code has a test framework built in. Say your Irish division has its own process for handling orders, so the app has to exclude them. You can write a test for that with a short prompt, see it fail, build the feature and see the test pass. Once you're happy with how an app behaves, you can also ask Loupe Code to suggest tests for it. The tests run whenever you like, and they run automatically when you create a release, so a change next spring doesn't quietly break what works today.
Every user's language
Users should get the interface in their own language. Done by hand that's days of work, and more every time the app changes, so user built tools usually skip it.
In Loupe Code you pick the languages and the texts are translated, in M3's own languages. As you keep working on the app the translations keep up, and once it's deployed each user gets the language configured on their M3 account. Scripts are translated the same way.
A look that belongs in your company
Form matters as much as function in something people use every day. Colours, fonts and sizing can be adjusted while you build, so the app looks like it belongs in your company.
Staying up to date
M3 changes, libraries change, and Infor changes the APIs. A solution that nobody maintains slowly stops working. Loupe Code keeps the framework parts of every app up to date, and everyone with access to Code can see what has been built, so nothing ends up as one person's private project.
Where the rules belong
When you let users build, it's tempting to write a policy: where code must be kept, who reviews it, how it's tested. Policies are easy to forget on a busy Tuesday. It works better when the tool does those things by default, so the user building a script gets versions, a repository, tests and translations without having to think about any of them.
That's how we built Loupe Code. Users write what they want the screen to do, and the parts an IT department cares about come with it. If you want examples of what users build this way, there are five in H5 script examples for Infor M3.
Questions we get
We already have scripts users built with ChatGPT. Can we bring them in?
Yes. Loupe Code can rebuild an H5 script from its source or from the compiled JavaScript deployed in M3, and Import existing brings in an H5 app from its folder or a zip. From then on it's an ordinary app or script with versions, tests and a repository.
Who can see what users build?
Everyone with access to Code in your company sees what has been built. Administrators choose who has access to Code.
Does the result still work if we stop using Loupe?
Yes. It's standard M3 running on your own system, and the source is in your repository.
If you have solutions like this in your organization already, get in touch and we'll show you how Loupe Code can help. Reach out at hello@loupeapp.net, or read more about Loupe Code.
This article started as a post on LinkedIn. Join the conversation there.