Introduction:
The Auto Importer allows you to add and update operations in your MachineMetrics account automatically, avoiding the need for manual imports or double entry. This article presents the capabilities, requirements, and instructions for importing your data via CSV files.
Note: The MachineMetrics Importer is an advanced feature, and it’s recommended to have assistance from your IT department for the initial setup.
Topics covered in this article:
Prerequisite Concepts
This article presumes you have at least a basic understanding of the following concepts:
-
CSV Delimited Files
- MachineMetrics Operations: The Operations article contains information on the overall function and use of Operations in MachineMetrics.
- An Operations CSV in MachineMetrics Format
Setting Up the Importer
- First, create a new folder to which you'll be exporting your operations data. This folder can be named anything.
- Within that new folder, create another folder named "operations"
-
Generate an API key with the ERP and Reporting scopes. Save your API Key for now, as it will be used in a few steps. (Note: If you see the API key used for the old importer, you can delete it from the API Key page.)
-
Download the new Auto Importer executable
Note: This download may trigger security warnings from your browser. These warnings are expected and do not indicate that the file is harmful. -
Run the mm-auto-importer.exe
-
Input the Path to a folder where you'll place your operations CSV.
-
Enter the API key you generated in Step 1
-
Specify the install directory for the Auto Importer
-
Indicate if you’d like the Auto Importer to launch on startup. It is Highly Recommended to keep this box checked. If not, we recommend configuring an alternative solution to keep the Auto Importer running after restarts.
For details on how to run the Auto Importer from a script, see this section below -
Click ‘Install’ to install the Auto Importer
-
Click ‘Finish’ and leave the ‘Launch MachineMetrics Auto Importer’ box checked to start the importer right away.
-
A command prompt window should open with the text “watching path” and then the target directory you input during installation.
Important: If you close the command prompt, the Auto Importer will stop running.
-
-
The new Auto Importer is now setup! Any new CSV files placed within the monitored folder will be imported.
-
Troubleshooting
First, check the log file that is created in the folder you set the Importer to monitor.
- If there are authentication alerts or errors, check that your API key has both the Reporting and ERP scopes. Try a reinstall and double-check that you've copied the full API key.
Not seeing any new operation data in your MachineMetrics account?
- Double-check your CSV formatting
- Confirm you entered the correct folder path when starting the importer
If none of the above resolves your issue, please reach out to support@machinemetrics.com.
Creating a Scheduled Task
If the Auto Importer is running on a server or workstation that isn’t always logged in, setting up a scheduled task ensures it starts automatically at boot. This eliminates the need to manually restart the Importer after updates, outages, or reboots.
1. Open the Start Menu, type “Task Scheduler,” and launch the application.
2. Click "Create Basic Task..."
3. Enter a name and description such as "MachineMetrics Importer"
4. Click Next
5. Select a Trigger. "When the computer starts" is recommended
6. Click Next
7. Select "Start a program" as an action
7. Click Next
8. Configure the program.
The Program/script is the location of the file-uploader executable.
In the "Add arguements" field, you'll need to put the path to the folder you'd like the file-importer to monitor, as well as a MachineMetrics API key with the scopes specified earlier in this article.
Example:
-p C:\Users\Your-Computer\Documents\MachineMetrics\FileImporter -t Your-Api-Key
9. Verify the details of your task, then click Finish to save
Your Auto Importer will now launch automatically whenever the computer starts, and it will begin monitoring your chosen folder and uploading files to MachineMetrics using the API key you provided.
Comments
0 comments
Please sign in to leave a comment.