Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titlePre-Requisite Setup Before Importing
Expand
titleSetup Tank Monitor Interface

1. Go to System Manager, select Company Configuration menu. This will open the Company Configuration screen.

2. Navigate to Tank Management, Tank Monitor tab, click Interface Type.

3. Select Anova Gaslog.

4. Enter the details provided by customer, then click Save

  • Default - set to to true
  • API URL - URL used for sending credentials and getting tank information
  • Vendor Name - vendor username
  • Customer Name - customer name
  • API_KEY - vendor's unique key
  • Password - vendor password

Call the tankinfo API to retrieve a list of all tanks


Retrieve the List of All Tanks

1. Click "+" button. GET New Request will be added on your tab.

Image Modified

2. Enter the request URL

3. Navigate to Authorization tab then select Bearer Token.

Image Modified

4. Copy the generated access_token from previous step response.

Image Modified

5. Enter it in the Token field, then click Send button.

Image Modified

6. Click Save Response > Save to a file

Image Modified

 7. Select path to save file, then click Save button. File will be saved as response.json.

Note: lastReportedDate change every day.
Details in generated response will be used in Clock reading, Customer creation, Device creation, and Consumption Site


Expand
titlePost credentials to the token API to retrieve a current Bearer tokenUsing Postman to Retrieve Tank Records

Note: The Postman is used to check the data sync synced from API server to i21 Tank Management. This is used for testing purposes only and does not require to be installed to in customer server.


Postman Credentials and Getting the Access Token to Retrieve Tank Information

1. Download and install Postman.

2. Open Postman, click "+" buttonGET New Request will be added on your tab.

3. On New Request tab, change the selection on dropdown menu to POST.

4. Enter the request URL

5. On New Request tab, navigate to Body tab. Select x-www-form-urlencoded, then enter the following details:

KEYVALUE
grant_typepassword
usernamevendor name set in Company Configuration > TM > Tank Monitor tab
passwordpassword set in Company Configuration > TM > Tank Monitor tab
client_idcustomer name set in Company Configuration > TM > Tank Monitor tab
client_secretAPI Key set in Company Configuration > TM > Tank Monitor tab


6. Click Send button. Response will be generated. 

Note: access_token change every send.

Expand
title
Expand
titleCreate Customer with Consumption Site, Create and Add the Devices to the Site, and Add Clock Reading

The following should be setup/ready before the import:

1. Customer with Consumption Site - customer should have an existing consumption site. Customer Number is used as the mapping for customerAccount.

2. Devices - consumption site should have an attached devices. Device Tank Monitor Serial # (serialNumber) and Device Tank Serial # (customerTank) are paired with customer number where the combination is used as mapping for import. 

3. Clock Reading - a reading date entry should also exists in Clock Reading as this is being mapped as lastReportedDate.

The date should also not exist in Events tab of the Consumption Site.


Expand
titleJSON Mapping
FieldExamplei21 FieldNotes
deviceId618000Not Used


serialNumber7534188TM > Site > Device > Tank Monitor Serial #

Matching Hierarchy #1, this is the first to check.

  • Device Type = Tank Monitor
  • Device Serial # matches to file
  • Device Linked to a Site

If no match then try Matching Hierarchy #2.

customerAccount

12430655

TM > Site > Customer

Matching Hierarchy #2

  • Site with Customer # that Matches API > customerAccount
  • Device Linked to Site
  • Device Type = Tank
  • Device Serial # matches API > customerTank

If no match then give errors that no match was found.

customerNameJohn ClutterNot Used
customerTank1361978TM > Site > Device > Tank Serial #Part of Matching Hierarchy #2 see customerAccount
tankSize500NAShould already be setup on TM Site > Tank Device
addressHoward StreetNot Used
townCowenNot Used
stateWVNot Used
postcode26206Not Used
latitude38.4132843TM > Site > LatitudeWill be used Used to Update TM Site if there is no existing value
longitude-80.5601714TM > Site > LongitudeWill be used Used to Update TM Site if there is no existing value
lastReportedDate08/23/2021 06:39:00TM > Site > Reading Event > Event DateWill ignore adding duplicate readings
lastReportedLevel66

TM > Site > Estimated % Left

TM > Site > Estimated Gallons Left


Use Estimated % Left x TM Site > Total Capacity to get Estimated Gallons Left

lastDeliveryDate03/04/2021 14:52:00Not Used
tankTypeHorizontal TankNot Used
dailyUsage0.0Not Used

Sample JSON with 2 records:

[
    {
        "deviceId""618000",
        "serialNumber""7534188",
        "customerAccount""12430655",
        "customerName""John Clutter",
        "customerTank""1361978",
        "tankSize""500",
        "address""Howard Street",
        "town""Cowen",
        "state""WV",
        "postcode""26206",
        "latitude""38.4132843",
        "longitude""-80.5601714",
        "lastReportedDate""10/04/2021 06:39:00",
        "lastReportedLevel""65",
        "lastDeliveryDate""03/04/2021 14:52:00",
        "tankType""Horizontal Tank",
        "dailyUsage"0.028571
    },
    {
        "deviceId""618001",
        "serialNumber""7542459",
        "customerAccount""63150005",
        "customerName""RDR Energy Resources Inc.",
        "customerTank""Concrete Plant",
        "tankSize""2005",
        "address""411 Sycamore Street",
        "town""Clarksburg",
        "state""WV",
        "postcode""26301",
        "latitude""39.2861121",
        "longitude""-80.3520409",
        "lastReportedDate""10/03/2021 15:37:00",
        "lastReportedLevel""54",
        "lastDeliveryDate""10/01/2021 15:00:00",
        "tankType""Diesel",
        "dailyUsage"13.54483
    }

]

...