IBM TAS Connector for Envizi
The IBM TAS Connector for Envizi is released in TAS as TAS Connector for Envizi.
- Automatically sync space and occupancy data from TAS with Envizi to enable energy usage calculations across entire facility portfolio with advanced analytics by location, SQF, and occupant.
Use case examples
Corporate sustainability managers can gather and maintain accurate sustainability data for their entire global real estate portfolio directly from TAS where those facilities are managed. Location data from TAS serves as a baseline for all other Sustainability reports in Envizi such as space classification, floor space, and headcount data that allows the Sustainability managers to normalize data (by square meter, or by employee) for enabling meaningful comparisons between buildings across the entire portfolio and also identify opportunities to reduce environmental impact.
Connector architecture
IBM App Connect provides a flexible environment for integration solutions to transform, enrich, route, and process business messages and data.
App Connect Flows enable specific integration use cases by connecting to predefined APIs to route and map data. Data mapping is pre-defined, but it can also be customized based on the requirements.
Native API framework is used for TAS and enabled through provided packages that can be imported.
Data mapping
App Connect flows
The TAS Connector for Envizi includes two flows that export locations and accounts, along with all the required fields they contain. The table below shows the naming convention for these flows and the current integration use case.
File | Flow | Destination | Operation |
---|---|---|---|
TririgaBuildings_Always_On_v1_1_1.yaml | Space Data | TAS to Envizi | Changes Only |
TririgaBuildings_On_Demand_v1_1_1.yaml | Space Data | TAS to Envizi | Bulk Initial Load |
Before you begin
- An instance of App Connect Enterprise or App Connect Pro with the Designer component.
- Admin access to a TAS environment with a dedicated username and password for this integration.
- Envizi instance with an AWS S3 Bucket.
- Import App Connect Cert to TAS to enable encrypted communication.
Downloadable Resources
Download the latest TRIRIGA.to.Envizi.Release zip file that has all the flows and configuration files.
Installation and configuration guide
- Configure App Connect
a. Import flows into App Connect
b. Configure flows
- Configure TAS
a. Security Role Configuration
b. Group Name Configuration
- Testing
a. TAS outbound connectivity
Part 1. Configure App Connect
- IBM App Connect Professional or Enterprise is needed to run this flow. The flows have been tested on IBM Cloud App Connect, AWS App Connect, and containerized version of App Connect as well.
- The names are generic and the elements in this integration do not have the same names during setup.
- Navigate to Catalog section of the App Connect instance.
- In the Search application field, type name of the connector.
- If the App Connect instance does not have an account for the connector, click Connect to create a new account.
- Open the account selection drop-down list, and click Add a new account.
- Enter the required details of the connector:
- For Amazon S3, the Secret Access Key and Access Key ID that is provided by Envizi.
- For HTTP, the Authentication Key or username and password that is needed for TAS.
- Click Connect.
- From the account selection drop-down list, select the newly created
account. For example, if the
Account 1
name is already present, the default name isAccount 2
. - Click the Ellipsis menu and select Rename Account.
-
Enter an account name and click Rename Account. This name can now be used by the connector in the flow.
- Open the Dashboard of the App Connect instance.
- Click the New button and select Import Flow.
- Browse to the flow's YAML file and click Import. The flow is imported and opened.
- Click Edit Flow.
- Verify that the connectors are using the right accounts.
- To change the account for any connector, select the connector and click the drop-down icon next to the Account's name.
- Select the account name to use from the list.
- Click the Scheduler node.
- Configure the schedule as required.
Part 2. Configure TAS
Navigate to Tools > Administration > Object Migration and select New Import Package to begin the import process. Select the APIConnector OM Package in the TAS instance. In the pop-up window, select Validate to validate that the package can be imported properly and then Import to start the import process.
For more information, see IBM® TRIRIGA documentation.
- Create an integration user by following the steps given in Chapter 2. This user should be a non-admin user and should not be part of the Admin security group.
- Assign that user to a new or existing group for the integration. If you need to create a new security group, follow the steps given in Chapter 1.
- Add the TAS Base License to the License Details section on the user Profile.
- Select the newly created group or desired existing group and switch to the Access tab and then add the appropriate access for the integration.
- Add the permissions below for the new user's group:
Module Business Object Permissions Location triBuilding Read triAPIConnect triAPICTimestamp Read and Update
The users are now be able to interact with the proper TAS Modules.
For users to pull from these URLs, the minimum requirements are:
URL | Requirement |
---|---|
GET /oslc/spq/triAPICOutboundBuildingQC | READ access to triBuilding Business object |
GET /oslc/spq/triAPICTimeStampQC | READ access to triAPICTimestamp Business Object |
POST /oslc/so/triAPICTimeStampRS/ | Write access to triAPICTimestamp Business Object |
The following steps outline the necessary configurations for the Envizi Group Name Configuration page.
- Navigate to Tools -> Builder Tools -> Data Modeler and using the Object Browser navigate to Location->triBuilding.
- Revise the BO and add four fields:
- cstEnviziParentOneTX
- cstEnviziParentTwoTX
- cstEnviziParentThreeTX
- cstEnviziGroupNamePathTX
Name and Label should be the following:
Name | Label |
---|---|
cstEnviziParentOneTX | Envizi Group 1 |
cstEnviziParentTwoTX | Envizi Group 2 |
cstEnviziParentThreeTX | Envizi Group 3 |
cstEnviziGroupNamePathTX | Envizi Path |
After entering these values, click Publish to publish the BO.
- Under Tools -> Builder Tools -> Form Builder, click on the Location module on the left side of the screen and then click triBuilding.
- Revise the triBuilding form by clicking Revise in the top right corner of the pop-up
- In the Navigation pane on the left side of the screen, click on triBuilding and then Add Tab. Enter cstEnvizi as the Name and Envizi as the Label. Click Apply
- Select this new tab and click Add Section.
- Enter cstEnviziDetails as the Name and Envizi Details as the Label. Click Apply.
- Click on the newly created Section and select Add Field. Select each of the four created business objects from the previous step as fields under Envizi Details.
- Select cstEnviziGroupNamePathTX and modify Start Row to 3 and Col Span to 2 on the properties window. Mark this field as ReadOnly and click Apply. The form should look like this:
- Click triBuilding on the left panel and then click on Sort Tab. Move the cstEnvizi tab to the second position and click Apply.
- Publish the form.
- Navigate to Import Migration and import package EnviziConfig.zip by clicking New Import Package, select the zip file, and then click OK.
- A new window is displayed. If it is not displayed, just select the package from the list.
- On this package, click Validate and wait for the validation to complete. If no errors are displayed, import the package.
- Go to Tools -> Administration -> Security Manager. This application sets who can and cannot access this newly created tab.
- Click the newly created name of the group, and navigate to the Access tab.
- On this tab select Location -> triBuilding -> cstEnvizi.
- Choose the access level for the group and click Save.
- Go to Tools -> Builder Tools -> Workflow Builder. Select Location -> triBuilding.
- Within the Location object, search for the existing Workflow triBuilding - Synchronous - Permanent Save Validation.
- Revise this workflow and after Call Module Level Validation, add a new Workflow call to triBuilding - Update Envizi fields with defined options like displayed below:
Click the Start task at the top and publish the workflow.
- Go to My Reports and navigate to System Reports. Add those four new fields to the existing query triAPICBuilding - OSLC -- Outbound by clicking the Columns tab and adding the four fields like below:
- Save the report.
- Open Tools -> System Setup -> Integration -> OSLC Resource manager and search for triAPICOutboundBuildingRS. On this resource, add the four new fields either individually or by using the Import all Fields option.
- Go to Tools->Builder Tools-> Navigation Builder and find TAS Global Menu (or the menu associated to the user that will need access to the app). Select and click Edit.
- On navigation Items section, expand Landing Page –Tools -> Menu Group –>System Setup. Select Menu group –>Integration and expand Navigations Item Library.
- Search for Envizi, select the item, and then click Add to Collection.
- Click Save.
- Log out and Log in again to the system.
This tool allows you to make changes on this new Envizi group name fields. But the existing records must be taken into consideration as well. If you want those records to be populated, there is a patch helper workflow that can handle that.
The first thing that must be defined is which fields are used to populate groups 1, 2, and 3 to be used on Envizi. To access the Envizi tool, go to Tools -> System Setup -> Integration -> Envizi Integration. When you open the page, the fields are displayed as Group1/Group2/Group3. By default, the values are World Region/Country/City. The Envizi Hierarchy Path field shows how the Envizi group names are configured, according to the selected option.
Also, notice that there is a section named Active/Retire with missing data and Draft/Revision with Missing Data. This section lists the buildings that don’t have data defined for Envizi group 3, so it means that no Envizi group is populated on those buildings.
You can filter to change only the desired records by changing query cst -triBuilding -Query -Get All Buildings for envizi. The list of buildings displayed on this query is the list of buildings that the patch helper modifies. To use the tool, just select the desired Envizi group names and click Save. Once the Save action is triggered, all buildings are populated with the desired options. This process might take a few minutes depending on how many buildings you have on your system. After that Envizi groups and path is updated according to the selections made on Envizi Integration page.
Also, every time a building is saved and there are changes on the defined fields, or a new building is created, the Envizi groups and path is modified according to the selected options. You can find the groups on the Envizi tab on the building record.
Operating the Connector
This flow is for the initial sync or to sync data that was added or updated between specific dates. This flow is meant to be executed just once whenever needed and then stopped.
- The following parameters in the initial Set variable node need to be configured in order to use this flow:
-
Parameter Value OverrideFromDate The start timestamp of the window between which the data is pulled from. e.g., 2022-06-26T23:09:30-07:00
OverrideToDate The end timestamp of the window between which the data is pulled from. e.g., 2023-06-26T23:09:30-07:00
Note: The OverrideFromDate and OverrideToDate dates must be specified in ISO 8601 format.
This flow is to keep syncing the data after the initial sync. This flow is meant to be kept running and only syncs the data that has been added or updated after its previous execution event. For example, if the flow executes at 2 PM and it's previous execution was at 1 PM, the flow pulls data that has been added or updated after 1 PM.
- Click on the initial Set variable node.
- In Variable -> config -> customer, enter the value provided by Envizi.
- In Variable -> config -> triURL, enter URL for the TAS instance. (e.g., https://example.com:9080)
- Click the three dots menu on either the flow's tile or the specific flow page.
- Click on Start API or Stop API depending on which action is desired.
Part 3. Testing
A good way to test the TAS Outbound connectivity is to use the Always_On flow.
- Start the Always_On flow and add a test building in the system.
- If configured correctly, the integration should pick up this change and deliver a .csv file with just that test building.
For more information on any errors that can arise in App Connect, see Troubleshooting.
Troubleshooting
The below errors are found in the App Connect logs.
Error | Cause | Resolution |
---|---|---|
404 - API doesn't exist | Flow is not running | Double check that the flow is Active in App Connect. |
404 - The HTTP request returned with an error 404 "Not Found" | Incorrect App Connect connector config | Double check that the credentials being used in the HTTP post node in App Connect are correct. |
Reference for Pre-requisite
cat <<EOF | oc create -f -
apiVersion: truststore-mgr.ibm.com/v1
kind: Truststore
metadata:
name: my-tas-truststore
spec:
license:
accept: true
includeDefaultCAs: true
servers:
- "example.com:443"
certificates:
- alias: alias_1
crt: |
-----BEGIN CERTIFICATE-----
...
Certificate 1
...
-----END CERTIFICATE-----
...
- alias: alias_n
crt: |
-----BEGIN CERTIFICATE-----
...
Certificate n
...
-----END CERTIFICATE-----
EOF
This certificate must then be added as the truststore to the TAS instance. In the Custom Resource Definition for TAS, update the spec.integration.truststore field to reference the name of the created truststore. If there already is a truststore for TAS, update the Truststore resource to include the certificate with an additional alias.
Field Mapping
CSV Headers | TAS Fields | Comments |
---|---|---|
CITY | spi:triCityTX | |
COUNTRY | spi:triCountryTX | |
DESCRIPTION | spi:triDescriptionTX | |
GROUPNAME1 | spi:cstEnviziParentOneTX | Value for this field is available only after Location Hierarchy mapping for Envizi groups is completed on TAS. |
GROUPNAME2 | spi:cstEnviziParentTwoTX | Value for this field is available only after Location Hierarchy mapping for Envizi groups is completed on TAS. |
GROUPNAME3 | spi:cstEnviziParentThreeTX | Value for this field is available only after Location Hierarchy mapping for Envizi groups is completed on TAS. |
LATITUDEY | spi:triGisLatitudeNU | |
LOCATION | spi:triNameTX | |
LOCATIONCLOSEDATE | spi:triActiveEndDA | |
LOCATIONID | spi:triIdTX | |
LONGITUDEX | spi:triGisLongitudeNU | |
POSTALCODE | spi:triZipPostalTX | |
STATEPROVINCE | spi:triStateProvTX | |
STREETADDRESS | spi:triAddressTX |
CSV Headers | TAS Fields | Comments |
---|---|---|
ACCOUNT | spi:triIdTX + ("_HEADCOUNT" or "_FLOORAREA") | |
DATATYPE | "HEADCOUNT" or "FLOORAREA" | |
LOCATION | spi:triNameTX | |
LOCATIONID | spi:triIdTX | |
MEASUREUNITID | spi:triAreaUO | |
METERNAME | "HEADCOUNT" or "FLOORAREA" | |
READING | spi:triHeadcountNU or spi:triTotalAreaOccupiedCalcNU | |
READINGDATE | spi:triModifiedSY |