---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# OCSeriesEventGenerator - Global

# OCSeriesEventGenerator - Global {#ariaid-title1}

The OCSeriesEventGenerator script include provide methods to generate the repeating VEVENTS for a user's iCalendar.

## OCSeriesEventGenerator - getMemberCalendar (String groupId, String rotaId, String userId,
Object dateRangeObj, Object memberSchedules, String calendarLink) {#ariaid-title2}

Returns an array of the repeating on-call events.
{#r_OCSerEvtGen-getMemberCal_S_O_O_S__table_ghj_tq3_hx__entry__3}

| Name | Type | Description |
|-|-|-|
| groupId | String | The group sys id. |
| rotaId | String | The rota sys id. |
| userId | String | The user sys id. |
| dateRangeObj | Object | Contains the from and to dates for the data set. |
| memberSchedules | Object | The user's schedule. |
| calendarLink | String | A link back to the on-call calendar in the instance. |
[Table 1. Parameters]

{#r_OCSerEvtGen-getMemberCal_S_O_O_S__table_ghj_tq3_hx} {#r_OCSerEvtGen-getMemberCal_S_O_O_S__table_hhj_tq3_hx__entry__2}

| Type | Description |
|-|-|
| Array | Array of the repeating on-call events. |
[Table 2. Returns]

{#r_OCSerEvtGen-getMemberCal_S_O_O_S__table_hhj_tq3_hx}

## OCSeriesEventGenerator - getRosterICalEvents (GlideRecord rotaScheduleSpanGR, GlideRecord
memberScheduleSpanGR, Array seriesStartTimes, Object excludeItems, String repeatUntil, String
timeZone, String calendarLink) {#ariaid-title3}

Returns an array of VEVENTs that represent the on-call for the provided
rotaScheduleSpanGR and the memberScheduleSpanGR.
{#r_OCSerEvtGen-gtRICE_G_GR_A_O_S_S_S__table_as5_ks3_hx__entry__3}

| Name | Type | Description |
|-|-|-|
| rotaScheduleSpanGR | GlideRecord | A cmn_schedule_span glide record for a rota. |
| memberScheduleSpanGR | GlideRecord | A cmn_schedule_span glide record for a rota member. |
| seriesStartTimes | Array | An array of the repeating rota span start times. |
| excludeItems | Object | The schedule items that need to be excluded. |
| repeatUntil | String | A formatted ScheduleDateTime string. |
| timeZone | String | Time zone for the on-call rota. |
| calendarLink | String | A link to the on-call calendar for this user. |
[Table 3. Parameters]

{#r_OCSerEvtGen-gtRICE_G_GR_A_O_S_S_S__table_as5_ks3_hx} {#r_OCSerEvtGen-gtRICE_G_GR_A_O_S_S_S__table_bs5_ks3_hx__entry__2}

| Type | Description |
|-|-|
| Array | An array of VEVENTs that represent the on-call for the provided rotaScheduleSpanGR and the memberScheduleSpanGR. |
[Table 4. Returns]

{#r_OCSerEvtGen-gtRICE_G_GR_A_O_S_S_S__table_bs5_ks3_hx}

## OCSeriesEventGenerator - getRosterMemberEvents (GlideRecord rotaMemberGR, Array
seriesStartTimes, Object excludeItems, String repeatUntil, String calendarLink) {#ariaid-title4}

Returns an array of the repeating on-call VEVENTS.
{#r_OCSerEvtGen-gtRosMemEv_GR_A_O_S_S__table_lg3_wr3_hx__entry__3}

| Name | Type | Description |
|-|-|-|
| rotaMemberGR | GlideRecord | A cmn_rota_member record. |
| seriesStartTimes | Array | An array of the repeating rota span start times. |
| excludeItems | Object | The schedule items that need to be excluded. |
| repeatUntil | String | A formatted ScheduleDateTime string. |
| calendarLink | String | A link to the on-call calendar for this user. |
[Table 5. Parameters]

{#r_OCSerEvtGen-gtRosMemEv_GR_A_O_S_S__table_lg3_wr3_hx} {#r_OCSerEvtGen-gtRosMemEv_GR_A_O_S_S__table_mg3_wr3_hx__entry__2}

| Type | Description |
|-|-|
| Array | An array of the repeating on-call VEVENTS |
[Table 6. Returns]

{#r_OCSerEvtGen-gtRosMemEv_GR_A_O_S_S__table_mg3_wr3_hx}

