Working with Events in the Developer Portal
Prerequisites for Consuming Events
-
You must first add an OPERA environment from which to consume events before adding and subscribing to events.
-
The OPERA environment must either have streaming enabled (see Streaming API) or have polling configured (see Configuring the Polling Subscription).
For information on working with business events in OPERA Cloud, refer to the Configuring Business Events topic in the OPERA Cloud User Guide. This topic also provides a list of business events and data elements.
Creating a Template of Events for an Application
The event template represents the list of events a given integration will use. When subscribing to consume events from a given OPERA environment, the template is a faster way to ensure the correct list of events is subscribed.
Before subscribing to consume events from a given OPERA environment, you must first create a template for the integration.
The template can be edited at any time. For example, your integration might change, and it now needs to consumer more events or fewer events.
Note:
Changes made on the template do not affect existing subscriptions to OPERA environments but will take effect when subscribing to new OPERA environments.
-
Open the Developer Portal and click the Applications tab.
-
Search for and click an application to open it.
-
Click the Events tab.
-
Click Add Event to Template and complete the following information:
-
Category: Select a category for the event, such as Reservation.
-
Event: Select an event for the category, such as Check In.
Note:
To remove an event from the template, click the Remove link.
-
-
Click Add to add the event to the template.
-
Repeat these steps to add additional events to the template.
Once you have configured all the events your integration requires, click the Subscribed tab and choose any OPERA environment(s) from which to consume these events.
Subscribing to Events
A partner can subscribe to business events from a customer. Subscriptions to business events are specific to each application.
-
Open the Developer Portal and click the Applications tab.
-
Search for and click an application to open it.
-
Click the Events tab.
-
Click the Subscribed tab.
-
Click the Subscribe link.
-
Select an Environment and click Subscribe.
If one or more of the events on the template are not available for the selected environment, a warning appears. If accepted, only those events available in the selected environment are subscribed.
-
As a customer subscribing to events from your environment, select which hotels will consume the events.
Note:
Only OPERA environments enabled for streaming appear in the list of environments. Events will not be subscribed if they are not available in the version of OPERA Cloud run by the selected environment.
Unsubscribing from Events
Note:
Unsubscribing from events on the Subscribe tab does not affect the events that appear on the Template tab. Also, changes made to events on the Template tab do not affect event subscriptions.
-
Open the Developer Portal and click the Applications tab.
-
Search for and click an application to open it.
-
Click the Events tab.
-
Click the Subscribed tab.
-
Under Event Subscriptions, locate the event and click the green arrow to expand it and then click Unsubscribe.
Approving Events
A customer with Developer Portal access can approve the consumption of events from a specific environment. The customer can approve a partner's request to consume events before any events are sent to the partner. This enables customers to protect their data.
-
Open the Developer Portal and click the Applications tab.
-
Search for and click an application to open it.
-
Click the Partner Applications tab.
Note:
Applications with pending event subscriptions appear with a red ribbon icon on the application card.
-
Click an application with a pending event to open it.
-
Click the Events tab.
-
Click Next to proceed with approval.
-
Select the properties for the event subscription and click Next.
-
Click Approve.
Rejecting Events
-
Open the Developer Portal and click the Applications tab.
-
Search for and click an application to open it.
-
Click the Partner Applications tab.
-
Click an application with a pending event to open it.
-
Click the Events tab.
-
Click Reject to reject the subscription.
The event status changes to ‘In Progress’ and then to ‘Rejected’ status. The partner can see this status in the Developer Portal.
Revoking Events
-
Open the Developer Portal and click the Applications tab.
-
Search for and click an application to open it.
-
Click the Partner Applications tab.
-
Click an application with a pending event to open it.
-
Click the Events tab.
-
Click Edit next to the list of hotels.
-
Deselect all the hotels.
-
Click Save.
Adding Events to Existing Subscription
-
Add the events on the Template tab (see the ‘Creating a Template of Events for an Application’ procedure above).
-
Subscribe again to consume events from the same environment (see the ‘Subscribing to Events’ procedure above).
Adding Hotels to an Existing Subscription
-
Open the customer or partner application.
-
Go to the Events tab.
-
Click Edit next to the list of hotels.
-
Select the hotels that can consume the events.
-
Click Save.
Parent topic: Streaming API (push)