NiCE KM: CAS API Table/Fixed Table Instructions
Overview
The CAS API and NiCE KM integration automatically builds a table in NiCE KM based on data from the CAS API, preventing the need for manual updates.

Integration Steps
Review the integration steps below. More information for select steps is below.
|
Step # |
Task |
Owner |
|---|---|---|
|
1 |
Identify which tables will have the integration, who the SME is for the content (e.g., account team), and when the integration is needed by (e.g., cycle rollover, etc.). |
E&K team |
|
2 |
Identify the data needed for the table, including:
|
E&K team |
|
3 |
Create the table "stub" (i.e., table header and column names).
Be sure to edit the table properties and select First row for headings. |
E&K team |
|
4 |
Create the AWS S3 folder, CAS API subscription, retrieve the backlog (if any), and place it in the AWS S3 folder. |
Implementation team |
|
5 |
Configure the BuildTable() function for the table. |
E&K team |
|
6 |
Test the BuildTable() function (e.g., test against backlog, test automated delivery, etc.). |
E&K team |
|
7 |
Publish the new table. |
E&K team |
Step 5: Configure the BuildTable Function
- The templates for the Participating Programs and GRE Codes already have a BuildTable script to customize.
- On each table page, there are three components:
- Reference to the BuildTable script (usually collapsed).
- Configuration settings for the table (usually collapsed).
- Table with headers (these can be styled, resized, added to, etc. as needed). The rows are filled in by the script.

Step B: Configure Table Settings
Sample Options
var data_url = 'https://services-liaison.s3.us-east-1.amazonaws.com/services-testing-003/data_csdcas_programs_6709.json';
var SELECTOR = 'table tbody';
var SORT_ORDER = ["orgName", "name", "type", "deadlineDisplay"];
var DISPLAY_ORDER = ["state", "orgName", "name", "type", "deadlineDisplay",
"programAttributes.supplementalApplicationRequired",
"programAttributes.supplementalFeeRequired",
"programAttributes.greRequired"];
var IGNORE = function(item) {
return item.status == "draft" || item.status == "review";
};
var STYLE = function(row) {
var styles = {};
if (row.concentration == "Application submitted by the deadline") {
styles["deadlineDisplay"] = "background: #3498db; font-weight: bold;"; // blue
}
if (row.concentration == "Application and transcripts received by deadline") {
styles["deadlineDisplay"] = "background: #f39c12; font-weight: bold;"; // orange
}
if (row.concentration == "Application verified by deadline") {
styles["deadlineDisplay"] = "background: #27ae60; font-weight: bold;"; // green
}
styles.default = "";
return styles;
}
buildTable(data_url, {SELECTOR: SELECTOR, SORT_ORDER: SORT_ORDER, DISPLAY_ORDER: DISPLAY_ORDER, IGNORE: IGNORE, STYLE: STYLE});
The options include:
- data_url: the data file to load, in the following format. Note that the ID is unique to a CAS and cycle and is stored in the Master Delivery Schedule.
https://services-liaison.s3.us-east-1.amazonaws.com/services-testing-003/data_csdcas_programs_ID.json https://services-liaison.s3.us-east-1.amazonaws.com/services-testing-003/data_atcas_programs_ID.json
- SELECTOR: CSS selector for the table to use. If there are multiple tables on the page, you can target a specific one. Otherwise, just leave the default.
- SORT_ORDER: an array of fields to sort by (such as "orgName" first, then "name," etc.).
- DISPLAY_ORDER: an array of fields to display in the table columns, from left to right. Field names may be standard attributes ("state") or custom attributes ("programAttributes.attributeName"). In custom attributes, the programAttributes[].displayName should be used for filtering (corresponding to the value entered by the user in the “AttributeName” parameter - var DISPLAY_ORDER = ["name", "etsCode", "programAttributes.AttributeName"]; ). The value to be displayed in the row in the table would be programAttributes.attributeValues.attributeValue.
- IGNORE: a function that determines which rows to ignore (e.g., ignore items with a status). The incoming item is an object based on the JSON entries.
- STYLE: a function that determines the inline CSS style to apply to each cell. The incoming item is an object based on the JSON entries. The return value should be an object with an inline CSS style for each field name. For example:
styles["fieldName"] = "background: #aa0000;". You may optionally set a value forstyles.default: this inline CSS will be added to cells where an exact field match isn't already there.
Step C: Set Up Table
Be sure that the table stub is already created with header rows labeled. Columns should match the DISPLAY_ORDER configuration settings, both in name and order.
Sample Table
|
State |
Institution |
Program |
Program Type |
Program Deadline (Month/Day/Year) |
Supplemental Application Required |
Supplemental Fee Required |
GRE Required |
|---|
Sample Table HTML
<table class="stick-one mt-responsive-table" id="program-table">
<thead>
<tr>
<th scope="col">
<p>State</p>
</th>
<th scope="col">
<p>Institution</p>
</th>
<th scope="col">
<p>Program</p>
</th>
<th scope="col">
<p>Program Type</p>
</th>
<th scope="col">
<p>Program Deadline (Month/Day/Year)</p>
</th>
<th scope="col">
<p>Supplemental Application Required</p>
</th>
<th scope="col">
<p>Supplemental Fee Required</p>
</th>
<th scope="col">
<p>GRE Required</p>
</th>
</tr>
</thead>
<tbody></tbody>
</table>
Additional Style Code
If needed, you can use the codes below to further customize program data.
Make text invisible via CSS styling if there's a value you don't want users to see (NAFCAS example)
var STYLE = function(row) {
var styles = {};
if (typeof row.campus == 'undefined') {
styles["campus"] = "opacity: 0"; // hide the text - using opacity means users can't highlight the invisible text with the cursor
}
styles.default = "";
return styles;
}
Apply snippets of default answer values when the answer values themselves aren't being picked up (CASPA example)
var STYLE = function(row) {
var styles = {};
if (row.track.includes("Blue:")) {
styles["deadlineDisplay"] = "background: #3498db; font-weight: bold;"; // blue
}
if (row.track.includes("Orange:")) {
styles["deadlineDisplay"] = "background: #f39c12; font-weight: bold;"; // orange
}
if (row.track.includes("Green:")) {
styles["deadlineDisplay"] = "background: #27ae60; font-weight: bold;"; // green
}
styles.default = "";
return styles;
}
Fixed Table Headers
To add the fixed table headers functionality, you must add a specific class name to the <table> tag. Note that the fixed table header doesn't work in mobile. Instead, the default behavior was selected for ease of reading.
Via WYSIWYG
- Right click on the table and click Table properties.
- Under Headings, select the First row checkbox.
- Under Stylesheet classes, enter stick-one for a single-header table or stick-two for a double-header table.
Via HTML
- Edit the page, then in the top right of the editor, click the three dots, then HTML icon.
- Enter the following tag in the <table> script:
- For a single-header table, add class="stick-one". If the table already has class attributes, then you can add stick-one to the existing class list. You must also edit the table properties and select First row for headings.
- For a double-header table, add class="stick-two". If the table already has class attributes, then you can add stick-two to the existing class list.
- Click Save code, then click Save.

