Creating an API Key
In order to use the Job Importer, first you need to create an API Key. An API key is a unique token that allows an application to access a subset of your data.
Note: These keys should be treated like passwords and be kept secure.
In order to create an API key follow these steps on the machine you'll be running the MachineMetrics Job Importer service on.
First, navigate to https://app.machinemetrics.com/account/api-keys. On the right side of the screen click on the button that says “Create API Key”.
In the form that pops up give the API Key a descriptive name such as, “Job Importer”. You'll also need to check the box labeled “erp” which gives the key the ability to import jobs. Click on the “Save Changes” button to create your key.
Now, the form should be displaying your Access Token. Do not close this form until you have copied your access token as you cannot view this value again. If you close this form you will need to delete the API Key you created and create a new one.
Download the Job Import Service Installer
You can download the installer here: https://bit.ly/mmjobimporter
Installing the Job Import Service
Now, run the Job Importer Installer on a Windows PC. Follow the prompts and eventually you will be prompted to configure a few options for the Job Importer Service. The “Jobs Folder” option is the folder where the service will look for the job file to import into MachineMetrics. If this location is a Network Share, it must be the full UNC path and not a mapped Network Drive as these are mapped on a per-user basis. Example, I may want the put the file in the “W:\ERP\JobExport” where “W:” is mapped from “\\Share\Integrations” in this case the full path would be “\\Share\Integrations\ERP\JobExport”.
The “File Format” option specifies whether the job files will be in the MachineMetrics CSV format or another supported format. Finally, the “API Key” field is where you're going to paste your API access token. Continue through the installation prompts until the installation is complete. Once complete, put a copy of your jobs file in the folder you specified and the jobs will automatically be uploaded into MachineMetrics.
If an active (not archived) job with the same name as a job in the file already exists, that job will be updated with the information provided in the file. If a job does not exist or was previously archived it will be created and if a job exists in MachineMetrics but is not present in the jobs file, it will be archived.
The Job Importer logs information to the Windows Event Viewer in the “Applications and Services” section in the “MachineMetrics” Log. If you are having issues with the Job Importer, retrieve the logs from the Windows Event Viewer by using the “Save All Events As...” button and change the “Save as Type” to “csv” and include the file with your support request email.
If you see errors relating to the service not being able to access the folder specified or that the folder doesn't exist, it may not have proper access rights to the network location. If the network location requires authentication you will need to run the service as a user that has permission to read from this folder. You can do this from the Windows Services list. Find the MachineMetrics Job Imported in the list, right-click on it, click on Properties, and then the “Log On” tab. Select “This account” and enter the user name as “Domain\UserName” and the password with confirmation. Click “OK” and restart the service to run at as the new user.