The autoSync or non-interactive contacts transfer and update allows your IT Manager to set up a rolling contacts transfer and update facility between your school's administration system and Infiniti. This is a "set and forget" import facility which, once set up, will run according to the schedule implemented by your IT Manager. This process allows your school software to transfer records into Infiniti at scheduled intervals.


All patrons must have an email address if you intend to email messages directly to them. This is used to communicate messages regarding overdue loans, reservations, and for resetting their forgotten Infiniti password (if applicable). In addition each student patron account can be assigned multiple contacts to communicate with different persons associated with the patron.


Before Getting Started


Infiniti's non-interactive patron contacts import and update tool provides your school with a means of automating the synchronisation of patron contact information from your Student Management System or other appropriate source. Much like the ad hoc interactive Patron Contacts import, this automated process accepts CSV (Comma Separated Value) files that you, or your IT team, have generated from your internal systems.


This facility utilises a script created and scheduled by the school's suitably qualified IT Technician. Note: Scripts is not intended for use by library managers or library staff and does not run in a browser.


Prior to commencing the setup of autoSync please ensure you are familiar with the following:

  1. How to extract information, in CSV format, from your Student Management Systems or data source.
  2. The use of your preferred scripting tool and language.
  3. Basic knowledge of cross-platform non-interactive web agents (we recommend curl or similar).
  4. You school's Infiniti URL, which will be similar to: yourschool.concordinfiniti.com.
  5. The username and password of an account in your school's Infiniti with system administration privileges.


Import Concepts Of Patron Contacts


To correctly and safely upload patron contacts, IT Technicians need to be aware of several key concepts about contact records in Infiniti.


A patron contacts can be an email address, a phone number or a social media identifier. Currently Infiniti only uses email addresses, although the other contact types can be informative for librarian correspondence with patrons. If a patron has multiple email addresses, only one of these can be (and must be) the “primary” email contact for the patron. The primary contact is the default contact in most scenarios for communicating directly with the patron and will be the one used for most reports, screens, and authentication mechanisms. This enforcement means, that regardless of what information you provide for a patron in a CSV file, if any information is provided at all, a primary contact role will be preferentially enforced.


Not every mode of contact transfer supported by interactive web import screen is supported by the non-interactive transfer. Only the following import modes are supported by the non-interactive contact importer:

  • Replace Patron Contacts, and
  • Replace Patron Contacts but keep custom contacts.


Custom contacts are considered patron contacts that librarians have manually added or have modified after a transfer. This mode allows for script transfer to avoid overwriting custom contact information that doesn’t exist in the student administration system.


The CSV File


The first step in automating the synchronisation of your patron contact information is to create the CSV file which will be used by your script to transfer or update your patron’s contact details. The patron contacts transfer requires specific header column names in the CSV file.


The CSV File you upload to Infiniti through this script MUST contain the following fields:

  • username: is the mandatory matching key for updating an existing user contacts or populating new contacts. Note: Users will not be created for usernames that don’t exist during a contacts transfer.
  • type [string] - one of “EMAIL”, “PHONE”, “SOCIAL_MEDIA”. Note: Only email is currently supported for outgoing messages, other data supplied will be stored for reference purposes only.
  • contact [string] - the contact data. This will be an email address for email contact, a phone number for phone contacts, and freeform text for social media contacts.

Note: Any row with blank contact data will be ignored. Contact data is romanised (converted to Latin script) and cleared of diacritics.


The CSV File you upload to Infiniti through this script MAY contain the following fields (please refer to ad hoc interactive Patrons Contact transfer for a layperson's description of these fields):

  • role [string] - one of:
    • "PATRON"- the patron themselves, i.e., the patron receives communications on their own behalf.
    • "GUARDIAN" - the patron's guardian, i.e., the parent/guardian/carer receives communications associated with the patron.
    • "OTHER" - a contact other than the patron or a patron's guardian, eg. the patron's teacher.
      Note : if this column is missing, "PATRON" is assumed.
  • primary [string] - TRUE or FALSE. As mentioned above, Infiniti will try to enforce a maximum of one primary contact per contact type.
  • addressee [string] - if left blank for “patron” role contact, the addressee will be determined from the user's existing name attributes.
  • bcc [string] - one of: “TRUE”, “FALSE”, or “SCHOOL_DEFAULT”. If present on an email contact, this informs Infiniti whether to use Blind Carbon Copy when emailing to multiple contacts of a user. Ignored on other contact types. Assumes SCHOOL_DEFAULT if this column is missing. 
  • sms [string] - TRUE or FALSE. If present on a phone contact, this informs Infiniti that the phone number supports receiving SMS. Ignored on other contact types. Assumes FALSE if this column is missing.
  • scenarios [string] - one or more of the communication scenarios listed below, delimited by a semi-colon. The scenarios listed for contact does not mean that Infiniti will ever use a scenario for a given patron, simply that it is permitted to.


For the optional scenarios column, supported scenario values are:

  • ANY - Any existing or future communication scenario. Use this for contacts that are the sole or general purpose contact for the user. Assumes ANY if the scenarios column is missing.
  • NONE - No communication scenarios i.e., recording keeping only. This contact will never be directly used for in-system communication. Assumes NONE if the scenarios column is present but the current cell is blank.
  • CANCELLED_RESERVATION - reservation was cancelled.
  • CURRENT_LOANS_REPORT - inform all patrons of any current loans they have.
  • EXPIRED_RESERVATION - reservation expired.
  • EXPIRING_RESERVATION - reservation expiring soon.
  • LOAN_RECALL - manually recall a loan from a patron.
  • ORDER_TO_SUPPLIER - send an order to a supplier.
  • OVERDUE - inform patrons of loans that have just become overdue.
  • OVERDUE_ESCALATION_ONE - inform patrons of loans that have become overdue by a preset duration.
  • OVERDUE_ESCALATION_TWO - inform patrons of loans that have become overdue by a preset duration.
  • OVERDUE_ESCALATION_THREE - inform patrons of loans that have become overdue by a preset duration.
  • PATRON_RECEIPT - manually emailed a loan receipt.
  • PRE_OVERDUE_NOTICE - warn patrons of loans that will become overdue within a preset timeframe.
  • RESERVATION_PICKUP  - reservation ready for pickup. Sent after a book has been returned.
  • RESET_FORGOTTEN_PASSWORD - send a password reset email to a patron. Not applicable to third-party authentication.


Sample CSV import file:


username,type,role,primary,addressee,contact,scenarios

jdoe1,EMAIL,PATRON,TRUE,,jdoe1@yourschool.com,ANY

jdoe1,EMAIL,GUARDIAN,FALSE,Jane Doe,jane.doe@example.com,OVERDUE_ESCALATION_ONE;OVERDUE_ESCALATION_TWO;OVERDUE_ESCALATION_THREE

wchurchill,EMAIL,PATRON,TRUE,,churchill@yourschool.com, ANY

wchurchill,PHOME,PATRON,TRUE,,01 2345 6789,ANY



The Non-interactive Script

Once your CSV is ready your import script is prepared by a suitably qualified IT Technician and will HTTP POST a CSV file of user contacts, extracted from your student administration system or similar source of user data, to this URL: https://[school.concordinfiniti.com]/api/import/userContacts/{importMode}.

Where import mode is one of two current replaceDeclaredPatrons options (case sensitive):

  • replaceDeclaredPatrons: If a patron (username) is declared in the CSV; only the contacts declared in the CSV file will be assigned to that patron; any other contact will be removed from the patron.

  • replaceDeclaredPatronsKeepCustomContacts: If a patron (username) is declared in the CSV; only the contacts declared in the CSV file will be assigned to that patron. Contacts that were created manually by librarians in Infiniti or modified by librarians after being imported will preserved.

Infiniti will treat the first multi-part file of the HTTP POST as the CSV file - the file name and form attribute name of the post are ignored. The CSV file may be empty; for schools performing scheduled incremental imports.

The action is protected by HTTP Basic Auth over SSL/TLS. You will need to provide the username and password of a new or existing user with system administration privileges in Infiniti. 

Best practice is to create a new account in Infiniti for transferring data, e.g., autoimport, and grant this user system administration privilegesAs SAML Single Sign-On requires a browser, the credentials for this user cannot be verified via SAML; one of the other credential sources will be required.


Your school's script can be implemented in any fashion chosen by your IT Technicians. An example of how a script may post the CSV file to Infiniti is the curl application, a cross-platform non-interactive web agent:


curl -X POST -F "file=@contacts.csv" https://[user]:[password]@[yourschool.concordinfiniti.com]/api/import/userContacts/replaceDeclaredPatrons


or


curl -X POST -F "file=@contacts.csv" https://[user]:[password]@[yourschool.concordinfiniti.com]/api/import/userContacts/replaceDeclaredPatronsKeepCustomContacts


Results of Processing

A sample csv import file for existing users in Infiniti could look like: 


username,type,role,primary,addressee,contact,scenarios

jdoe1,EMAIL,PATRON,TRUE,,jdoe1@yourschool.com,ANY

jdoe1,EMAIL,GUARDIAN,FALSE,Jane Doe,jane.doe@example.com,OVERDUE_ESCALATION_ONE;OVERDUE_ESCALATION_TWO;OVERDUE_ESCALATION_THREE

wchurchill,EMAIL,PATRON,TRUE,,churchill@yourschool.com, ANY

wchurchill,PHOME,PATRON,TRUE,,01 2345 6789,ANY


When complete the script will produce a JSON result array: 

  'success' - Whether all user records imported without error 

  'summary' - A summary of the import action; successful or otherwise. 

  'details' - An array of each user row outcome. Only included if some rows failed to     import. "row number" -> "row outcome" 

A JSON result array can look like: 

{"success":true, "summary":"Contacts for 12 patrons updated successfully."}


or


{"success": false, "summary":"Unauthorised. Check credentials."}