Data Integration Guide Version 4
Data Retention
GradesFirst allows clients to determine and manage their own data retention policy. Clients have complete control over their data. The application includes a user interface and data import mechanisms that allow clients to alter and remove information. When information is deleted from the GradesFirst application, it is completely removed from our databases.
Populating Student Data in GradesFirst
Student data is exported from the school's information system and is uploaded directly into the GradesFirst application by a user or agent of the school via automation. After successful authentication into the GradesFirst system, the file is uploaded, the data is validated, and then persisted to the GradesFirst database. The school does not experience any down time during this process, and the uploaded file is encrypted and kept on the GradesFirst servers in a secured location for 5 days in case they are needed for customer support issues. After 5 days, the uploaded file is automatically deleted and cannot be recovered. As with any interaction with GradesFirst, this data is transmitted via an SSL encrypted connection. Each institution decides how often data is refreshed from the student information system. Most schools update once daily.
There are a variety of ways to import your data into GradesFirst, and your institution can use whichever one(s) fit your needs best. Non-technical users can easily run one-time imports using the Admin panel inside GradesFirst, or university IT staff can run imports via the GradesFirst API. API imports may use either cURL or SFTP, and they can be run as one-time imports or as automatically recurring imports. Automatic imports offer the advantage of keeping your data in GradesFirst up-to-date, and they reduce the hassle of manually running imports as the semester progresses. University IT staff can set up the automated imports or outsource that work to GradesFirst. Once the automated import is in place, very little if any maintenance is required going forward.
For added security, import files can be encrypted before they are transferred. GradesFirst provides full documentation and support on setting up encrypted uploads. Once the file is encrypted, you can upload it to GradesFirst just as you would any other file, and GradesFirst will automatically handle decrypting and processing of the file as normal.
Testing Data Uploads
GradesFirst allows clients to test their data import files on a test system before going to production. A valid user account will be provided to personnel responsible for testing the data import. Please contact support@gradesfirst.com for more information on getting your test account set up.
CSV Data Uploads
GradesFirst data uploads use the CSV file format. Please follow this section to ensure data integrity.
Things to Consider
The file must be a plain text or flat file with values separated by commas. It needs to be in 8-bit or standard ASCII format, with a file extension of “.csv”.
Please enclose every field in double quotes. If any field value contains a comma or apostrophe, and the field value is not enclosed in double quotes, the data of the CSV file will be corrupted. This is a standard CSV file format rule. Although it’s not an absolute requirement to include all fields in double quotes, since Names, Majors, Courses, and Addresses often contain apostrophes and commas, we highly recommended enclosing every field in double quotes.
Incorrect:
Correct:
Editing your file in spreadsheet software like Microsoft Excel can automatically reformat and corrupt the data by stripping out leading zero’s, changing numbers to letters, and inserting carriage returns. It is not recommended to edit your data files with Excel unless you are an expert user, because it can cause data corruption and/or failed uploads. For this reason, we recommend editing all CSV files with a plain text editor, such as Notepad on Windows, TextEdit on Mac, or vi on Unix.
If any field contains double quotes as part of the actual data, such as a course named: “An In-Depth Study of Shakespeare’s “Hamlet””, you can insert these double quote characters into your data file by replacing each double quote with two consecutive double quote characters. So, the correct field would be: “An In-Depth Study of Shakespeare’s ““Hamlet”””.
Here is an example of enclosing the field in double quotes by concatenating double quote characters to the beginning and ending of the returned string value and checking for double quotes in the field value:
SELECT ‘”’ || replace(field_name, ‘”’, ‘””’) || ‘”’
AS my_field_name
FROM table_name
If you want to insert the required Header Record or Column Headers into the import file using SQL, one quick way is to use a UNION statement to accomplish this. (Be sure to account for the syntax of the SQL you are using)
Below is another example.
SELECT “Student ID”, “Student First Name”, “Student Last Name”
UNION
SELECT StudentId, StudentFirstName, StudentLastName
FROM Student_Table;
This will result in the first row to contain the required header record (column headers).
NOTE: The SQL above is an example and the Header Record in the actual import files would need to contain all the columns for each file, respectfully.
Document Header
Each uploaded file should contain the following header on the first line:
GradesFirst Import Version=4
Comments and Column Headers
Data files may contain comments by beginning any line with a ‘#’ symbol. Previous GradesFirst imports (version 1 manual imports) used Column Headers instead of a Document Header. Although no longer required, Column Headers can still be done using comments.
# Object, Action, External ID, Name, Group ID
Single Sign-On
If your university is using Single Sign-On, you will need to coordinate with the IT staff who handle the SSO setup to ensure that you are both using the same user identifier. This ensures that GradesFirst and your university SSO can correctly identify users when they log in. This user identifier must be unique, so the most common examples are: University ID, Login, CWID, UMID, RAM ID, C number, G number, SKG number, ONLID, No photo ID, Peoplesoft Empl ID, etc. We do not recommend using e-mail because some schools may allow duplicate e-mail addresses over time. Whatever identifier you end up using, you have two different fields where can choose to insert this identifier in your upload – the Primary ID or the Alternate ID. After you add this field to your upload, coordinate with the university IT staff member who is handling the SSO, let them know which identifier you are using, and let them know if you placed it in the primary ID field or the alternate ID field. Be sure the SSO server can return this value for each user when they attempt to login to GradesFirst.
Importing Your Data
There are a variety of ways to import your data into GradesFirst, and your school can use whichever one(s) fit your needs best. Non-technical users can easily run one-time imports using the Admin panel inside GradesFirst, or university IT staff can run imports via the GradesFirst API. API imports may use either cURL or SFTP, and they can be run as one-time imports or as automatically recurring imports. Recurring imports offer the advantage of keeping your data in GradesFirst up-to-date, and they reduce the hassle of manually running imports as the semester progresses. To set up recurring imports, your university IT staff will need to write a script to export the data from your student information system, format the data according to this guide, and then upload the data file via the GradesFirst API. For recurring data uploads, schools may upload at their discretion: nightly, weekly, monthly. We ask that schools schedule recurring imports after 7pm CST, but they must be finished by 5am CST.
Manual Imports inside GradesFirst
Perhaps the easiest way to import into GradesFirst is to simply upload your import file using the Admin panel.
Log into GradesFirst, click the Admin Tab, and click on Data Import.
Select the Term, choose the CSV file, and click Import My Selected File.
Verify that the data appears correct, then click Data Sample is Valid.
You will receive an email confirmation with the results of your import.
API Imports
You can upload API imports using cURL or SFTP. To be sure your systems allow traffic to GradesFirst servers, please see Firewall Exceptions.
Important Note: When selecting a time to schedule your automated upload, please do not schedule your file to import between 5:00am – 6:00am CST. This is our deployment window and all services are stopped during this time. So please ensure all uploads are finished by 5:00am CST.
API Imports with SFTP
You can set up SFTP imports with the help of your GradesFirst trainer during your school’s implementation of GradesFirst. If your implementation has already been completed, simply contact support and we’ll be glad to help out. Here’s the process:
Add GradesFirst’s IP addresses to your school’s firewall whitelist as outlined above.
E-mail us the SSH RSA Public Key(s) for the computer(s) that will be sending the import files via SFTP.
We’ll assign you a username and Internet address where you can send the imports.
(Optional) If you wish to receive import status e-mails after each import, log into GradesFirst, click on the Admin tab, click on School Settings, and enter your e-mail address under “API Imports E-mail Address”. Click the Update Settings button to save.
Upload the import file with SFTP.
API Imports with cURL
You can also run API imports using an open-source command line tool named cURL. (Although we recommend cURL, GradesFirst is not responsible for it, and cannot be held liable for damages due to installing or using it.)
Installing cURL on Windows
1. Download the appropriate version of cURL for your version of Windows.
2. Unzip the file.
3. Copy the curl.exe file into C:\Windows\System32
4. To test cURL:
1. Go to Start Menu > Run
2. Type cmd and hit Enter.
3. Type curl --help and hit Enter.
You should see information about the various options cURL provides.
Basic Automated Upload Example for Windows
1. Create a folder at C:\gradesfirst
2. In the C:\gradesfirst folder, create a folder named current and another folder named archive so that you have a folder structure like this:
C:\gradesfirst\current
C:\gradesfirst\archive
In this example, the current folder is where new files are placed each day by some automated process. The archive folder is where files will be placed after they are uploaded.
3. In the C:\gradesfirst folder, create a file called upload.bat
In this file, you'll want to include your script for uploads.
An example of what this script might look like is:
CD C:\gradesfirst\current
for %%f in (*.csv) do @curl -u <username>:<api-key> -F "data=@%%f" https://<environment>.gradesfirst.com/api/imports
move \-y "C:\gradesfirst\current\*.csv" "C:\gradesfirst\archive\"
Be sure to replace the tokens above in your script:
<username> - the username of the GradesFirst user you'll be using for imports.
<api-key> - the GradesFirst import user's API Key. You can see this key by logging in as the import user and navigating to Admin > View My User's API Key)
<environment> - Your school's GradesFirst subdomain for either the training or production site, depending on the site to which you'd like to send information.
Training Site Example: coastalcollege-training.gradesfirst.com
Production Site Example: coastalcollege.gradesfirst.com
So, the curl command in your script might look like:
curl -u johndoe:7rjto38f0swk4j598 -F "data=@%%f" https://coastalcollege-training.gradesfirst.com/api/imports
4. To test your script:
1. Place one of the sample import test .csv files in the C:\gradesfirst\current folder
2. Go to Start Menu > Run
3. Type cmd and hit Enter.
4. Run your upload.bat file by typing C:\gradesfirst\upload.bat
Within a minute or two, your file should show up in GradesFirst on the Data Import screen (Admin > Data Import).
5. Create a Windows scheduled task so that the upload occurs automatically on a schedule of your choosing. We recommend uploading once a day between the hours of 10 PM and 5 AM central time.
How to create a scheduled task on Windows 7:
Open Task Scheduler by clicking the Start button , clicking Control Panel, clicking System and Security, clicking Administrative Tools, and then double-clicking Task Scheduler. If you're prompted for an administrator password or confirmation, type the password or provide confirmation.
Click the Action menu, and then click Create Basic Task.
Type a name for the task and an optional description, and then click Next.
Select a schedule based on the calendar by clicking Daily, Weekly, Monthly, or One time, click Next; specify the schedule you want to use, and then click Next.
To schedule a program to start automatically, click Start a program, and then click Next.
Click Browse to find the program you want to start (your upload.bat file at C:\gradesfirst\upload.bat), and then click Next.
Click Finish.
Create your API Key
After you’ve installed cURL ,you need to create an API key. (If you are already running automated uploads, you already have an API key. Do not change your API key without good reason, because you must also change the cURL command accordingly.)
Download cURL. (see above instructions for Windows machines)
Add GradesFirst’s IP addresses to your school’s firewall whitelist as outlined above.
(Optional) If you wish to receive import status e-mails, log into GradesFirst, click on the Admin tab, click on School Settings, and enter your e-mail address under “API Imports E-mail Address”. Click the Update Settings button to save.
After logging into GradesFirst, click the Admin tab, and click "Create your API Key" (on the right).
Copy the key provided; it will be referred to as <api-key>
Use the following cURL statement for uploading:
curl -u <username>:<api-key> -F "data=@<file>" https://<environment>.gradesfirst.com/api/imports
<username> The user login of the user you want to do the import.
<api-key> The key that you received in step 3.
<file> The full local path and name of the file you want to upload.
<environment> The GradesFirst environment you are uploading to. "app" and "training" are the
most frequent options with "app" being the production environment.Run your command to upload the file.
GradesFirst Data Layouts
The following are the formats for the different types of records within GradesFirst. The easiest way to run your imports is to create a single CSV file that contains all the different types of records, but you can also import one file for each type of record if you wish. In either situation, you need to follow a set order as you are importing your records. This order is outlined below – if you are using a single CSV file for your entire upload, place the records in this order. If you are using one CSV file for each upload type, you need to run the imports in this order.
Important Note: If you are using the data integration guide version 1 to import your student records, and only using version 4 to supplement the import, you do not need to import all of the below required record types. For example, if you were simply using version 4 to import your Student/Advisor
assignment, you would simply need to create, and import, the Relationship file.
Term *
Major
Category
Course *
Section *
User *
Grouping *
Authorize
Registration *
Enrollment *
Instruction *
Declaration
Categorize
Tag
Absence
Relationship
Advisor Notes
* Signifies required record types for using version 4 to import all your student information.
Instruction Conventions
Below are tables that describe the various object imports. Descriptions include:
Columns: easily referable column name; has no purpose as imports are column order specific
Required: Either “yes”, “no”, or a list of actions for which the field is required.
Description: simple description of the content for the column
Anytime you see “External ID” for an object, that is the Unique Key at the University. Anytime you see “<object_name> ID”, that is a reference to the other object’s “External ID.”
Combining multiple types of records in a single file
If you don’t want to run one import of each type, thereby having 10-20 different imports, it is much easier to simply include multiple types of imports in a single file. As long as you follow the correct order noted on the previous page, you’ll be fine.
Example:
Clearing Data Fields
To enable capturing certain data points via manual data entry, as well as combining imports from disparate systems, certain data fields require adding a dash ("-") to the import file in order to clear the value from the system. Those fields are:
Classification
Overall GPA
Term GPA
Enrollment
Midterm Grade
Final Grade
User:
SSO ID
First Name
Last Name
Email
Alternate Email
Home Phone
Cell Phone
Work Phone
Address 1
Address 2
City
State
Zip
High School Zip
Household Income
Total Credit Hours
Total Credit Hours Attempted
Gender
Ethnicity
Date of Birth
Enrollment Status
Enrollment Goal
User PIN
Alternate External ID
Types of Imports (Alphabetical)
Absence
This is the file that will be used to assign absences to students for an enrollment. Not required.
Columns | Required | Description |
"absence" | Yes | Record type. |
Action | Yes | The value will be "add" to create an absence |
Primary User ID | Yes | The unique identifier for the user that will be given the absence. |
Section ID | Yes | The unique identifier for the section to mark the absence for. |
Date | Yes | The date of the absence. Example, mm/dd/yyyy |
Comment | No |
|
Excused | No | "Y" for excused and "N" for unexcused. This always defaults to unexcused. |
Example:
Advisor Notes
This is the file that is used to import notes or comments about students directly into the Advisor’s Note field. Not required.
Columns | Required | Description |
“note” | Yes | Record Type. |
Action | Yes | The value will be “add” to import a note or comment about a student. |
Student ID | Yes | The student’s ID the note or comment is in reference to. |
Group ID | Yes | The Group ID of the group where the note is connected to the student. |
Private? | Yes | Value should be “Y’ or “N”. Represents if note or comment is only viewable by the advisor. |
Viewable by Student? | Yes | “Y” or “N” value. Represents if note or comment is viewable by the student. |
Show on Student Report? | Yes | “Y” or “N” value. Represents if not is viewable on student development report. |
Created at | Yes | Example, mm/dd/yyyy . Date the note was created. |
Created by | Yes | User_ID of the advisor who created this note. |
Note or Comment | Yes | This is the actual comment that will be imported as an advisor’s note. |
URL | No | A URL relevant to this note. |
Note Reasons | No | A comma-separated list of note reasons |
HTML Formatting | No | "Y" or "N" value. |
Example:
GradesFirst Import Version=4
#Object, Action, Primary_Student_Id, Group_Id, Is_Private?, Student_View?, Show_on_Reports?, Created_On, Created_By, Body, URL, Note Reasons, HTML
"note","add","905123","GradesFirst University","Y","Y","Y","01/07/2015","905789","Andrew received excellent tutoring at our tutor center","www.gfu.org","Success Coaching,Academic Plan","Y"Authorize
This is the file that will assign users to a specific Role. Sets a particular user to be a student, advisor, professor, etc. in GradesFirst. Not required.
Columns | Required | Description |
"authorize" | Yes | Record type. |
Action | Yes | The value will be "add" to add a role to a user |
Role ID | Yes | The unique identifier for the role. This identifier has to be added to the role through the administrative section of GradesFirst. |
Primary User ID | Yes | The unique identifier for the user that will be given the role |
Example 1:
Example 2:
Category
Creates categories in GradesFirst and assigns them to a group. For example, our athletic clients use categories to identify which team their students are on (e.g. Football, Baseball, Softball). See “Categorize” for instructions on assigning students to categories. Dropping a category will cause all users to be removed from that category. Not required.
Columns | Required | Description |
"category" | Yes | Record type. |
Action | Yes | The value will be "add" to add or update a category |
External ID | Yes | A unique identifier for this category. Ex. “fbl”. |
Name | Yes | The name of the category. Ex. “Football”. |
Group ID | Yes | The unique identifier for a group. |
Example:
Categorize
Links the students to the categories. Categories must be previously defined in GradesFirst either via import “Category” above or manual via the website. Not required.
Columns | Required | Description |
"categorize" | Yes | Record type. |
Action | Yes | The value will be "add" to add a categorization to a user |
Category ID | Yes/No |