Producing outbound trouble ticket notifications using the open message bus
Summarize
Summary of Producing Outbound Trouble Ticket Notifications Using the Open Message Bus
This document outlines the process for producing outbound trouble ticket notifications from a ServiceNow instance using the open message bus. It enables customers to send notification details to their external systems, facilitating an event-driven architecture where notifications are published based on specific ticket events.
Show less
Key Features
- Supported Events: The system supports notifications for creating trouble tickets, changes in ticket state, and attribute changes.
- Topic Synchronization: The synchronization mechanism ensures that egress topics in ServiceNow are aligned with the message bus, allowing for seamless communication.
- Topic Picker Mechanism: This feature identifies relevant topics for publishing messages based on the event type.
Key Outcomes
To successfully produce outbound notifications, customers must:
- Create egress topics in the Topic [snapinotifmgmttopic] table within ServiceNow.
- Ensure the usercreated field is correctly set based on how the topics are created (manually or via API).
- Implement a business rule to trigger notifications upon specific events.
The process involves invoking a business rule, staging the event as a payload, determining compatible topics, and sending notifications to the external message bus. This workflow enhances communication between ServiceNow and external systems, allowing for efficient trouble ticket management.
Produce an outbound notification from the ServiceNow instance using the open message bus. Customers can consume the details of the notification from the message bus in their external system.
In this event-driven architecture, the notifications are produced to the open message bus from your ServiceNow instance. The framework contains topic synchronization and topic picker mechanisms. The topic synchronization mechanism synchronizes the topics that you have created in the ServiceNow instance with the open message bus. When the event occurs in the framework, the topic picker mechanism picks the relevant topic and publishes the message to the topic using a REST proxy. Customers can consume the outbound notification from the message bus in their external system.
- Create Trouble Ticket Event
- Trouble Ticket State Change Event
- Trouble Ticket Attribute Change Event
- Create Trouble Ticket Event for Case
Prerequisites
Before producing outbound notifications, it’s necessary to create the egress topics on the Topic [sn_api_notif_mgmt_topic] table in the ServiceNow instance. When you create an egress topic, the system runs a business rule and attempts to synchronize the topic to the message bus based on configuration. To learn more about manually creating a topic in the Topic table, see Create a topic. The system synchronizes only the egress topic with the message bus in the external system. The user_created field in the associated topic record is set to true.
Alternatively, you can create the topics on the message bus in your external system and push them into the Topic table in ServiceNow instance. The customers invoke the Event Management Topic Open API endpoint, which stores the topic in the Topic [sn_api_notif_mgmt_topic] table of ServiceNow instance. The user_created field in the associated topic record is set to false. To learn more about the methods that are used when processing the Event Management Topic Open API endpoint, see Event Management Topic Open API.
Workflow
- On the trigger of the trouble ticket event, the system invokes the appropriate business rule, and stamps the event type.
To learn more about the business rule that you must add to your ServiceNow instance, see Add a business rule for a new trouble ticket event.
- The system pushes the Glide snapshot and event type in the staging table, which acts as a queue.
- The producer framework picks the event and converts it to a TMF 688 complaint event payload.
To learn more about the producer framework, see Using the producer framework for outbound notifications.
- The topic picker mechanism determines the topics, which are compatible with the event type. Topic picker performs the following steps to check the compatibility of the topics:
- The System scans the topics that have the Type field set as Egress in the topic table.
- The system checks the header query and content query of all egress topics and matches the compatibility with the event payload.
- The system sends the list of compatible topics and event payload to the spoke selector.
- The spoke selector, which the customer has configured, invokes the REST step that is configured for each topic and sends to the message bus REST Proxy in the external system.
To learn more about the method for sending messages to the spoke selector, see OpenMessageBusEventPublisherOOB - Scoped and Configure the Producer Event Notification Framework to use the Open Message Bus.
- The customers can consume the message in their message bus REST Proxy.