IBM TAS Connector for Envizi

The IBM TAS Connector for Envizi is released in TAS as TAS Connector for Envizi.

The TAS Connector for Envizi supports the following capabilities through an App Connect flow:
  • 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

The following image illustrates the type of data that is being sent by the API and App Connect Flows.

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

  1. An instance of App Connect Enterprise or App Connect Pro with the Designer component.
  2. Admin access to a TAS environment with a dedicated username and password for this integration.
  3. Envizi instance with an AWS S3 Bucket.
  4. 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

Installation overview
  1. Configure App Connect

    a. Import flows into App Connect

    b. Configure flows

  2. Configure TAS

    a. Security Role Configuration

    b. Group Name Configuration

  3. Testing

    a. TAS outbound connectivity

Part 1. Configure App Connect

App Connect Authentication
Note:
  • 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.
Adding accounts
Before importing the flow to App Connect, add Accounts for Amazon S3 and HTTP connectors. While adding the HTTP connector account, include credentials for the TAS user which can consume the OSLC API:
  1. Navigate to Catalog section of the App Connect instance.
    Creating account
  2. In the Search application field, type name of the connector.
  3. If the App Connect instance does not have an account for the connector, click Connect to create a new account.
  4. Open the account selection drop-down list, and click Add a new account.
    Add a new account
  5. 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.
    Connecting to S3/HTTP
  6. Click Connect.
  7. 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 is Account 2.
  8. Click the Ellipsis menu and select Rename Account.
    Renamming account
  9. Enter an account name and click Rename Account. This name can now be used by the connector in the flow.

Importing the Flow
  1. Open the Dashboard of the App Connect instance.
  2. Click the New button and select Import Flow.
    Import the flow
  3. Browse to the flow's YAML file and click Import. The flow is imported and opened.
    Select the flow
Configuring the flow to use the right accounts
When importing a flow, it is important to check if the flow is using the right accounts for the different connectors:
  1. Click Edit Flow.
  2. Verify that the connectors are using the right accounts.
  3. To change the account for any connector, select the connector and click the drop-down icon next to the Account's name.
  4. Select the account name to use from the list.
    Select the desired account
Configuring the Scheduler
  1. Click the Scheduler node.
  2. Configure the schedule as required.
    Configure the scheduler

Part 2. Configure TAS

Step 1: Initial TAS Configuration
Import OM package

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.

TAS API user access
In order for App Connect to be able to use TAS APIs, a user must be assigned with certain permissions. These user's credentials are configured in App Connect:
  1. 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.
  2. 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.
  3. Add the TAS Base License to the License Details section on the user Profile.
  4. Select the newly created group or desired existing group and switch to the Access tab and then add the appropriate access for the integration.
  5. 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.

Minimum requirements

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
Step 2: Group Name Configuration

The following steps outline the necessary configurations for the Envizi Group Name Configuration page.

Data Modeler
  1. Navigate to Tools -> Builder Tools -> Data Modeler and using the Object Browser navigate to Location->triBuilding.
  2. Revise the BO and add four fields:
    • cstEnviziParentOneTX
    • cstEnviziParentTwoTX
    • cstEnviziParentThreeTX
    • cstEnviziGroupNamePathTX
    Data modeler

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.

Form Builder
  1. Under Tools -> Builder Tools -> Form Builder, click on the Location module on the left side of the screen and then click triBuilding.
  2. Revise the triBuilding form by clicking Revise in the top right corner of the pop-up
  3. 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
  4. Select this new tab and click Add Section.
  5. Enter cstEnviziDetails as the Name and Envizi Details as the Label. Click Apply.
  6. 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.
  7. 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:
  8. Click triBuilding on the left panel and then click on Sort Tab. Move the cstEnvizi tab to the second position and click Apply.
  9. Publish the form.
Object Migration
  1. Navigate to Import Migration and import package EnviziConfig.zip by clicking New Import Package, select the zip file, and then click OK.
  2. A new window is displayed. If it is not displayed, just select the package from the list.
  3. On this package, click Validate and wait for the validation to complete. If no errors are displayed, import the package.
Security Manager
  1. Go to Tools -> Administration -> Security Manager. This application sets who can and cannot access this newly created tab.
  2. Click the newly created name of the group, and navigate to the Access tab.
  3. On this tab select Location -> triBuilding -> cstEnvizi.
  4. Choose the access level for the group and click Save.
    Security manager
Workflow Builder
  1. Go to Tools -> Builder Tools -> Workflow Builder. Select Location -> triBuilding.
  2. Within the Location object, search for the existing Workflow triBuilding - Synchronous - Permanent Save Validation.
  3. 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:
It will be defined as the image below:

Click the Start task at the top and publish the workflow.

My Reports and OSLC
  1. 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:
  2. Save the report.
  3. 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.
    Impirt all fields
Navigation Builder
  1. 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.
    Nvaigation builder edits
  2. On navigation Items section, expand Landing Page –Tools -> Menu Group –>System Setup. Select Menu group –>Integration and expand Navigations Item Library.
    Navigation items
  3. Search for Envizi, select the item, and then click Add to Collection.
    Navigation collection properties
  4. Click Save.
  5. Log out and Log in again to the system.
Using the Integration

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.

Enable Envizi check box is also available. The Envizi tab is displayed only when this check box is marked. One more item that must be configured is the Number of levels to be used on the Envizi configuration. Envizi hierarchy path matches this selection.
Envizi integration

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

On-demand Flow

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.

  1. The following parameters in the initial Set variable node need to be configured in order to use this flow:
    set variable
  2. 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
    .
Always-On Flow

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.

Configuring the Flow Parameters
  1. Click on the initial Set variable node.
  2. In Variable -> config -> customer, enter the value provided by Envizi.
  3. In Variable -> config -> triURL, enter URL for the TAS instance. (e.g., https://example.com:9080)
Starting and Stopping the flow
  1. Click the three dots menu on either the flow's tile or the specific flow page.
    Start API
  2. Click on Start API or Stop API depending on which action is desired.
    Start API flow

Part 3. Testing

A good way to test the TAS Outbound connectivity is to use the Always_On flow.

  1. Start the Always_On flow and add a test building in the system.
  2. 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

Common errors that arise from TAS

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.
If these do not resolve the issue, try clearing the OSLC Cache in TRIRIGA Admin Console in case the integrations do not work in intended manner.

Reference for Pre-requisite

Add certificate in TAS:
Import App Connect Cert to TAS to enable encrypted communication. and provide the certificate from App Connect as a secret to the instance of TAS:

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

Buildings
Table 1. Field mapping buildings
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  
Accounts
Table 2. Field mapping accounts
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