Set up an ERP connectionUpdated
Create an ERP connection, set its credential and allowed hosts, choose which fields are sent and schedule when readings go out.
This guide takes a new ERP connection from nothing to sending readings. You need the Manage ERP connections permission, and the Set ERP credentials permission (System Administrators by default) for the credential step. See ERP connections for what the add-on is.
Create the connection
Open ERP connections
Select Settings, then Integrations, then ERP connections.
Start a new connection
Select New connection. If the button is greyed out, your add-on contract's connection limit has been reached. Contact Vectis to add another.
Name it and choose a type
Enter a Name, choose the Type (REST API, signed webhook, CSV file or TechnologyOne) and set the Environment to Test or Production. The environment is only a label, so nobody mistakes a test ERP for the real one.
Select Create
The connection starts as a Draft. Nothing is sent until you set it up and select Activate.
The connection page has these tabs: Overview, Delivery history, Credential, Asset mapping, Field mapping and Settings. A connection that reads your ERP's fleet register also has a Fleet register tab.
Set the allowed hosts and delivery settings
Open the Settings tab.
- Allowed hosts are the only hosts this connection may call, and only over https. Separate several with commas. If you leave it empty, the hosts in the settings below are used.
- Alert after (hours of failures) is how long readings can fail to reach the ERP before the connection becomes Degraded and your administrators are alerted. Enter 1 to 72 hours. The default is 6.
- For a REST API, enter the Base URL, the Method (POST, PUT or PATCH) and the Path. In the path, use
{field}for a mapped field, for example/assets/{assetNumber}/meters. Set Readings per request above 1 to send readings in batches, and then a Batch path. Reference field is the field in your ERP's answer that holds its ID for the reading. Test path is a page Vectis can request when you test the connection. To send monthly usage as well, enter a Usage path; leave it empty not to send usage. - For a signed webhook, enter the Webhook URL. Each reading is sent there.
- For a CSV file, choose how to Deliver the file by: download from Vectis (kept 30 days), email (up to 20 addresses, separated by commas) or SFTP upload (with the SFTP directory). You can also add a row count, as a
#rowsline at the end of the file or as a separate manifest file. - For TechnologyOne, the API style, CiAnywhere address, the parts of the integration your organisation has taken up, the duplicate check and the profile overrides are agreed with Vectis during set-up. Add the CiAnywhere address's host to the allowed hosts.
Select Save. The type cannot be changed after the connection is created.
Set the credential
Only people with the Set ERP credentials permission see the button.
Open the Credential tab
The tab shows whether a credential is set, its type, the last four characters, who set it and when, and when it was last used.
Select Set credential
Choose the Type if more than one is offered, then fill in the fields.
Select Save credential
The secret is stored as soon as you save and cannot be read back by anyone, including you.
The fields depend on the type:
| Credential type | You enter |
|---|---|
| OAuth client credentials | Token URL (its host must be on the allowed hosts), Client ID, optionally Scopes and Audience, and the Client secret. Grant only the scopes the connection needs. |
| API key | The Header name (for example X-Api-Key) and the API key. |
| Basic | A User name and Password. |
| SFTP | Host (on the allowed hosts), Port, User name, the Host key fingerprint from your SFTP provider, and a Password or Private key. Vectis refuses to connect if the host key changes. |
| Signing secret (signed webhook) | Select Generate a signing secret, or enter your own. Copy it before you save: it is not shown again. Give it to whoever checks the signatures on your side. |
A TechnologyOne connection uses OAuth client credentials. Ideally your TechnologyOne administrator enters them, so the secret never leaves your organisation.
To change a credential later, select Replace credential.
Test the connection
Select Test connection on the Credential tab. It checks that Vectis can reach the ERP and that the credential is accepted, and shows a message either way. If the credential can do more than it needs to, the message lists the extra permissions so you can narrow it.
Choose which fields are sent
Open the Field mapping tab. It lists each field the ERP receives for a meter reading.
- For each field, pick the Vectis field it comes from, A fixed value, or Not sent. Fields marked Required must be filled.
- Select + transform to change a value on the way out. The options are convert units, round, date format, time zone, lookup table, upper case, trim and pad. For example, convert kilometres to miles, or send times in your ERP's time zone (use local for your organisation's time zone, or a name such as Australia/Sydney).
- If the connection allows it, Add field adds one of your own.
- Select Preview to see your three most recent odometer readings as they would be sent, with any problems listed beneath.
- Select Save mapping. Each save makes a new version.
Readings already waiting keep the version they were made with. To go back, find the earlier version under Version history and select Use again.
Set the schedules
On the Overview tab, the Schedules card has a row for Odometer and one for Engine hours.
Tick the meter
Tick Odometer, Engine hours or both.
Choose when
Choose Daily or Weekly, then the time (and the day, for weekly). Times are in your organisation's time zone.
Select Save
The row shows when the next run is due.
Other things a connection can send or read
Depending on its type and set-up, a connection's Overview tab can also show:
- a Work requests card, for sending defects from failed inspections to your ERP. See Send failed inspections to your ERP as work requests.
- a Monthly usage card, for sending usage by cost centre each month. See Send monthly usage to your ERP.
A connection that reads your ERP's fleet register is set up on its Fleet register tab. See Keep your fleet register in sync with your ERP.
Activate the connection
Select Activate at the top of the connection. The status changes from Draft to Active. Use Pause to stop sending and Resume to carry on. Run now on the Schedules card queues the readings immediately; it is available while the connection is Active or Degraded, and tells you how many readings were queued and how many were held for review.
Disconnect destroys the credential and stops the schedules. The delivery history and mappings are kept.
Before anything is sent, map your vehicles: see Map vehicles to ERP asset numbers.