- Print
- DarkLight
- PDF
Campus Café Open API
Campus Café exposes an open application programming interface (API). With this API, software developers can create automated services to send to and retrieve data from Campus Café directly. Campus Café’s Open API adheres to REST syntax and semantics using JavaScript Object Notation (JSON) and Hypertext Transfer Protocol (HTTP) actions, such as POST, GET, DELETE, etc.
Admissions portal setup for API
Admissions Portal Configuration ScreenCampus Café accepts inquiry and application data through an Open API. In this document, an inquiry is defined as a prospective student who has expressed interest in the given school and should be contacted to begin the process of applying. The API relies upon an admissions portal. Although the API does not provide a user interface, it is necessary to configure a portal to set the appropriate major codes available, entering semesters available, and defining required fields.
For information regarding setting up an admissions portal, refer to the admissions documentation.
Custom Control
Once the portal configuration has been completed, set the Custom Control ‘REST_INQ’ to the name of the default REST portal configuration.
- Navigate to Admin > Custom Control Maintenance
- In the Search box enter "REST_INQ"
- If control "REST_INQ" 1-1 already exists, click edit and enter the name of the rest API inquiry form exactly as it appears in the portal configuration. Example below is for a form titled restapi_inq.
- Click Save
- If control "REST_INQ" 1-1 does not exist, Enter REST_INQ in the Prog ID box
- In the Seq # box enter 1
- In the Context drop down, select Admissions
- Click Add
- In the Parameter Value 1 box enter the name of the admissions portal
- Click Save
Configure Token
Campus Café provides a security feature to ensure that request data is being sent from a legitimate source. You will need to obtain a token from the system sending the lead information.
- Navigate to Admin > Web App Config
- Locate the parameter OPEN_API_TOKEN
- Double click in the Value box and enter the token
- Contact Campus Cafe to restart the server or wait overnight for a scheduled restart
Available Inquiry Data Fields
The values collected for an inquiry include the following:
- First Name
- Field name firstName
- Max length 25 characters
- Last Name
- Field name lastName
- Max length 50 characters
- Email Address
- Field name emailAddress
- Max length 60 characters
- Phone Number (mobile)
- Field name: phoneNumber
- Max length 25 characters
- Home Phone Number
- Field name: homePhoneNumber
- Max length 25 characters
- Work Phone Number
- Field name: workPhoneNumber
- Max length 25 characters
- Inquiry Source (marketing source)
- Field name: inquirySource
- Max length 10 characters
- use Campus Café valid code
- Lead Url
- Field name: leadUrl
- Max length none
- See next section for more information.
- Major
- Field name: majorCode
- Max length 10 characters
- use Campus Café valid code
- Entering Semester
- Field name: enteringSemester
- Max length 6 characters, digits only
- use Campus Café valid code
- Admissions Site
- Field name: site
- Max length 2 characters , digits only
- use Campus Café valid code
- Admissions Billing Site
- Field name: billingSite
- Max length 2 characters , digits only
- use Campus Café valid code
- Counselor
- Field name: counselor
- Max length 3 characters
- use Campus Café valid code
- Texting Allowed
- Field name: textAllowed
- Max length 1 characters
- Use value Y for texting allowed
- Veteran Code
- Field name: veteranCode
- Max length 1 characters , digits only
- use Campus Café valid code
- Prior School Graduation Year
- Field name: priorSchoolGradYear
- Max length 4 characters , digits only
- use 4 digit year
- Prior School Graduation Month
- Field name: priorSchoolGradMonth
- Max length 2 characters , digits only
- Use values 1 through 12
- Address
- Street Address Line 1
- Field name: streetAddress1
- Max length: 50 characters
- Street Address Line 2
- Field name: streetAddress2
- Max length 50 characters
- Street Address Line 3
- Field name streetAddress3
- Max length 50 characters
- City
- Field name: city
- Max length 25 characters
- State
- Field name state
- Max length 2 characters
- Zip Code
- Field name zipCode
- Max length 15 characters
- Country
- Field name country
- Max length 20 characters
- Street Address Line 1
leadUrl Field (UTM)
Campus Cafe can import UTM (Urchin Tracking Module) by adding parameters to the the url string that is passed to Campus Café through the API.
Below is an example of the URL string. In this case, we are passing utm_medium, utm_source, utm_campaign, utm_content and utm_term
https://www.yourschool.edu/my-utmcodes-ip?utm_medium=cpc&utm_source=google&utm_campaign=1053902585&utm_content=389973371894_c_1t1&utm_term=online%20masters%20in%20social%20entrepreneurship
If a parameter value of leadUrl is passed into the Open API form, Campus Café will look for an included tracking record in Admissions Portal Config with a trigger name of LEADURL. The record must be checked as included and be placed in a tab at a location to be included on the form. The tracking record will be added with a the entire leadUrl value stored in the tracking record’s comment box.
Additionally, the leadUrl will be parsed to find any parameters in the url. Each parameter key will look for an included tracking record with a trigger equal to the parameter key. If the key begins with utm_ (case insensitive) that portion of the key will be removed. If a trigger is found, that tracking record will be added with that parameter’s value in the comment 1 field if it’s 75 characters or less. It will be added to the comment box if greater than 75 characters.
Since triggers can only be 10 characters long, the parameters in the leadUrl must only be 10 characters long (excluding the utm_). When creating your Template Request Triggers use Template Request Headers that have been defined as Request Type M - Multiple Values, so these values are not lost when prospects are sent to the holding table.
To use the Campus Cafe UTM report, create your tracking names using the Campus Cafe report name. For example, store the utm_medium parameter value into tracking UTMMEDIUM, to have these values show in the Campus Cafe UTM report.
Finally, have your trigger generate the tracking. Following the above example your trigger MEDIUM would have the value UTMMEDIUM in the 'Trigger Name:' value of your trigger definition.
There is a base report (Admissions Inquiry Applicant Listing-Extended that will pull the UTM tracking records. The names of the activity tracking records must be as follows to appear on the report.
UTMCAMPAIGN
UTMCONTENT
UTMGCLID
UTMLEADURL
UTMMEDIUM
UTMSOURCE
UTMTERM
Open API URL
Campus Café’s Open API Inquiry URL takes the following form:
https://campusCafeUrl.com/cafeweb/openAPI/v1/inquiries?portalConfig=ExtServiceInq&token=baseball
Web Form Data Format
Campus Café accepts these values transmitted via an HTTP POST action. In constructing an HTTP request, Campus Café will accept a single inquiry in the form of HTTP web form data. Below is a test web form, which can be used in a Hypertext Markup Language (HTML) document to deliver inquiry test data.
<form action="https://campusCafeURL/cafeweb/openAPI/v1/inquiries"
method="POST">
<input type="hidden" name="token" value="baseball" />
<input type="hidden" name="leadUrl" value="https://www.myschool.com/thisform?utm_medium=med&utm_source=google&utm_campgn=548&utm_conten=778&utm_term=online%20learning%20in%20social%20studies&gclid=KOFS_34_3423KI"/>
<label for="firstName">First Name:</label><input type="text"
name="firstName" id="firstName" /><br />
<label for="lastName">Last Name:</label><input type="text"
name="lastName" id="lastName" /><br />
<label for="emailAddress">Email Address:</label><input
type="text" name="emailAddress" id="emailAddress" /><br />
<label for="phoneNumber">Phone Number:</label><input type="tel"
name="phoneNumber" id="phoneNumber" /><br />
<label for="inquirySource">Inquiry Source:</label><input
type="text" name="inquirySource" id="inquirySource" />
<br />
<label for="majorCode">Major Code:</label><input type="text"
name="majorCode" id="majorCode" /><br />
<label for="enteringSemester">Major Code:</label><input
type="text" name="enteringSemester"
id="enteringSemester"/><br />
<label for="streetAddress1">Street Address 1:</label><input
type="text" name="streetAddress1" id="streetAddress1" />
<br />
<label for="streetAddress2">Street Address2:</label><input
type="text" name="streetAddress2" id="streetAddress2" />
<br />
<label for="streetAddress3">Street Address3:</label><input
type="text" name="streetAddress3" id="streetAddress3" />
<br />
<label for="city">City:</label><input type="text" name="city"
id="city" /><br />
<label for="state">State:</label><input type="text" name="state"
id="state" /><br />
<label for="zipCode">Zip Code:</label><input type="text"
name="zipCode" id="zipCode" /><br />
<label for="country">Country:</label><input type="text"
name="country" id="country" /><br />
<input type="submit" value="Submit"/>
</form>
The common model for delivering web form data is via a set of name/value pairs within he HTTP request. Note that this form of inquiry POST requires that the “application/x-www-form-urlencoded” must be set within the request header Field Content-Type.
JSON Data Format
Campus Café will also accept one or more inquiry records in the form of a JSON array (note: even a single record must be sent in an array). JSON data is also sent to the Open API URL described above. When this means of data delivery is used, the HTTP Request Content-Type must be set to “application/json”. The data payload should be set in the HTTP request body as raw data.
Sample raw body value:
[
{
"firstName":"Thomas",
"lastName":"TestStudent",
"emailAddress":"tteststudent@email.com",
"phoneNumber":"7778884444",
"inquirySource":"web-ad",
"majorCode":"CIS",
"enteringSemester":"201900",
"address":{
"street1":"5487 Payton Pl.",
"street2":"Ste. 2",
"street3":"",
"city":"Los Angeles",
"state":"CA",
"zipCode":"92000",
"country":"USA"
}
}
]
Open API Inquiries Returned Data
Campus Café provides a response to inquiry API requests that includes information regarding the inquiry data save results. The response returns a set of counts for the various results of each inquiry import attempt.
- The field date provides a timestamp of the inquiry process response.
- The field totalRecordCount returns the total number of records processed.
- The field holdingRecordCount returns the total number of records that have been placed into the Campus Café Admissions Holding Table because one or more inquiries may have collided with existing inquiry records.
- The field directlyUpdatedCount returns the total number of records that were located in Campus Café and updated with current inquiry information.
- The field insertedRecordCount returns the total number of inquiry records saved to Campus Cafe.
- The field duplicateRecordCount returns the total number of records identified as duplicate inquiry records.
- The field unknownRecordCount returns the total number of records that cannot be identified during the inquiry process.
- The field failedRecordCount returns the total number of records that have failed to be imported.
- The field messages includes any error message information that may have been generated during the import process.
{
"date":{
"cal":{
"year":2018,
"month":6,
"dayOfMonth":20,
"hourOfDay":10,
"minute":57,
"second":26
},
"validDay":false,
"zeroDate":false
},
"totalRecordCount":1,
"holdingRecordCount":0,
"directlyUpdatedCount":1,
"insertedRecordCount":0,
"duplicateRecordCount":0,
"unknownRecordCount":0,
"failedRecordCount":0,
"messages":{
"elements":[]
}
}
Retrieving Valid Codes
Campus Café’s Open API Inquiry portal expects the following data fields values to match internal values.
- billingSite
- counselor
- enteringSemester
- inquirySource
- majorCode
- site
- veteranCode
To accommodate automated communication of legitimate values available use the following REST URL replacing the bolded characters with the appropriate values.
https://yourCampusCafeDomain/cafeweb/public/openAPI/v1/values?portalConfig={form name}&fieldName={field name}
For example to get a list of valid major codes for form named ExtServiceInq use url:
https://yourCampusCafeDomain/cafeweb/public/openAPI/v1/values?portalConfig=ExtServiceInq&fieldName=majorCode
Sample return value:
[
{"value":"CED","description":"Continuing Education"},
{"value":"FIN","description":"Finance"}
]
Using these service calls, the developer may validate incoming inquiry data to Campus Café to ensure correct values are selected.