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.
- Click Add Filter.
- Select one or more Data Elements. IMPORTANT: You will receive a Business Event notification only when the selected Data Elements change. A maximum of 50 filters can be configured per event subscription; this reflects the current system behavior and may change in future releases.
- Click Next to Add Condition (This is not mandatory, you can click Next.)
- Choose a Data Element and then select an Operator (for example, =, !=, LIKE, NOT LIKE, IN, NOT IN, BETWEEN, <=, IS NULL, IS NOT NULL). IMPORTANT: You will receive a Business Event notification only when the selected Data Element matches the condition specified. Note that different properties (even within the same chain) can have different values for configuration items, such as room types.
- Enter Value 1 (and Value 2 if applicable) up to 500 characters.
- Continue adding conditions as needed.
- Use operators AND or OR to combine multiple conditions.
- Reorder conditions using drag-and-drop.
- Condition Display Flag:
- When a condition is added to an event, a Conditions Set flag appears on the event row in the Subscriptions page, indicating that a condition exists.
- If you edit the event and remove all conditions, the Conditions Set flag no longer appears.
- This allows you to quickly identify which events have conditions applied without opening each event individually.
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.
- If the application needs to forward or publish Business Events to external integrations, a Publisher must be configured in OPERA Cloud. Without a Publisher configuration, the application can receive streamed events but cannot forward them to external integrations.
Disaster Recovery for Event Streaming
- New subscriptions — Any new event subscription you create automatically uses disaster recovery support. No additional setup or configuration is required.
- Existing subscriptions — Existing event
subscriptions continue to work without interruption. To enable
disaster recovery support, you must recreate the subscription by
unsubscribing from all events in the environment and subscribing
again. If applicable, the Developer Portal displays an
information notification on the event subscription indicating
that the subscription does not support disaster recovery and
must be recreated.
Note:
The OPERA environment region shown in the user interface remains unchanged. Enabling disaster recovery does not move your OPERA environment and does not impact event consumption unless you choose to recreate the subscription.
Viewing Connection Status for Subscribed Events
Table 13-1 Status Indicators
| Status Indicator Dot | Meaning |
|---|---|
| Green | The application is actively connected to the environment. |
| Amber | No active connection for 30 minutes. |
| Red | No active connection for 1 hour. |
| (no dot) | The subscription is pending approval, in progress, or not connected to streaming. |
Example Scenarios
- The existing subscription is inactive for more than or equal to 1 hour - A Red dot appears. An email alert is sent.
- Connect an inactive subscription - Dot changes to green.
- First-time subscription - Dot is green immediately after connecting.
- The Customer subscription is without a streaming connection - Green initially, amber after 30 minutes, and red after 1 hour. An email alert is sent.
- The Partner subscription is pending approval - No dot until approved and then green. The dot turns amber after 30 minutes inactive and then red after 1 hour. An email alert is sent.
- Error states - In Progress shows no dot; Error shows dot matching last known state.
- Resubscription - Keeps existing dot until connection changes; green when approved.
- Rejected pending approval - No dot during approval; returns to previous dot color after rejection.
- Partner sandbox subscription - Green when connected; amber after 30 minutes inactive; and red after 1 hour inactive. An email alert is sent only if the Streaming Connection Alerts checkbox is selected.
Streaming Connection Alerts
How It Works
- When a stream becomes inactive for 1 hour (red dot), an email alert is sent to the registered application email.
- Alerts repeat every 1 hour until the connection is restored.
- Partner sandbox environments: Alerts are sent only if the "Streaming Connection Alerts" checkbox is selected in the Developer Portal.
- Non-sandbox environments: Alerts are always sent by default.
- Amber status (30 minutes inactive) does not trigger an alert.
- Go to the Developer Portal and select Applications, select Events, and then select the Subscribed tab.
- If the environment is a partner sandbox, you will see a checkbox labeled Streaming Connection Alerts.
- The Streaming Connection Alerts checkbox is selected by default, meaning alerts are automatically enabled.
- To disable alerts for that sandbox environment, deselect Streaming Connection Alerts.
Note:
- Ensure the email address registered with the application is correct and actively monitored.
- Alerts are only delivered to the registered email; incorrect or inactive addresses will prevent you from receiving notifications.
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)