Resource Booking

The Resource Booking product integration allows students to reserve any type of resource (rooms, PCs, pods, etc.).

Overview

The Resource Booking product integration allows students to reserve any type of resource (rooms, PCs, pods, etc.).

Vendors

The Resource Booking product integration is currently supported by the RESTful API (generic) vendor.

User Experience

The following section describes information relating to the user experience for the Resource Booking product integration.

User Activities

Students can create, cancel, and view existing reservations.

Authentication

There is no need for additional user authentication. Authentication with your system should be based on the API authentication. For more information, see Authentication Type.

Offline Support

Offline functionality is supported for the My Reservations tab, but not for the New Reservation tab.

Main Workflows and Screenshots

The Resource Booking product integration contains the following two menu options:

  • New Reservation
  • My Reservations
By default, after selecting the Resource Booking product integration tile, the New Reservation tab opens: If there is only one resource type configured, the Date drop-down list is displayed after selecting the Resource Booking product integration tile: Only relevant dates according to the configuration of the Max days for booking in advance parameter are available:
resource_booking1.png resource_booking2.png resource_booking3.png
You can search by start time: You can search by a specific resource: After clicking Reserve, the following confirmation screen is displayed:
resource_booking4.png resource_booking5.png resource_booking6.png
You can view your reservations/bookings in the My Reservations tab: When selecting Cancel, the following confirmation message is displayed:
resource_booking7.png resource_booking8.png

The start time is calculated according to the selected date, time, type, and resource (if selected).

The end time is calculated according to the following logic:

  • minSlotLength from the API (the Get User’s Reservations API, the Get Available Resources API, etc.) defines the first option for End Time (see Get Available Resources API).
  • maxSlotLength from the API (the Get User’s Reservations API, the Get Available Resources API, etc.) defines the last option for End Time (see Get Available Resources API).
  • The slots between them are currently defined according to the minSlotLength. For example, if minSlotLength=30 and maxSlotLength=120 and the user selected 8:00 as the start time, the possible end times are: 8:30, 9:00, 9:30, 10:00.

Technical Overview

The following section describes technical information for the Resource Booking product integration.

Prerequisites

The following prerequisities are required for the Resource Booking product integration.

  • Resource Booking data should be sent based on the userID from IDP, so campusM userID must be mapped in the customer’s system.
  • The CMAuth userID(which is returned by a response from either SAML, OAuth or LDAP as one of the IDP attributes) must be mapped in the CMAuth integration profile (Additional Mappings). Otherwise,userID must be returned by a response as one of the LDAP attributes.
  • This attribute needs to be added as a path or query parameter. For more information, see API Configuration.
  • The parameter can be named userID or any other name.
  • Generating the Reservation ID should be done in your system.

API Information

Resource Booking product integration will use the following APIs:

Get User’s Reservations API

  • Request:
    https://{Base URL}/getUserReservations?userid={userID}
    • Base URL is the URL to retrieve as defined in the product integration configuration.
    • userID is the user identifier as defined in the Query Parameters.
    • Expected Response
      The response should be similar to the following:

      { "userReservationsList": { "Reservation": [ { "resourceType": "Circular Group", "resourceName": "Circular Group Study Pod 11", "description": "testDescription_Circular Group Study Pod 3", "startTime": "2019-12-30T09:30:15+0200", "endTime": "2019-12-30T10:00:00+0200", "reservationID": "5e0498469ae7b6433847020", "resourceID": "125", "userID": "16933" }, { "resourceType": "Circular Group", "resourceName": "Circular Group Study Pod 4", "description": "testDescription_Circular Group Study Pod 4", "startTime": "2019-12-29T07:30:00+0200", "endTime": "2019-12-29T09:00:00+0200", "reservationID": "5e0498469ae7b6433847021", "resourceID": "125", "userID": "16933" }, { "resourceType": "Circular Group", "resourceName": "Circular Group Study Pod 5", "description": "testDescription_Circular Group Study Pod 5", "startTime": "2019-12-27T19:30:00+0200", "endTime": "2019-12-27T20:00:00+0200", "reservationID": "5e0498469ae7b6433847022", "resourceID": "125", "userID": "16933" }, { "resourceType": "Circular Group", "resourceName": "Circular Group Study Pod 6", "description": "testDescription_Circular Group Study Pod 6", "startTime": "2019-12-16T09:00:00+0200", "endTime": "2019-12-16T10:00:00+0200", "reservationID": "5e0498469ae7b6433847023", "resourceID": "125", "userID": "16933" } ] } }

      Attributes Mapping
      External Field NameDescriptionMandatory Yes/NoData TypeDefaultExample
      resourceTypeResource typeNoString Conference Room
      resourceNameResource nameYesString Conference Room 1
      descriptionReservation descriptionNoString
      startTimeBooking start timeYesString according to the following format: yyyy-MM-ddTHH:mm:ss'Z'

      2019-12-29T07:30:00+0200

      endTimeBooking end timeYesString according to the following format: yyyy-MM-ddTHH:mm:ss'Z' 2019-
      reservationIDReservation IDYesString
      esrouceIDResource IDNoString
      userIDUser identifier that will match equivalent attribute on IDP (see Prerequisites).YesString

Get Available Resources API

  • Request:
    https://{ BASE_URL}/getResourceBookingAvailability?userid={userID}&date={Date}&resource={resourceCode}

    The request if an additional filter is enabled (the Enable additional filter checkbox is selected in Resource Booking configuration):

    https://{ BASE_URL}/getResourceBookingAvailability?userid={userID}&date={Date}&resource={resourceCode}%&filterTypeCode={FilterOptionCode}

    • Base URL – the URL to retrieve as defined in the product integration configuration
    • userID – the user identifier as defined in the Query Parameters
    • Date – the selected date using the following date format: yyyy-MM-ddTHH:mm:ss'Z'
    • resourceCode – the the resource code as defined in the configuration
    • filterTypeCode – according to the code defined in the Resource Booking configuration (Filter Code)
    • FilterOptionCode – according to the define code in the Resource Booking configuration (Filter Option Code) of the selected value by the user
  • Expected Response:
    The response should be similar to the following:

    {

    "slotsForResourcesList": [{

    "maxSlotLength": "120",

    "minSlotLength": "30",

    "resourceId": "10",

    "resourceName": "Presentation Pod 4",

    "slotList": [{

    "endTime": "2019-12-30T08:30:00+0200",

    "isAvailable": "true",

    "startTime": "2019-12-30T08:00:00+0200"

    },

    {

    "endTime": "2019-12-30T09:00:00+0200",

    "isAvailable": "true",

    "startTime": "2019-12-30T08:30:00+0200"

    },

    {

    "endTime": "2019-12-30T09:30:00+0200",

    "isAvailable": "true",

    "startTime": "2019-12-30T09:00:00+0200"

    }

    ]

    },

    {

    "maxSlotLength": "180",

    "minSlotLength": "60",

    "resourceId": "11",

    "resourceName": "Presentation Pod 7",

    "slotList": [{

    "endTime": "2019-12-30T09:00:00+0200",

    "isAvailable": "true",

    "startTime": "2019-12-30T08:00:00+0200"

    },

    {

    "endTime": "2019-12-30T10:00:00+0200",

    "isAvailable": "true",

    "startTime": "2019-12-30T09:00:00+0200"

    },

    {

    "endTime": "2019-12-30T11:00:00+0200",

    "isAvailable": "true",

    "startTime": "2019-12-30T10:00:00+0200"

    }

    ]

    }

    ]

    }

    Attributes Mapping
    External Field NameDescriptionMandatory Yes/NoData TypeDefaultExample
    maxSlotLengthMaximum duration of this resource in minutesYesString 120
    minSlotLengthMinimum duration of this resource in minutes (must be more than 0).YesString 30, 60
    resourceIDResource IDNoString
    resourceNameResource NameYesString
    startTimeStart timeYesString according to the following format: yyyy-MM-ddTHH:mm:ss'Z'

    2019-12-29T07:30:00+0200

    endTimeEnd timeYesString according to the following format: yyyy-MM-ddTHH:mm:ss'Z' 2019-12-29T07:30:00+0200
    isAvailableWhether the resource is available in this specific time slot. True/FalseYesString True False
    slotList should include all slots (both available and unavailable), according to the minSlotLength.

Send User’s Reservation API (POST)

  • Request:
    https://{BASE URL}/updateUserReservation
    The following is the body of the request:

    {

    "userid" : "12345",

    "resourceName": "Presentation Pod 5"

    “resourceId”:”a1234”,

    "startTime": "2019-12-30T11:00:00+0200"

    "endTime": "2019-12-30T11:30:00+0200"

    "description": "fgfdfg"

    }

    Attributes Mapping
    External Field NameDescriptionMandatory Yes/NoData TypeDefaultExample
    userid YesString Conference Room 1

    ResourceName

    Yes

    String

    Presentation Pod 5

    ResourceId

    Yes

    String

    a1234

    Description YesString
    startTime YesString according to the following format: yyyy-MM-ddTHH:mm:ss'Z'

    2019-12-29T07:30:00+0200

    endTime YesString according to the following format: yyyy-MM-ddTHH:mm:ss'Z' 2019-12-29T07:30:00+0200
  • Expected Response:
    The response should include a failure/success indication and a reservationID (should be generated in your system) in the following format:

    { "userid" : "12345", "reservationid" : "1234567", "response": "Reservation successfully added!'" //if failure: "Reservation failed" }

Cancel User’s Reservation API (POST)

  • Request:
    campusM should send the following web service:
    https://{BASE URL}/cancelUserReservation
    The following is the body of the request:

    {

    “userid": "a@google.com",

    “reservationid”: “12345”,

    }

  • Expected Response:
    The response should include a failure/success indication in the following format:

    { "userid" : "12345", "reservationid" : "1234567", "response": "Reservation successfully deleted!'" //if failure: "Reservation failed" }

    Authentication of all APIs is included in the headers (according to the product integration configuration - General Headers and/or API Authentication).

Configuration

To configure the Resource Booking product integration, select Add Product Integration from the Product Integrations main menu option and Select Resource Booking.

The following table describes the configuration options available on this page.

Configuration Option Description Mandatory Data Type Default Example
Manage Integration
Enable Product Integration Select to enable the product integration on the user's campusM app. No Checkbox Unselected
Product Integration Description A description of the product integration for internal use Yes String
Screen Title The title that appears in the top header of the service No String Resource Booking
Vendor– This section defines the structure of the APIs used in this product integration.
Vendor Name Defines to which vendor the integration connects. The resource Booking product integration is currently supported by the RESTful API (generic) vendor. Yes Drop-down list API
API Configuration This section contains the API details to define the API structure. You can test the API configuration. See Testing API Product Integration Configuration.
Base URL to retrieve the information The URL for the API Yes URL https://{HOST}
Parameter Input Option The parameter input option. Possible values: Username, Token Property, and Constant. It is sent as the path parameter . Yes Drop-Down list Token Property
Token Property Name Enter the property name to be retrieved from the token ({ USERNAME, MAIL, GIVEN_NAME, SURNAME, FULL_NAME } or as named in the integration profile) No String USERNAME
Constant Value The value when the User Identifier is set to Constant No String
Authentication Type Authentication type against the web service. The options are the following:
  • No Auth
  • Basic - username and password for Base64 basic authentication.
  • API Key - can be added to a Header or to the URL (Query Param) or both.
  • Bearer token
  • OAuth Using User App Authentication – select an OAuth integration profile (from the Integration Profiles configured in App Settings) and choose where the access token should be added, Header or URL.
  • OAUTH Using Client Credentials – select this if you are using a preliminary token call to get the access token.
No Object No Auth
Look and Feel No
Primary Theme Color Select a color for the main elements on the page No Color Picker #444444
Secondary Theme Color Select a color for the secondary elements on the page No Color Picker #6f8ea4
Text / Labels Enter replacement text for the default titles and labels No String
General
Resource Types The available resource types in your institution, for example, rooms and PCs. If you have only one available resource type, it is not necessary to fill in this field. List
Max days for booking in advance The maximum number of days that a booking can be done in advance. String
Reservation Date Format The format in which to display dates in the product integration. String DD-MMM-YYYYY
Enable additional filter checkbox Select to enable the additional filter to add an additional filter in the main Resource Booking page No Checkbox Unselected
Filter Code The code of the filter to be used in the API Yes (if filter is enabled) String LOCATION
Filter Description The description of the additional filter to be displayed in the app Yes (if filter is enabled) String Location
Filter Option Code The code of the filter’s value to be used in the API Yes (if filter is enabled) String LONDON
Filter Option Description The description of the filter’s value to be displayed in the app Yes (if filter is enabled) String London
General Error Message The general error message if the page fails to load String Please try again later
Import/ Export Configuration You can configure product integration and then export it to another campusM environment, for example, from sandbox to production or from preview to production.
Export Create a JSON file with all product integration configuration No
Import Use this option in order to load configuration from JSON of an exported product integration No