Retry Handler Framework
Summarize
Summary of Retry Handler Framework
The Retry Handler Framework, released in the Yokohama version and updated January 30, 2025, is designed to automatically retry failed HTTP requests when API rate limits are exceeded, specifically handling the HTTP 429 Too Many Requests status code. It uses theretry-afterHTTP header to determine when to retry the request. This framework is available as part of the Microsoft Exchange Online Spoke or the Journey Accelerator app on the ServiceNow Store.
Show less
Spoke Requirements and Installation
- The Retry Handler Framework is included only within the Microsoft Exchange Online Spoke or the Journey Accelerator app.
- To use the framework, customers must install the Journey Accelerator app or Microsoft Exchange Online Spoke from the ServiceNow Store.
Spoke Flows
The framework provides sample flows demonstrating automation of Journey Accelerator tasks. Customers can customize these flows by copying them into a new application scope. Key sample flows include:
- Renew Subscriptions: Retrieves and renews subscription records approaching expiration, excluding those marked as Being Deleted.
- Clean up Queue Records: Removes records from the Request Retry Queue based on state, execution status, and last update time.
- Scheduled Job: Processes records in the Request Retry Queue table to manage retries.
Spoke Subflows
The framework also offers sample subflows for detailed task automation related to Microsoft Exchange Online and Journey Accelerator. These can be customized by copying into a new application scope. Important subflows include:
- Calendar Synchronization: Syncs events from Exchange Online Calendar Events Transformed Data table to Microsoft Exchange Online Events table, creating subscriptions as needed. Requires pre-populated data in the transformed data table.
- Create or Update Subscription Record: Checks for existing subscriptions and updates or creates them accordingly in Microsoft Exchange Online.
- Delete Calendar Scheduling Event: Deletes specified events and all associated records, including attendees and attachments.
- Event Lifecycle Management: Updates event, attendee, and subscription relationship records based on event details.
- Look up and Update Attachments to Event Record: Retrieves and updates event attachments from Exchange Online.
- Look up and Update Calendar Scheduling Change: Updates event details and manages subscriptions accordingly; deletes local records if the event no longer exists online.
- Recreate Removed Subscription: Recreates webhook subscriptions based on stored subscription records.
- Renew Subscription: Renews webhook subscriptions when needed based on input parameters.
- Subscription Lifecycle Management: Manages webhook subscription creation and associated event and attendee records.
- Sync up Events: Synchronizes calendar views with the Exchange Online Calendar Events Transformed Data table to handle missed lifecycle notifications. Requires updated transformed data table prior to use.
- Update Calendar Scheduling Event: Updates event properties and associated records in Microsoft Exchange Online.
Note: Certain subflows such as Look up Calendar Details, Look up Event Details, and Renew Subscription are hidden from the subflow picker to streamline usage.
Practical Benefits for ServiceNow Customers
By leveraging the Retry Handler Framework, customers can effectively handle API rate limiting scenarios by automating retries, reducing manual intervention. The included flows and subflows simplify management of subscriptions, calendar events, and related data synchronization with Microsoft Exchange Online. This enables smoother integration, consistent data updates, and reduces errors related to API limits or missing webhook subscriptions.
Framework that retries a failed HTTP request when the API rate limits are exceeded and the 429 Too Many Requests status code is returned. The retry-after time HTTP header is used to retry the request again after that specified retry-after time.
Request apps on the Store
Visit the ServiceNow Store website to view all the available apps and for information about submitting requests to the store. For cumulative release notes information for all released apps, see the ServiceNow Store version history release notes.
Spoke requirements
- Install Journey Accelerator app
- Microsoft Exchange Online spoke
Spoke flows
The Retry Handler Framework provides sample flows to demonstrate automating the Journey Accelerator tasks. To customize a sample flow, copy it to a new application scope. Available sample flows include:
| Flow | Description |
|---|---|
| Renew Subscriptions | Retrieves all the subscription records and renews the subscriptions that are about to
expire. Note: Subscriptions that have Being Deleted as status, will not be considered for
renewal. |
| Clean up Queue Records | Removes the records from Request Retry Queue based on state, execution status, and last updated time. |
| Scheduled Job | Processes records from the Request Retry Queue table. |
Spoke subflows
The Retry Handler Framework provides sample subflows to demonstrate automating Journey Accelerator tasks. To customize a sample subflow, copy it to a new application scope. Available sample subflows include:
| Subflow | Description |
|---|---|
| Calendar Synchronization | Retrieves the events from Exchange Online Calendar Events Transformed Data table and
updates the events in Microsoft Exchange Online Events table. Checks if a valid
subscription exists. Creates a subscription if the subscription does not exist. Note: You
must update the required details in the Exchange Online Calendar Events Transformed Data
table before synchronizing events data. |
| Create or Update Subscription Record | Checks if a subscription with the specified details exists in Microsoft Exchange Online. If the subscription exists, then the subscription record is updated. Otherwise, a subscription is created in Microsoft Exchange Online and an associated record is created. |
| Delete Calendar Scheduling Event | Deletes the specified event in Microsoft Exchange Online and the associated record from events tables, attachments, records from event attendees and event to subscription m2m tables. |
| Event Lifecycle Management | Retrieves the event details and updates the record details of the event, attendees, and event to subscription m2m tables. |
| Look up and Update Attachments to Event Record | Retrieves the specified event's attachments from Microsoft Exchange Online and updates the retrieved details to the specified event's record. |
| Look up and Update Calendar Scheduling Change | Retrieves the event details from Microsoft Exchange Online and updates the details to the specified event's record. If a subscription already does not exist, this subflow creates a subscription and links it with the event record. If an event does not exist in Microsoft Exchange Online, all the related local records are deleted. |
| Look up Calendar Details | Retrieves the calendar details. Note: This subflow cannot be reused as it is a part of
the Event Lifecycle Management subflow. |
| Look up Event Details | Retrieves the event details. Note: This subflow cannot be reused as it is a part of
the Update Calendar Scheduling Event subflow. |
| Recreate Removed Subscription | Recreates a removed webhook subscription using the details from the associated subscription record. |
| Renew Subscription | Renews a webhook subscription if a renewal is required based on the specified inputs. |
| Subscription Lifecycle Management | Demonstrates the process of subscription management for webhook subscriptions. This subflow creates an event and checks if a webhook subscription exists. If a webhook subscription does not exist, the subflow creates a webhook subscription, event, attendees, event to subscription m2m table records. |
| Sync up Events | Syncs the calendar view with the Exchange Online Calendar Events Transformed Data
table. Use this subflow to manage missed life-cycle notifications for
subscriptions. Note: You must update the Exchange Online Calendar Events Transformed Data
table with the required information before syncing events data. |
| Update Calendar Scheduling Event | Updates the properties of an event object in Microsoft Exchange Online and the associated records in the events table. |