Resource Booking
Overview
Vendors
User Experience
The following section describes information relating to the user experience for the Resource Booking product integration.
User Activities
Authentication
Offline Support
Main Workflows and Screenshots
- 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: |
You can search by start time: | You can search by a specific resource: | After clicking Reserve, the following confirmation screen is displayed: |
You can view your reservations/bookings in the My Reservations tab: | When selecting Cancel, the following confirmation message is displayed: | |
- 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
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
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 Name Description Mandatory Yes/No Data Type Default Example resourceType Resource type No String Conference Room resourceName Resource name Yes String Conference Room 1 description Reservation description No String startTime Booking start time Yes String according to the following format:
yyyy-MM-ddTHH:mm:ss'Z'2019-12-29T07:30:00+0200
endTime Booking end time Yes String according to the following format:
yyyy-MM-ddTHH:mm:ss'Z'2019- reservationID Reservation ID Yes String esrouceID Resource ID No String userID User identifier that will match equivalent attribute on IDP (see Prerequisites). Yes String
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 Name Description Mandatory Yes/No Data Type Default Example maxSlotLength Maximum duration of this resource in minutes Yes String 120 minSlotLength Minimum duration of this resource in minutes (must be more than 0). Yes String 30, 60 resourceID Resource ID No String resourceName Resource Name Yes String startTime Start time Yes String according to the following format:
yyyy-MM-ddTHH:mm:ss'Z'2019-12-29T07:30:00+0200
endTime End time Yes String according to the following format:
yyyy-MM-ddTHH:mm:ss'Z'2019-12-29T07:30:00+0200 isAvailable Whether the resource is available in this specific time slot. True/False Yes String True
FalseslotList should include all slots (both available and unavailable), according to the minSlotLength.
Send User’s Reservation API (POST)
- Request:
https://{BASE URL}/updateUserReservationThe 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 Name Description Mandatory Yes/No Data Type Default Example userid Yes String Conference Room 1 ResourceName
Yes
String
Presentation Pod 5
ResourceId
Yes
String
a1234
Description Yes String startTime Yes String according to the following format:
yyyy-MM-ddTHH:mm:ss'Z'2019-12-29T07:30:00+0200
endTime Yes String 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}/cancelUserReservationThe 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
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 | 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 |