Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

Table of Contents

Calendar Manager Node

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

...

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.

...

Code Block
{
    "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", 
        }
    }
   }
Warning

Remove the comments before copying the code to the Calendar Manager node.

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.

...

Code Block
{
"id": "5e09fa7f532bb6007859bfcb"
}

List events

You can list all the events based on criteria such as events within a specific time frame, events of a user, events of a participant and so on.

...

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

Change event

You can update a calendar event using the change event action.

...

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

...

Example of Change payload for a non-recurring event.

Code Block
{
    "calendarId": "5e04abe99c052408e3618b3f",
    "title": "Sample non recurring event",
    "description": "Sample description",
    "startDate": "2020-01-18T16:44:00.000Z",
    "endDate": "2020-01-18T17:44:00.000Z",
    "frequency": {
        "patterns": {
            "recurrenceType": "none" // none, daily, weekly, yearly.
        },
        "range": {}
    },
    "isDeleted": false,
    "createdBy": "5cf91e4a37e124a030877808", // user ID
    "id": "5cf91e4a37e124a030877808", // Event ID
    "base": {
        "startDate": "2020-01-18T16:10:00.000Z" // this should not be changed
    },
    "duration": 60,
    "offset": {
        "created": -300
    },
    "isParent": false
}
Warning

Remove the comments before copying the code to the Calendar Manager node.

Example of Change payload for a recurring event.

Code Block
{
    "calendarId": "5e04abe99c052408e3618b3f",
    "title": "Sample recurring event",
    "description": "Sample description",
    "startDate": "2020-01-17T15:34:00.000Z",
    "endDate": "2020-01-17T16:34:00.000Z",
    "frequency": {
        "patterns": {
            "recurrenceType": "daily", // none, daily, weekly, yearly.
            "interval": 1
        },
        "range": {
            "occurrencesCount": 2, // the number of times you want the event to recur.
            "endDate": null,
            "startDate": "2020-01-17T15:34:00.000Z"
        }
    },
    "isDeleted": false,
    "createdBy": "5cf91e4a37e124a030877808",
    "ancestorId": "5e0ebd59a7ea9c13cb13d0bc", // Event ID
    "base": {
        "startDate": "2020-01-17T15:34:00.000Z" // This should not be changed
    },
    "duration": 60,
    "offset": {
        "created": -300
    },
    "isParent": true,
    "isAncestorEvent": false,
    "updateOption": "ALL" // ONLY, FOLLOWING, ALL
}
Warning

Remove the comments before copying the code to the Calendar Manager node.

When the recurring option is changed, updateOption should be set as ALL.
When the updateOption is set as ALL, the isAncestorEvent should be set false and the isParent should be set as true.

Delete an event

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

...

The Calendar Manager node expects a currentUserId.

Related Articles

Filter by label (Content by label)
showLabelsfalse
max5
showSpacefalse
cqllabel = "experience-manager"