From Chain Builder, you can create a chain to download data from Schneider Electric® into Workiva, such as your greenhouse gas (GHG) emissions for Environmental, Social, and Governance (ESG) reporting.
Prerequisites
To build this chain, you'll use these core connectors:
Note: All connectors use the CloudRunner. No GroundRunners are required for this chain.
To download emissions data, you'll also need the username and password used for basic authenication with Schneider Electric.
Step 1. Create the chain
- From Chains, click Create, and select Create chain.
- Under Setup, enter a name and description to identify the chain.
- Under Variables, add variables to specify the data to download from Schneider Electric:
Name Value clientHierIds Enter the ID of your company's client hierarchy, as set up for Schneider Electric in Resource Advisor. serviceIds To download data only for a specific source, enter the GHG source ID of download emissions data for. fromMonth Enter the earliest month of the time period to download data for, in a yyyy-MM
format.toMonth Enter the latest month of the time period to download data for, in a yyyy-MM
format.carbonMapType Enter the carbon map from Resource Advisor to use — Primary or Secondary. If left blank, the command uses the Primary carbon map. emissionUOMId Enter the preferred unit of measure to use with downloaded emissions data. emissionURL Enter the URL of Schneider Electric API endpoint to request data from. - Click Save.
Step 2. Start with an HTTP request
To request the data to download from Schneider Electric, start with an HTTP POST command.
- Under BizApps, select HTTP, and move POST to Start.
- Select the POST command, and click Edit.
- Under Basic info, enter a name and description to help identify the command.
- Under Command properties, select the HTTP Request connector to use.
- Enter the command's properties:
Property Description User name Enter the user name used for basic authentication with Schneider Electric. Password Enter the password used for basic authentication with Schneider Electric. Show response Check this box. URL Select the emissionsURL variable under Chain. Content type Select application/json. Body text Enter the request as a JavaScript Object Notation (JSON) string, selecting the applicable variable under Chain as the value of each name/value pair: { "clientHierIds": [<clientHierId variable>], "serviceIds": [<serviceIds variable>], "fromMonth": "<fromMonth variable>", "toMonth": "<toMonth variable>", "carbonMapType": "<carbonMapType variable>", "emissionsUOMId": "<emissionUOMId variable>" }
Output schema Enter the sample JSON response from Schneider Electric: { "serviceOutput": [ { "divisionClientHierId": 0, "divisionName": "string", "siteClientHierId": 0, "siteName": "string", "dataSourceLevel": "string", "serviceId": 0, "serviceName": "string", "scope": "string", "usage": 0, "emission": 0, "emissionUOM": "string", "usageUOM": "string", "serviceMonth": "string" } ], "errorMessage": "string", "errorCode": "string" }
- Click Save.
Step 3. Add an Array to CSV command
To convert the JSON response from Schneider Electric to a comma-separated values (CSV) format, add a Array to CSV command:
- Under BizApps, select JSON, and move Array to CSV to the canvas.
- Drag a link from Start to the Array to CSV command.
- Select the Array to CSV command, and click Edit.
- Under Basic info, enter a name and description to help identify the command.
- Under Command properties, select the JSON connector to use.
- For JSON data, select the Response output of the POST command.
- Under Columns, add columns for the data downloaded from Schneider Electric:
Column name JSONPath usage .usage emissions .emissions - For Delimiter, select Comma.
- Click Save.
Step 4. Add a Create File command
To create a CSV file from the data, add a Create file command:
- Under BizApps, select File Utilities, and move Create file to the canvas.
- Drag a link from to Array to CSV command to the Create file command.
- Select the Create file command, and click Edit.
- Under Basic info, enter a name and description to help identify the command.
- Under Command properties, select the File Utilities connector to use.
- Enter the command's properties:
Property Description Text Select the Converted file output of the Array to CSV command. File path Select the Chain.Workspace variable under Runtime, and enter \
and the file name with a.csv
extension. - Click Save.
Step 5. Add commands to use data in Workiva
To use the CSV data in the Workiva platform, add Workiva connector commands to use the Created file variable output of the Create file command with a spreadsheet or Wdata table. For example, to add the Schneider Electric data as a data set in a Wdata table, add a Run chain event that uses a chain created from the Update datasets in a table template.
Step 6. Publish and run the chain
To enable the chain to run:
- Click Publish.
- Enter any comment about its publication, and click Publish.
To run the chain:
- From Chains, select Edit from the chain's menu.
- Click Chain Settings, enter the variable values to specify the data to download, and click Save.
- Click Execute and Run chain.