--- title: "KeepnTrack Adapter Actions" slug: "keepntrack-adapter-actions" description: "This is a list of actions in RapidIdentity Connect that can be used to interact with a KeepnTrack server." tags: ["RapidIdentity ", "Connect", "Adapter", "Actions", "KeepnTrack"] updated: 2022-06-03T18:49:46Z published: 2022-06-03T18:49:46Z canonical: "help.rapididentity.com/keepntrack-adapter-actions" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.rapididentity.com/llms.txt > Use this file to discover all available pages before exploring further. # Keepntrack Adapter Actions ## KeepnTrack Adapter Actions These actions can interact with a [KeepnTrack](https://www.keepntrack.com/) Adapter. ### defineKeepnTrackConnection Define a connection to a KeepnTrack server. | Property | Value | Description | | --- | --- | --- | | url* | text, expression, variable | the url of the KeepnTrack REST service | | db* | text, expression, variable | the name of the KeepnTrack database | | username | text, expression, variable | username for authentication to the KeepnTrack REST service | | password | password, string, expression, variable | password for authentication to the KeepnTrack REST service | | options | expression, variable | A record or JavaScript object with a field for each additional option. Currently defined fields are connectTimeout and socketTime which require a numeric value from 1 to 2147483647 (0x7FFFFFFF) that represents the number of milliseconds for the timeout, and 0 representing no timeout. | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript conn = defineKeepnTrackConnection("https://customername.keepntrack.com/ knt.cgi", "customernamedb", "adminuser@customername.net", ) ``` ### deleteKeepnTrackFacility Delete a KeepnTrack Facility Record by Id. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the KeepnTrack connection definition | | id* | text, expression, variable | the id of the KeepnTrack Facility to delete | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript deletedFacility = deleteKeepnTrackFacility(conn, facilityId) ``` ### deleteKeepnTrackPerson Delete a KeepnTrack Person Record by Id. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the KeepnTrack connection definition | | id* | text, expression, variable | the id of the KeepnTrack Person to delete | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript deletedPerson = deleteKeepnTrackPerson(conn, specificUserID) ``` ### getKeepnTrackActivities Get KeepnTrack Activity Records. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the KeepnTrack connection definition | | filter | text, expression, variable | Example Record or SQL WHERE clause used to filter the Records | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript allActivities = getKeepnTrackActivities(conn) ``` ### getKeepnTrackActivity Get a KeepnTrack Activity Record by Id. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the KeepnTrack connection definition | | id* | text, expression, variable | the id of the KeepnTrack Activity to get | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript singleActivity = getKeepnTrackActivity(conn, activityId) ``` ### getKeepnTrackFacilities Get KeepnTrack Facility Records. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the KeepnTrack connection definition | | filter | text, expression, variable | Example Record or SQL WHERE clause used to filter the Records | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript allFacilities = getKeepnTrackFacilities(conn) ``` ### getKeepnTrackFacility Get a KeepnTrack Facility Record by Id. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the KeepnTrack connection definition | | id* | text, expression, variable | the id of the KeepnTrack Facility to get | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript singleFacility = getKeepnTrackFacility(conn, facilityId) ``` ### getKeepnTrackPerson Get a KeepnTrack Person Record by Id. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the KeepnTrack connection definition | | id* | text, expression, variable | the id of the KeepnTrack Person to get | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript personByID = getKeepnTrackPerson(conn, personID) ``` ### getKeepnTrackPersons Get KeepnTrack Person Records. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the KeepnTrack connection definition | | filter | text, expression, variable | example Record or SQL WHERE clause used to filter the Records | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript persons = getKeepnTrackPersons(conn, \'Name_Last="Simpson"\') ``` ### saveKeepnTrackFacility Create/Update a KeepnTrack Facility Record. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the KeepnTrack connection definition | | record* | expression, variable | the Record to save | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript facilityTemplate = createRecord(true) addRecordFieldValue(facilityTemplate, "FacilityId", "MYFACILITY", false) addRecordFieldValue(facilityTemplate, "Name", "Springfield Elementary School", false) newfacility = saveKeepnTrackFacility(conn, facilityTemplate) ``` ### saveKeepnTrackPerson Create/Update a KeepnTrack Person Record. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the KeepnTrack connection definition | | record* | expression, variable | the Record to save | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # student personTemplate = createRecord(true) addRecordFieldValue(personTemplate, "Name_First", "Homer", false) addRecordFieldValue(personTemplate, "Name_Last", "Simpson") addRecordFieldValue(personTemplate, "IsStudent", "Y", false) newPerson = saveKeepnTrackPerson(conn, personTemplate) # staff personTemplate = createRecord(true) addRecordFieldValue(personTemplate, "Name_Prefix", "Mr.") addRecordFieldValue(personTemplate, "Name_Suffix", "I", false) addRecordFieldValue(personTemplate, "id", newPerson.id) addRecordFieldValue(personTemplate, "IsStaff", "Y", true) addRecordFieldValue(personTemplate, "Facilities", "1", true) addRecordFieldValue(personTemplate, "Facilities", "3", true) newPerson = saveKeepnTrackPerson(conn, personTemplate) ``` ### Supported KeepnTrack Person Record Fields Required Fields on create: Name_First, Name_Last, and at least one of IsVisitor, IsVolunteer, IsStudent, IsStaff, or IsVendor must be set to 'Y'. | Field | Read-Only | Type | Description | | --- | --- | --- | --- | | Inactive | N | Logical(Y/N) | Whether this record is active or not. Missing means active. | | EffectiveDate | N | Date(yyyy?mm?dd) | The date on which this record takes effect. Missing means “far distant past. | | ExpirationDate | N | Date(yyyy?mm?dd) | The date on which this record expires. Missing means no expiration. | | OnlineAppRecord | Y | Logical(Y/N) | Indicates if this Person record was created as an online application, which are filtered from Person lookup. | | IsVisitor | N | Logical(Y/N) | Specifies whether this person is a visitor. | | IsVolunteer | N | Logical(Y/N) | Specifies whether this person is a volunteer. | | IsStudent | N | Logical(Y/N) | Specifies whether this person is a student. | | IsStaff | N | Logical(Y/N) | Specifies whether this person is a staff member. | | IsVendor | N | Logical(Y/N) | Specifies whether this person is a vendor. | | PersonId | N | Text(24) | Account-assigned, unique identification number. Used for external interfaces. If empty on creation, the server assigns a unique value. | | SignedInCount | Y | Unsigned | The number of times the person is currently signed in. Typically zero (not signed in) or one (signed in). Unimplemented. | | Name_Prefix | N | Text(24) | Prefix to the person’s name. Examples include Ms., Dr., etc. | | Name_First | N | Text(32) | The person’s given name. | | Name_Last | N | Text(32) | The person’s surname name. | | Name_Suffix | N | Text(24) | Suffix to the person’s name. Includes degrees, certifications, and affiliations. | | Address_Organization | N | Text(64) | The name of the organization. | | Address_Line1 | N | Text(64) | The first line of the address. | | Address_Line2 | N | Text(64) | The second line of the address. | | Address_City | N | Text(64) | The address’s city name. | | Address_Region | N | Text(2) | Two-character state or province code. Link to the ‘Region’table. | | Address_Postal_Code | N | Text | The address’s postal code. Not a link. | | Address_Country | N | Text(2) | Two-character country code. Link to the ‘Country’table. | | Address_Residence | N | Logical(Y/N) | Whether this is a resdential mailing address or not. | | Address_Delivery_Instructions | N | Text | Instructions that may be passed along to the delivery person for this address. | | Address_USPS_Validation | N | Logical(Y/N) | Whether USPS address validation has been attempted. | | Address_UPS_Validation | N | Logical(Y/N) | Whether UPS address validation has been attempted. | | Address_USPS_Validated_Address | N | Text(200) | The raw text returned by the USPS validation method. Missing if not validated. | | Address_UPS_Validated_Address | N | Text(200) | The raw text returned by the USPS validation method. Missing if not validated. | | HomePhone | N | Phone Number | The person’s home phone number. | | WorkPhone | N | Phone Number | The person’s work phone number. | | MobilePhone | N | Phone Number | The person’s mobile phone number. | | FaxNumber | N | Phone Number | The person’s fax number. | | EmailAddress | N | Email Recipient List | The person’s email address. | | ConfirmationEmail | N | Email Recipient List | The email address that receives record update confirmation email messages. | | Gender | N | Text(F/M) | The person’s gender. | | Ethnicity | N | Text(16) | The person’s ethnicity. List of values determined from a preference. | | BirthDate | N | Date(yyyy?mm?dd) | The person’s birth date. | | SocialSecurityNumber | N | Text(9) | The person’s social security number. | | PictureURL | Y | URL | The URL of this person's picture, if any. | | CriminalConviction | N | Logical(Y/N) | Has this person been convicted of a crime? | | MedicalReleaseonFile | N | Logical(Y/N) | Does this person have a medical release on file? | | MedicalConditions | N | Text(200) | The known medical conditions for this person. | | EmergencyContact | N | Text(100) | Free-text field containing emergency contact information. | | Notes | N | Text(2500) | Free-text notes for this person. | | CustomField1 | N | Text(200) | A field that may be used for each customer’s specific needs. | | CustomField2 | N | Text(200) | A field that may be used for each customer’s specific needs. | | CustomField3 | N | Text(200) | A field that may be used for each customer’s specific needs. | | CustomField4 | N | Text(200) | A field that may be used for each customer’s specific needs. | | CustomField5 | N | Text(200) | A field that may be used for each customer’s specific needs. | | CustomField6 | N | Text(200) | A field that may be used for each customer’s specific needs. | | CustomField7 | N | Text(200) | A field that may be used for each customer’s specific needs. | | CustomField8 | N | Text(200) | A field that may be used for each customer’s specific needs. | | DriverLicenseState | N | Text(2) | The two-letter postal code for the state issuing this person’s driver license. | | DriverLicenseNumber | N | Text(24) | The person’s driver license number. | | VehicleRegistrationState | N | Text(2) | The two-letter postal code for the state issuing this person’s vehicle registration. | | VehicleRegistration Number | N | Text(12) | This person’s license plate number. | | VehicleMake | N | Text(12) | The make of this person’s vehicle. | | VehicleColor | N | Text(12) | The color of this person’s vehicle. | | VolunteerId | N | Text(24) | For volunteers. Used to store a unique external id for this volunteer. | | VolunteerType | N | Text(32) | For volunteers. The type of this volunteer. List determined from a preference. | | VolunteerHours | Y | Minutes | For volunteers. The total number of volunteer minutes for this person. | | FavoriteActivities | N | Text(1000) | For volunteers. Unused. | | CheckoutAllowed | N | Logical(Y/N) | For students. Is this student permitted to be checked out? | | Grade | N | Text(2) | For students. The grade this student is in. | | Teacher | N | Text(32) | For students. The name of this student’s primary teacher. | | Bus1 | N | Text(12) | For students. This student’s bus number. | | Bus2 | N | Text(12) | For students. This student’s bus number. | | StudentId | N | Text(24) | For students. A value used to link this student to the SIS. | | Family Id | N | Text(24) | For students. A place to store information provided by the SIS. | | StudentHours | Y | Minutes | For students. The number of minutes this person has been checked in as a student. | | Homeroom | N | Text(12) | For students. The homeroom for this student. | | AuthorizedToCheckout | N | Text(1000) | For students. The list of people who are authorized to checkout this student. | | OnStaffDate | N | Date(yyyy?mm?dd) | For staff. The date this person joined the staff. | | StaffId | N | Text(24) | For staff. A place to store information provided by the SIS. | | StaffPosition | N | Text(32) | For staff. Text for the type of position this person holds. List determined from a preference. | | StaffHours | Y | Minutes | For staff. The number of minutes this person has been checked in as staff. | | Employer | N | Text(32) | For vendors. This vendor’s employer contact information. | | VendorHours | Y | Minutes | For vendors. The number of minutes this vendor has been checked in. | | CheckInAllowed | N | Logical(Y/N) | Is this person permitted to check in? | | SecurityApproved | N | Logical(Y/N) | Has this person’s application been reviewed by an outside authority? | | BackgroundCheckDate | N | Date(yyyy?mm?dd) | Date of this person’s most current background check. This background check is performed outside of KeepnTrack. May be missing. | | SexOffenderCheckTime | Y | Time | The time this person was last checked against the sex offender database. | | SexOffenderScore | Y | Unsigned | The score from the most recent sex offender check. Zero if no matches were found. | | SexOffenderResults | Y | Text(1000) | Textual results from the most recent sex offender check. | | CBCOffenderCheckTime | Y | Time | The time this person was last checked against criminal database. Unused. | | CBCOffenderScore | Y | Unsigned | The score from the most recent criminal background check. Zero if no matches were found. Unused. | | CBCOffenderResults | Y | Text(1000) | Textual results from the most recent criminal background check. Unused. | | PrintBadge | N | Logical(Y/N) | Print a badge for this person on check in? | | PersonalMessage | N | Text(250) | Text message to be displayed for this person on check in. | | LoginId | N | Text(24) | An optional login id used by this person to access their information through a web interface. | | Password | N | Password | Paired with the login id. Password authorizing this person to access their information. | | Facilities | N | Id (Multi-value) | The ids of facilities to which this person is affiliated. | ### Supported KeepnTrack Facility Record Fields | Field | Read-Only | Type | Description | | --- | --- | --- | --- | | FacilityId | N | Text(32) | A short character string identifying the facility. | | Name | N | Text(32) | The name of the facility. | | ContactPerson_Prefix | N | Text(24) | Prefix to the person’s name. Examples include Ms., Dr., etc. | | ContactPerson_First | N | Text(32) | The person’s given name. | | ContactPerson_Last | N | Text(32) | The person’s surname name. | | ContactPerson_Suffix | N | Text(24) | Suffix to the person’s name. Includes degrees, certifications, and affiliations. | | PhoneNumber | N | Phone Number | The main phone number for this facility. | | FaxNumber | N | Phone Number | The fax number for this facility. | | EmailAddress | N | Email Recipient List | The email address for the facility contact person. | | Address_Organization | N | Text(64) | The name of the organization. | | Address_Line1 | N | Text(64) | The first line of the address. | | Address_Line2 | N | Text(64) | The second line of the address. | | Address_City | N | Text(64) | The address’s city name. | | Address_Region | N | Text(2) | Two-character state or province code. Link to the ‘Region’ table. | | Address_PostalCode | N | Postal Code | The address’s postal code. Not a link. | | Address_Country | N | Text(2) | Two-character country code. Link to the ‘Country’ table. | | Address_Residence | N | Logical(Y/N) | Whether this is a resdential mailing address or not. | | Address_DeliveryInstructions | N | Text | Instructions that may be passed along to the delivery person for this address. | | Address_USPSValidation | N | Logical(Y/N) | Whether USPS address validation has been attempted. | | Address_UPSValidation | N | Logical(Y/N) | Whether UPS address validation has been attempted. | | Address_USPSValidatedAddress | N | Text(200) | The raw text returned by the USPS validation method. Nil if not validated. | | Address_UPSValidatedAddress | N | Text(200) | The raw text returned by the USPS validation method. Nil if not validated. | | TimeZone | N | Text(64) | The time zone in which this facility is located. | | ScreenLogoURL | Y | URL | The URL of this accounts screen logo. | | BadgeLogoURL | Y | URL | The URL of this accounts badge logo. | ### Supported KeepnTrack Activity Record Fields | Field | Read-Only | Type | Description | | --- | --- | --- | --- | | Facility | Y | ID | The facility to which this activity is associated. | | ActivityPerson | Y | ID | The person performing this activity. Applies only to activities for enrolled persons. | | Student | Y | ID | The student on whose behalf these hours should be credited. Not implemented. | | Parent | Y | ID | For a student being checked in or out, the parent who is doing the activity. Not implemented. | | Source | Y | Text(8) | The client from which this Activity originated. Currently either Admin or Kiosk. | | Classification | Y | Text(12) | The major classification for this Activity (e.g, Volunteer, Visitor, Student, Staff.) | | ActivityGroup | Y | Text(32) | Previously, for non-timed activities, the event that triggered this activity (e.g. Activity, Early Dismissal, Late Arrival.) Obsolete. | | ActivityType | Y | Text(32) | The type of activity this record represents. List determined from a preference. | | Destination | Y | Text(32) | Specific location or activity associated with Activity Type. | | TypeandDestination | Y | Text(64) | The text “Type (Destination)” for reporting and badges. | | TransactionType | Y | Text(8) | One of 'Timed', 'In', or 'Out' specifying whether the transaction is timed or untimed. | | StartTime | Y | Time | The time at which this activity started. | | EndTime | Y | Time | The time at which this activity concluded. | | Duration | Y | Minutes | The duration, in minutes, of this activity. | | CheckinStation | Y | ID | Station at which this person checked in. Present only for activities handled by the Kiosk. | | CheckinTime | Y | Time | Time at which this person checked out. Present only for activities handled by the Kiosk. | | CheckoutStation | Y | ID | Station at which this person checked out. Present only for activities handled by the Kiosk. | | CheckoutTime | Y | Time | Time at which this person checked out. Present only for activities handled by the Kiosk. | | Login | Y | ID | For manually entered records, the administrator creating the record. | | PersonId | Y | Text(24) | The Person Id of this Volunteer, Student, or Staff person. Used for sign out lookups. Applies only to enrolled persons. | | PersonName_Prefix | Y | Text(24) | Prefix to the person’s name. Examples include Ms., Dr., etc. | | PersonName_First | Y | Text(32) | The person’s given name. | | PersonName_Last | Y | Text(32) | The person’s surname name. | | PersonName_Suffix | Y | Text(24) | Suffix to the person’s name. Includes degrees, certifications, and affiliations. | | VisitorId | Y | Text(32) | For visitors. The visitor's driver license number or other form of id. | | VehicleMake | Y | Text(24) | For visitors. The visitor's vehicle make and color. | | VehicleRegistration | Y | Text(16) | For visitors. The visitor's vehicle registration number. | | BadgeNumber | Y | Text(8) | A unique number printed on the badge if a badge was printed at sign in. | | JobNumber | Y | Text(32) | For staff. The government-required job number. | | Donation | Y | Currency | The amount of a monetary donation. | | Description | Y | Text(2500) | A textual description of this activity for manually entered records. | | PictureURL | Y | URL | The URL of this person's picture, if any. | | Notes | Y | Text(2500) | Notes, if any, associated with this activity. | | FacilityName | Y | Text | The name of the facility where this activity took place. |