How to configure Appointment Booking for custom table from portalAppointment Booking from portal Install Appointment Booking plugin (ID : com.snc.appointment_booking) Step#1: Catalog Item Appointment booking is supported for task extended tables. A task record has to be created before any appointment record. Task records will be created by the record producers. You can use any Record Producer of your choice / create a new record producer. (Refer: Catalog Information -> Catalog item). Make sure you use proper variables for generating task record. Note that we use this catalog item in our Step#3 while creating Appointment Booking Service Configuration. In order to get Appointment Booking widget inside the catalog item, add “sn_appointment_variable_set” as a variable set. Step#2: (Create Appointment Booking Configuration) Navigate to Appointment Booking -> Appointment Booking Configuration Click on NEW button and create the following Configuration (I’m using CHANGE REQUEST Table in this example) "Availability Method" represents the method with which the slots are determined. This has 2 choices. They are : 1. Number of appointments per slot 2. Scripted (Make sure the scripted method returns JSON in this format) { "success": true, "data": [ { "start_date": "2020-12-17 13:00:00", "end_date": "2020-12-17 15:00:00", "start_date_display": "13:00", "end_date_display": "15:00", "start_dateUTC": "2020-12-17 21:00:00", "end_dateUTC": "2020-12-17 23:00:00", "available": false }, { "start_date": "2020-12-17 15:00:00", "end_date": "2020-12-17 17:00:00", "start_date_display": "15:00", "end_date_display": "17:00", "start_dateUTC": "2020-12-17 23:00:00", "end_dateUTC": "2020-12-18 01:00:00", "available": true }, ], "hasMore": false, "noApptAvailable": false, "timeZone": "America/Los_Angeles", "timeZoneDisplayValue": "America/Los_Angeles", "errorCode": "", "msgType": "success" } Step#3: (Create Appointment Booking Service Configuration) From the above Configuration, Click on New Button. And fill in the form with something like shown below: Note that Catalog item mentioned in step#1 is filled here. Step#4: Create a Variable for User contact field Notice in Step#3 we are setting “Requested by” as “User Contact". This signifies about who requested appointment. This variable can change as per the task table. For change request, setup the fields as: Type: Reference Catalog Item : (Given in #3 – changeRequestCatalog) Mandatory: True Active: True Question: Requested by Name: requested_by Reference: User [sys_user] User reference qualifier : simple This can change to ‘caller_id’ for incident table, ‘caller’ for wm_order table etc., This varies based on the business requirement. Also, please not that only sys_user reference columns are supported for this. Step#5: Navigate to record producer and click on Tryout/Preview item Upon submitting, a new change request record will be created. In order to get a new record in ‘Appointment booking (sn_apptmnt_booking_appointment_booking)' table, a script needs to be added in a before business rule, on the insert of task table listed in the record producer. Here, it will be a before business rule on insert of change request table. This script should contain code for creating a new Appointment record. For example, we can use the below script, which only creates appointment record, shall customize the code based on the requirement, with additional availability checks. var sn_appointment = current.variables.sn_appointment; var helper = new sn_apptmnt_booking.AppointmentBooking_Factory().getWrapperType(sn_apptmnt_booking.AppointmentBookingConstants.APPOINTMENT_BOOKING_IMPL); var sn_appointmentJSON = JSON.parse(sn_appointment); // creating an appointment <br> var appointmentId = helper.submitAppointmentFromPortal(sn_appointment, current, sn_appointmentJSON.config.opened_for, sn_appointmentJSON.config.location, current.short_description); Also, we can use flow designer instead of business rules. For further reference, check ‘Create Appointment’ business rule on ‘wm_order’ table. On successful addition of Business rule / flow, appointment record will be created.