API Details
  • 09 Aug 2021
  • 4 Minuten zu lesen
  • Dunkel
    Licht
  • pdf

API Details

  • Dunkel
    Licht
  • pdf

The content is currently unavailable in German. You are viewing the default English version.
Artikel-Zusammenfassung

Creating a Session

This method will create a new ScreenMeet session which is related to an object from your Service-Now instance.

Method
createSession (type, parent_object_table, parent_object_sys_id, parent_object_display_name, screenmeet_session_name, agent_prefs);

Parameters

ParameterTypeDescription
typeString (enum)This is an enum which supports 4 values: support, cobrowse, live, replay
parent_object_tableStringThe table name of the object to which this session is related, eg: incident, interaction, or any other table etc...
parent_object_sys_idStringThe sys_id of the object row from the related parent_object_table.
parent_object_display_nameStringThe human friendly display name of the object.
screenmeet_session_nameStringThe label/description for this ScreenMeet session.
agent_prefsObjectA ScreenMeetAgentPrefs object for toggling behaviors for this session.

Example Usage

var sm = new x_prois_sm.ScreenMeet();

var result = sm.createSession('support', 'incident', 'e8e875b0c0a80164009dc852b4d677d5', 'Incident INC0000005', 'Remote support session for INC0000005', {'record': true});


Example Response

The response is a JSON object which contains information about the newly created Session.

{
  "unattended": false,
  "scheduled": false,
  "id": "HUiUti",
  "type": "support",
  "label": "Remote support session for INC0008111",
  "ExternalUserId": 32593,
  "OrganizationId": 1336,
  "createdByAgentSession": {
    "sid": 2371395,
    "roles": {
      "api": true,
      "agent": true,
      "supervisor": false,
      "group_admin": true
    },
    "features": null,
    "providerExternalId": "6816f79cc0a8016401c5a33be04be441",
    "provider": "snow-universal",
    "startedAt": "2021-08-09T15:45:57.000Z",
    "expiresAt": "2021-08-09T16:45:57.000Z",
    "clientApp": "service-now-backend",
    "userAgent": "Jakarta Commons-HttpClient/3.1",
    "remoteIp": "149.96.6.12"
  },
  "userDescription": "System A",
  "updatedAt": "2021-08-09T15:46:15.084Z",
  "createdAt": "2021-08-09T15:46:15.084Z",
  "pin": 137143,
  "status": "new",
  "hostAuthToken": "lBVSLqUoIWGhnhRsMwnGInNRaXGXRGIu",
  "expiresAt": "2021-08-09T16:46:15.105Z",
  "settings": {
    "recording": true,
    "startwithadmin": false,
    "startwithrc": false,
    "knock": false,
    "audio": true
  },
  "externalSessionObjectId": "320eacfe2f713010cc3590bcf699b6ac",
  "urls": {
    "user": "https://myhelpscreen.com/137143",
    "host": "https://integration.screenmeet.com/viewer/index.html?HUiUti"
  }
}

Schedule a Session

This method will create a schedule a ScreenMeet session which is related to an object from your Service-Now instance. The session's state will switch from scheduled to new when the time is approximately 10 minutes before the session scheduled start time.

Method
scheduleSession (startTime, type, parent_object_table, parent_object_sys_id, parent_object_display_name, screenmeet_session_name, agent_prefs);

Parameters

ParameterTypeDescription
startTimeString (ISO Date)This is an ISO Formatted date string for when the session is scheduled to start. eg: 2021-08-10T15:30:00.000Z
typeString (enum)This is an enum which supports 4 values: support, cobrowse, live, replay
parent_object_tableStringThe table name of the object to which this session is related, eg: incident, interaction, or any other table etc...
parent_object_sys_idStringThe sys_id of the object row from the related parent_object_table.
parent_object_display_nameStringThe human friendly display name of the object.
screenmeet_session_nameStringThe label/description for this ScreenMeet session.
agent_prefsObjectA ScreenMeetAgentPrefs object for toggling behaviors for this session.

Example Usage

var startTime = '2022-08-10T15:30:00.000Z';

var sm = new x_prois_sm.ScreenMeet();

var result = sm.scheduleSession(startTime, 'live', 'sn_customerservice_case', '9e05ffd01b08a450409921be6e4bcbec', 'Case CS0010001', 'Scheduled snow call for CS0010001', {'record': true});

Example Response

{
  "unattended": false,
  "id": "xoKwKRBrbwRF",
  "type": "live",
  "label": "Scheduled snow call for CS0010001",
  "startTime": "2022-10-01T17:26:04.210Z",
  "userDescription": "System A",
  "ExternalUserId": 1750,
  "OrganizationId": 151,
  "createdByAgentSession": {
    "sid": 13499,
    "roles": {
      "api": true,
      "agent": true,
      "supervisor": false,
      "group_admin": true
    },
    "features": null,
    "providerExternalId": "6816f79cc0a8016401c5a33be04be441",
    "provider": "snow-universal",
    "startedAt": "2021-08-06T17:27:32.000Z",
    "expiresAt": "2021-08-06T18:27:32.000Z",
    "clientApp": "service-now-backend",
    "userAgent": "Jakarta Commons-HttpClient/3.1",
    "remoteIp": "199.91.140.12"
  },
  "status": "scheduled",
  "scheduled": true,
  "updatedAt": "2021-08-06T17:55:14.562Z",
  "createdAt": "2021-08-06T17:55:14.562Z",
  "pin": 0,
  "hostAuthToken": "ncVGyYNADPfpOXPgVFnxRqMNofAdDWcs",
  "expiresAt": "2022-10-01T18:26:04.210Z",
  "settings": {
    "recording": true,
    "startwithadmin": false,
    "startwithrc": false,
    "knock": false,
    "audio": true
  },
  "externalSessionObjectId": "0bce2db1db753810d10fd1d3ca961938",
  "urls": {
    "user": "https://sm-live-qa.screenmeet.com/?xoKwKRBrbwRF",
    "host": "https://sm-live-qa.screenmeet.com/?xoKwKRBrbwRF#host=UmUQuPOQApnKmHVztyuDbxIARzTJTvbH"
  }
}

Reschedule a Session

This method allows you to update the start time for a session that is in a scheduled state.

Method

rescheduleSession (ScreenMeetSessionId, startTime)

Parameters

ParameterTypeDescription
ScreenMeetSessionIdStringThe alpha-numeric ScreenMeet session ID for the session you wish to reschedule.
startTimeString (ISO Date)The new desired start time for this session. This is an ISO Formatted date string for when the session is scheduled to start. eg: 2021-08-10T15:30:00.000Z

Example Usage

var sm = new x_prois_sm.ScreenMeet();

var result = sm.rescheduleSession('xoKwKRBrbwRF', '2021-10-01T17:30:00.000Z');

Example Response

The response will be a ScreenMeetSession object with the same structure as the response to scheduleSession.

Close a Session

This method will close a session. Its state will change to closed and users will no longer be able to connect to it. If the session's status is currently active (users are connected), then the session will be ended and all users will be disconnected.

Method

closeSession (ScreenMeetSessionId)

Parameters

ParameterTypeDescription
ScreenMeetSessionIdStringThe alpha-numeric ScreenMeet session ID for the session you wish to reschedule.

Example Usage

var sm = new x_prois_sm.ScreenMeet();

var result = sm.closeSession('xoKwKRBrbwRF');

Example Response

The response will be a simple {"success" : true} JSON object if there are no errors.

Agent Preferences Object

The agent preferences object is a set of options that can be set for a session. They will modify some behaviors of the session, such as starting the session with recording on, or other behaviors. Different session types have different preferences that apply to them. Also, not all preferences may be available for agents to set depending on your organizations configuration. For example, if recording is set to always be on, then the users won't have the option to toggle it on or off before a session starts. The following table illustrates the support for the various option by session type. If an option is not supported by a given session type, it will be ignored. If options are omitted, they are treated as "false".

Option
Description
support
live
cobrowsereplay
recordWhether this session should be recordedyesyesyesno
prerequestrc
Will start the remote support client with remote control permission requested automatically on startyesnonono
prerequestadmin
Will start the remote support client with administrator level execution permission requested automatically on startyesnonono
knockWill start the live session with knock-to-join mode on by default, requiring the host to explicitly allow entry into the room for each attendee(only applies if knock is configured as "agent decides")noyesnono
audioWill start the live session with audio enabled (only applies if audio is configured as "agent decides")noyesnono

Example Preference Objects


//Support session preferences
var supportSessionPrefs = {
  "record" : true,
  "prerequestrc" : true,
  "prerequestadmin" : false 
}

//Live session preferences
var liveSessionPrefs = {
  "record" : true,
  "audio" : true,
  "knock" : true
}

//Cobrowse session preferences
var liveSessionPrefs = {
  "record" : false
}

War dieser Artikel hilfreich?

What's Next