Configure Polling Interval at Resource Level

When you enable polling for an element, you define a 'polling interval' at the instance level and select the resources that need to be polled. Now, with the help of an optional field named 'pollingIntervalInMinutes', you can configure polling interval at the resource level to call essential resources more frequently than others. This can also help reduce the number of calls made to the vendor by less important resources and avoid reaching the vendor rate limit.

How to configure polling at resource level

  1. Add the optional field 'pollingIntervalInMinutes' in the resource object of the element poller configuration structure, that is, event.poller.configuration
  2. Here is what a sample event.poller.configuration with the optional field 'pollingIntervalInMinutes' looks like:
    [
      "conversations": {
        "url": "/hubs/marketing/conversations?orderBy=updated_at desc",
        "idField": "id",
        "datesConfiguration": {
          "updatedDateField": "updated_at",
          "updatedDateFormat": "timestamp",
          "updatedDateTimezone": "GMT",
          "createdDateField": "created_at",
          "createdDateFormat": "timestamp",
          "createdDateTimezone": "GMT"
        },
        "pollingIntervalInMinutes": 2(optional)
      },
  3. When you provision an instance with polling enabled, iterate the resource object in the event.poller.configuration to identify if polling interval is defined at resource-level for any resources. In the sample shown above, the resource object for which polling interval is defined at resource level is /conversations with an interval value of 2 minutes. 
Note: When you configure polling at resource level for multiple resources, define the polling interval such that it is a multiple of the smallest value of polling intervals defined. This applies to the polling intervals defined under 'event.poller.refresh_interval' at the instance level too. For example, if the smallest value of polling interval defined in the event.poller.configuration is 2, the polling intervals defined for other resources must be multiples of 2, that is, 4, 8, 14 and so on.