{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":860,"path":"api-reference/server-api-reference/OpenMsgBusEvtPubScopedAPI.md","title":"OpenMessageBusEventPublisherOOB - Scoped","bundle":null,"doc_type":null,"release":"australia","body":"\n# OpenMessageBusEventPublisherOOB- Scoped\n\nThe OpenMessageBusEventPublisherOOB script include provides a method for sending messages to the spoke selector, which sends the messages to the configured REST proxy.\n\nThis script includes runs in the `sn_api_notif_mgmt` namespace. The admin role is required to access this script include.\n\nFor additional information on how to configure your instance to use this script include, see [Configure the Producer Event Notification Framework to use the Open Message Bus](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/developer-guides/prod_evt_not-dev_gd-cfg_open_bus.md).\n\n**Parent Topic:**[Server API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/api-server.md)\n\n## OpenMessageBusEventPublisherOOB - publishMessageToComptibleRestProxy\\(Object tmfEventPayload, Array compatibleTopicArr\\)\n\nSends the passed message to a custom message platform's REST proxy using the spoke selector.\n\nFor additional information on this process, see [Outbound trouble ticket notifications via open message bus](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/proactive-service-exp-workflows/trouble-ticket-workflow-using-pub-sub-model.md). For information on how to implement this method, see [Configure the Producer Event Notification Framework to use the Open Message Bus](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/developer-guides/prod_evt_not-dev_gd-cfg_open_bus.md).\n\n<table id=\"table_vhg_zzf_zzb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ntmfEventPayload\n\n</td><td>\n\nObject\n\n</td><td>\n\nEvent message to send. For additional information on the format, see [TMF688 Event Management API User Guide v4.0.0](https://www.tmforum.org/resources/standard/tmf688-event-management-api-user-guide-v4-0-0/).Format: TMF688\n\n</td></tr><tr><td>\n\ncompatibleTopicArr\n\n</td><td>\n\nArray\n\n</td><td>\n\nList of topic record sys\\_ids for which the passed event payload should be published.Table: Topic \\[sn\\_api\\_notif\\_mgmt\\_topic\\]\n\n</td></tr></tbody>\n</table>|Type|Description|\n|----|-----------|\n|None| |\n\nThe following code example shows how to call this method.\n\n```\n publishEventToOpenMessageBus: function(tmfEventPayload) {\n  // Fetch compatible topics\n  var compatibleTopicArr = new TopicPickerUtils00B().fetchEventCompatibleTopic(tmfEventPayload);\n  // Publish event in topic through REST proxy \n  new OpenMessageBusEventPublisherOOB().publishMessageToComptibleRestProxy(tmfEventPayload, compatibleTopicArr);\n},\n```\n\n"}}