4 Create Event with Function Space

Business Context

The Events feature is designed to manage any kind of catering activity. Events can be as simple as a one-hour reception or more complex, such as a three-day business meeting with meals, breaks, and specific meeting rooms with setup and resource requirements. Any group function can be an event.

The below functional diagram explains the typical use cases for creating a new event.

Customer — The meeting manager is planning an off-site meeting for a group of VIP executives.

Partner — The partner is checking with the chosen property about meeting space availability for the selected dates.

OPERA Cloud — The application checks and returns availability request and response, creates the event, adds the details, and returns the final event detailed.

Figure 4-1 Typical use cases for creating a new event


This image shows the typical use cases for creating a new event.

Prerequisites

Table 4-1 Required Software Tools

Tool Description Links

Postman

Postman is an API Platform that allows you to design, create and test API's.

Use Postman to send API requests or to use the Postman collections provided.

Using the Oracle Hospitality APIs

Tool

Table 4-2 Current Versions Required

OPERA Cloud Platform Module Description Minimum Version

OPERA Cloud Services

The customer must have a subscription to OPERA Cloud Foundation

 

OPERA Cloud Sales and Event Management

The customer must have a subscription to OPERA Cloud Sales and Event Management

 

OPERA Cloud Sales and Event Management

For customers OHIP is included in the subscription to OPERA Cloud Foundation.

Partners need a subscription to Oracle Hospitality Integration Cloud Service

 

Configuration of OPERA Controls

To activate the Create Block functionality, you need to ensure the following OPERA Controls are active in the target property. You can use the following API operations to validate the settings:

Ensure that application function EVENTS - CATERING EVENTS is active

RQ: ent/config/v1/settings?hotelId={{HotelId}}&parameterNameWildCard=CATERING EVENTS

Mandatory Fields - Available Values:

Event Type

RQ: evm/config/v1/cateringEventTypes?includeInactive=false&hotelIds={{hotelId}}

Event Status Code

RQ: blk/config/v1/blockStatusCodes

Dependent Field - Available Values:

Function Space Configuration

Note:

This will return the codes available for Rental Code and Setup Styles which are required fields when creating an event with a function space.

RQ: evm/config/v1/hotels/{{HotelId}}/functionSpaces/{{FunctionSpaceCode}}/configurations

Workflow

Step by step solution including:

Figure 4-2 The sequence of API calls (in any direction)


This image shows the sequence of API calls (in any direction).

Description of Steps:

A typical process to create a new event with a function space is as follows:

  1. Search for function space availability for the event date(s) using getEventCalendar or getAvailableSpaces. The getEventCalendar request returns function spaces available for a specific date while the getAvailableSpaces request provides function spaces available for the specified date and time period. If you are creating an event without function space, then omit this step
    1. If you use getAvailableSpaces, the default setup style and default rental code details are returned in the response for each space.
  2. Search for the blocks by date and name. If you know the internal block ID, then omit this step. Ensure the block has an active Catering Status and Catering Attendees is populated.
    1. To search for a block, you can use the REST API call.

      {{HostDomain}}/operarest/{schemamap}/blk/v1/blocks?onlyOpportunities=false&offset=1&blockName={{BlockId}}&tourSeries=false&markAsRecentlyAccessed=false&leads=false&limit=20&hotelId={{HotelId}}&onlyPickupBlocks=false

  3. Create the event using postEvent.
    1. Ensure that mandatory fields Event Type, Event Status Code, Start Time, End Time, and Expected Attendees are sent with valid values.
    2. If you are intending to assign a function space, ensure that the elements for Rental Code and Setup Styles are present and contain valid values.

Sample calls: Sample API calls for steps described in the diagram.

Sample forgeteventCalendar

Check Function Space Availability

getEventCalendar

GET {{HostName}}/evm/v1/hotels/{{HotelId}}/eventcalendar?eventEndDate=2025-04-21&isSortDescending=false&showAvailableRooms=true&display=ALL&eventLabel=Booking&sortingBy=Name&eventStartDate=2025-04-21

200 response:

{
    "eventCalendarDetails": {
        "eventSpace": [
            {
                "description": "Anna",
                "eventSpaceAttributes": {
                    "spaceArea": {
                        "area": 960,
                        "unit": "SqFeet"
                    },
                    "shareable": false,
                    "comboSpace": false,
                    "alternate": false,
                    "maximumOccupancy": 100,
                    "comboElement": true,
                    "comboRoom": "AFCR"
                },
                "hotelId": "BHOTEL",
                "roomId": "ANNA",
                "name": "ANNA",
                "building": "MAIN",
                "roomOrder": 1
            }
        ],
        "eventCodes": [],
        "sellMessages": {},
        "totalRooms": 1
    },
    "links": [],
    "warnings": []
}  

Sample for getavailablespaceslov

Check Function Space Availability

getAvailableSpaces

GET {{HostName}}/lov/v1/listOfValues/AvailableSpaces?parameterName=Event_Start&parameterName=Event_End&parameterName=HotelCode&includeInactiveFlag=false&parameterValue=2024-04-21+09:00:00.0&parameterValue=2025-04-21+17:00:00.0&parameterValue={{HotelId}}

200 response:

{
    "listOfValues": {
        "items": [
            {
                "flexfields": [
                    {
                        "parameterName": "AvailableYn",
                        "parameterValue": "Y"
                    },
                    {
                        "parameterName": "SetupCode",
                        "parameterValue": "THE"
                    },
                    {
                        "parameterName": "OccMin",
                        "parameterValue": "10"
                    },
                    {
                        "parameterName": "OccMax",
                        "parameterValue": "100"
                    },
                    {
                        "parameterName": "SetupTime"
                    },
                    {
                        "parameterName": "SetdownTime"
                    },
                    {
                        "parameterName": "RateCode",
                        "parameterValue": "HD"
                    },
                    {
                        "parameterName": "Rate",
                        "parameterValue": "12"
                    },
                    {
                        "parameterName": "ShareableYn",
                        "parameterValue": "N"
                    },
                    {
                        "parameterName": "ForceAlternateYn",
                        "parameterValue": "N"
                    }
                ],
                "code": "001",
                "name": "Argus Conference Room - 001",
                "description": "Argus Conference Room - 001",
                "active": true
            },

Sample for postEvent

Create Event with Space

POST{{HostName}}/evm/v1/events

Body:

{
    "eventDetails": [
        {
            "eventPrimaryInfo": {
                "eventId": {
                    "type": "EventId",
                    "idContext": "OPERA",
                    "id": "-1"
                },
                "hotelId": "BHOTEL"
            },
            "eventDetail": {
                "eventName": {
                    "defaultText": "Meeting",
                    "translations": [],
                    "translatedTexts": []
                },
                "eventType": "MTG",
                "eventTimeSpan": {
                    "startDateTime": "2025-04-21 09:00:00.0",
                    "endDateTime": "2025-04-21 17:00:00.0"
                },
                "eventStatus": {
                    "status": {
                        "code": "INQ"
                    }
                },
                "attendees": {
                    "expected": "30"
                },
                "doorcard": "Do Not Update KD API Block",
                "notMoveable": false,
                "displayDoorcard": true
            },
            "processInstructions": {
                "overrideCapacity": false,
                "overbook": false,
                "overrideMaxgroups": false,
                "warnFunctionSpace": true
            },
            "eventBlockInfo": {
                "blockIdList": [
                    {
                        "type": "Block",
                        "idContext": "OPERA",
                        "id": "919698"
                    }
                ],
                "hotelId": "BHOTEL",
                "markAsRecentlyAccessed": false
            },
            "functionSpaceInformation": {
                "functionSpaceCode": "BALT",
                "functionSpace": "Baltimore",
                "setupCode": "CLR",
                "setupTime": "30",
                "setdownTime": "30",
                "rateCode": "CUSTOM",
                "rentalCode": "CUSTOM",
                "rentAmount": {
                    "amount": "500"
                },
                "rentalAmount": {
                    "amount": "500"
                }
            }
        }
    ]
}

201 Response: Created

{
    "eventDetails": [
        {
            "eventPrimaryInfo": {
                "eventId": {
                    "type": "EventId",
                    "idContext": "OPERA",
                    "id": "642344"
                },
                "hotelId": "BHOTEL"
            },
            "eventDetail": {
                "eventName": {
                    "defaultText": "Meeting",
                    "translations": []
                },
                "eventType": "MTG",
                "eventTimeSpan": {
                    "startDateTime": "2025-04-21 09:00:00.0",
                    "endDateTime": "2025-04-21 17:00:00.0"
                },
                "eventStatus": {
                    "status": {
                        "code": "INQ"
                    }
                },
                "attendees": {
                    "expected": 30
                },
                "doorcard": "Do Not Update KD API Block",
                "masterEvent": false,
                "subEvent": false,
                "packageEvent": false,
                "alternateEvent": false,
                "notMoveable": false,
                "loudEvent": false,
                "hasPostings": false,
                "displayDoorcard": true,
                "cateringDeductInventory": false,
                "eventShared": false,
                "includeSpaceInPackage": false,
                "eventLevelRevenueActualization": false
            },
            "functionSpaceInformation": {
                "functionSpaceCode": "BALT",
                "setupCode": "CLR",
                "setupTime": 30,
                "setdownTime": 30,
                "rentalCode": "CUSTOM",
                "rentalAmount": {
                    "amount": 500
                }
            }
        }
    ]
}

References

  • For more information, review the Anti-Patterns chapter in the OHIP user guide to learn more about functional and technical anti-patterns.

  • For more information, refer to the Events topic in the OPERA Cloud Services user guide.