{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":1081,"path":"api-reference/server-api-reference/c_OCSeriesEventGeneratorAPI.md","title":"OCSeriesEventGenerator - Global","bundle":null,"doc_type":null,"release":"australia","body":"\n# OCSeriesEventGenerator- Global\n\nThe OCSeriesEventGenerator script include provide methods to generate the repeating VEVENTS for a user's iCalendar.\n\n**Parent Topic:**[Server API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/api-server.md)\n\n## OCSeriesEventGenerator - getMemberCalendar \\(String groupId, String rotaId, String userId, Object dateRangeObj, Object memberSchedules, String calendarLink\\)\n\nReturns an array of the repeating on-call events.\n\n|Name|Type|Description|\n|----|----|-----------|\n|groupId|String|The group sys id.|\n|rotaId|String|The rota sys id.|\n|userId|String|The user sys id.|\n|dateRangeObj|Object|Contains the from and to dates for the data set.|\n|memberSchedules|Object|The user's schedule.|\n|calendarLink|String|A link back to the on-call calendar in the instance.|\n\n|Type|Description|\n|----|-----------|\n|Array|Array of the repeating on-call events.|\n\n## OCSeriesEventGenerator - getRosterICalEvents \\(GlideRecord rotaScheduleSpanGR, GlideRecord memberScheduleSpanGR, Array seriesStartTimes, Object excludeItems, String repeatUntil, String timeZone, String calendarLink\\)\n\nReturns an array of VEVENTs that represent the on-call for the provided rotaScheduleSpanGR and the memberScheduleSpanGR.\n\n|Name|Type|Description|\n|----|----|-----------|\n|rotaScheduleSpanGR|GlideRecord|A cmn\\_schedule\\_span glide record for a rota.|\n|memberScheduleSpanGR|GlideRecord|A cmn\\_schedule\\_span glide record for a rota member.|\n|seriesStartTimes|Array|An array of the repeating rota span start times.|\n|excludeItems|Object|The schedule items that need to be excluded.|\n|repeatUntil|String|A formatted ScheduleDateTime string.|\n|timeZone|String|Time zone for the on-call rota.|\n|calendarLink|String|A link to the on-call calendar for this user.|\n\n|Type|Description|\n|----|-----------|\n|Array|An array of VEVENTs that represent the on-call for the provided rotaScheduleSpanGR and the memberScheduleSpanGR.|\n\n## OCSeriesEventGenerator - getRosterMemberEvents \\(GlideRecord rotaMemberGR, Array seriesStartTimes, Object excludeItems, String repeatUntil, String calendarLink\\)\n\nReturns an array of the repeating on-call VEVENTS.\n\n|Name|Type|Description|\n|----|----|-----------|\n|rotaMemberGR|GlideRecord|A cmn\\_rota\\_member record.|\n|seriesStartTimes|Array|An array of the repeating rota span start times.|\n|excludeItems|Object|The schedule items that need to be excluded.|\n|repeatUntil|String|A formatted ScheduleDateTime string.|\n|calendarLink|String|A link to the on-call calendar for this user.|\n\n|Type|Description|\n|----|-----------|\n|Array|An array of the repeating on-call VEVENTS|\n\n"}}