Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Calendar Manager node is used to manage the calendar events in the existing calendars.

Calendar Manager Node

The Calendar Manager node can be used to Create, Find, List, Remove, or Change calendar events.

Calendar - Select the calendar, you want to manage, from the dropdown.

Action - You can choose the below from the dropdown.

Create - Create a calendar event.

Find - Find a calendar event.

List - List all the calendar events based on a criteria

Remove - Delete a calendar event from the calendar.

Change - Update a calendar event.

Default Timezone - If the event doesn't have a timezone, it will default to US/Eastern.

Create an event

As a voice experience developer, you can create an event using the Calendar manager node.

Calendar - Select your calendar. (Project specific or Global)

Action - Create Event.

Example of Create payload.

{
    "title": "Sample_Event",
    "description": "Sample Event Description",
    "isAllDay": false, // Boolean
    // if isAllDay is true, Start date and end date are not necessary.
    "startDate": "2019-12-30T20:05:25.000Z", // if isAllDay is false
    "endDate": "2019-12-30T20:10:25.000Z", // if isAllDay is false
    "duration": 60,
    "createdBy": "5cf91e4a37e124a030877808",
    "participants": [
        {
            "user": "5d0cb15e58fdf56d009c490d",
            "token": "AnyUniqueToken"
        },
        {
            "user": "5cf91e4a37e124a030877808", 
            "token": "AnyUniqueToken"
        }
    ],
    "frequency": {
        "patterns": {
            "recurrenceType": "daily", // none, daily, weekly, yearly.
            "interval": 1
        },
        "range": {
            "startDate": "2019-12-30T15:05:25.000Z",
            // You have to use either occurenceCount or endDate.
            "occurrencesCount": 1, // the number of times you want the event to recur.
            // "endDate":"2019-12-30T15:15:25.000Z", 
        }
    }
   }

Find an event

You can find the calendar event ID in the output payload of the calendar manager node at msg.data.calendarData._id
You can use that calendar event ID to find the event.

{
"id": "5e09fa7f532bb6007859bfcb"
}

List events

Example of List payload.

{
"fromDate":"2017-07-05",
"fromTime": "19:20",
"toDate": "2017-07-05",
"toTime": "19:20",
"attributes":{"label": "notelabel-1,test" },
"user": "5953eb01bc64b00f3445c2c9",
"participants":"5953eb01bc64b00f3445c2c9"
}

Attributes have 2 properties: text and label which are given by a comma separator.

List Events - This will list all the events in a 'participant's' calendar, which are created by 'user', within the time frame given.

Example of Get/Remove payload.

{
"id": "5e09fa7f532bb6007859bfcb"
}

The above code can be used to Find or Remove the details of a specific event if you already know the Event ID.

currentUserId should be an inpu

Related Articles

  • No labels