BookingBuilder Genie Web Services
Through the BookingBuilder Genie web services, data in BookingBuilder Genie lookup tables can be manipulated, prompts can be enabled/disabled, and statistical data on prompt actions can be retrieved.
Web services provide a way for programmers to interact with outside systems via the internet. The BookingBuilder Genie Web Services are written using .Net and can be easily accessed by an experienced programmer.
The general BookingBuilder Genie web services are at: https://webservices.bookingbuilder.com/BBAdmin/WebService/BBGenie.asmx
All of the web services functions require an email address and password. These must be authorized for the group that holds the prompts, lookup tables or data you are manipulating. Group-specific logins will work, but only for their single group. Company-wide logins will work for all groups in a company account.
Most of the web services return at least a boolean success indicator, and an error message string.
This provides a very effective way for your systems to control the prompts viewed by your travel counselors. For example, let's say that you have a primary preferred airline, BB, and a secondary preferred airline, CC. You have an internal system that tracks bookings from your back office. At the beginning of each month, BB is the airline you want Genie to promote. However, once you reach your quota on BB, you want to switch the promotion to CC. This is now very easily achieved through the BookingBuilder Genie Web Services.
First, create two prompts: One that promotes BB and one that promotes CC. In the list of prompts is the Prompt ID; note this for these two prompts. Now you simply write a small program that uses the web services to enable the BB prompt and disable the CC prompt at the beginning of the month. Your program can then check the quota daily; once the quota for BB has been reached, disable that prompt and enable the CC prompt. The enable prompt and disable prompt web services are documented at:
ixBBMsgMaster is the prompt ID. Note that after you enable and/or disable prompts, you must prepare the prompts for download. If you don't do this, the workstations will not get the updated prompt status. The web service for this is:
Note that the above web service prepares all prompts in the specified group for download. If other prompts in the group are in progress, this could cause problems. We suggest that you create a separate group for remotely enabled/disabled prompts, and share that group to the groups with your computers. This helps ensure that no prompts accidentally make to the workstations.
There are several web services that allow you to manipulate data in BookingBuilder Genie lookup tables. Just like with prompts, once you are finished changing data in a lookup table, you must prepare the lookup table for download. To prepare only the lookup tables in a specific group for download, use:
Important: Since these functions modify data directly in the BookingBuilder Genie lookup tables, we strongly suggest that you create a test group and a test lookup table and use those for development purposes until you are comfortable with the web services functions. This will help ensure that only correct data is sent to your workstations.
The first function appends data to an existing lookup table. In addition to the email address and password, the group ID and lookup table name are specified. An array of LookupTableData objects specifies the data to be added.
Important: When creating the LookupTableData objects, be sure to fill in all fields except ixLTData (ixLTData is set by our server when retrieving data.) Any string field you are not using should be set to an empty string; unused date fields should be set to 1900-01-01 ("1900-01-01T00:00:00" if you are manually constructing the XML). It is important that you use these default values.
Please note that BookingBuilder Genie Build 270 and newer support 10 fields each of string, date and numeric, for a total of 30 fields. Previous builds only support 5 fields of each. The server supports all 30 fields regardless of which build you have installed.
Replace All Data
If you want to delete all existing data in a lookup table and replace it with new data, use this function.
When you delete, query and update data in lookup tables, you must create conditions. These conditions are parsed into a SQL Where clause. In keeping with our focus on data security, we do not allow you to specify a where clause, as that can be subject to SQL injection attacks. Instead, you create QueryCondition objects that contain the parts of the Where clause. Our server code then validates these and constructs a proper Where clause. For example, if this is the Where clause:
WHERE ((sData1 = 'hello' OR sData1 = 'bye') AND dblData3 >= 999) OR dtData1 = '2009-02-15'
The first QueryCondition object would be:
iOpenParenCount = 2
sFieldName = "sData1"
sOperator = "="
sValue = "hello"
iCloseParenCount = 0
sCombiner = "OR"
This means to start with two open parens, as in "((", then "sData1 = 'hello", no close parens, then OR. The next QueryCondition object would be:
iOpenParenCount = 0
sFieldName = "sData2"
sOperator = "="
sValue = "bye"
iCloseParenCount = 1
sCombiner = "AND"
This means to add "sData2 = 'bye'" then a close paren, then "AND". Continue adding these until all the conditions are specified.
You create one QueryCondition object for each field/value in the query. You do not need single quotes around string or date values; these are added by our code. Supported operators are =, <>, <, >, <=, >=. Supported combiners are AND and OR. Supported field names are ixLTData, sData[1-10], dtData[1-10], and dblData[1-10]. If any unsupported data is found in these objects, the entire transaction is aborted. Building the conditions this way gives you total flexibility while protecting the data.
The Update Data function updates all rows that meet the specified conditions, just like a standard SQL Update.
You can query a count of matching records, just like a SQL "SELECT COUNT(*)", or query the data. When you query the data, an array of LookupTableData objects is returned. These contain the data from each row, including the value for ixLTData, which an identity column. It is unique for each row, and can be used in the delete and update conditions.
Querying Statistical Data
Each time a prompt action fires, such as Display Notification Window, or Track For Reporting, data is entered into the Prompt Action table. The BookingBuilder Genie reports use this data. You can query the raw data, getting either a count of matching records, or the actual data. For example, if you have a prompt for a preferred airline, add a Track For Reporting action that puts unique information into the database for that prompt. Then you can have a program query our database daily to see how many times that prompt appeared. You could also get the raw data, and create your own report to show how many times it appeared on each computer each day of the week.
The available fields are:
||The identity column that uniquely identifies each row.
||The date and time the action fired, in local time on your workstation.
||The numeric computer identifier from the BookingBuilder About screen.
||The name of the computer.
||The nickname of the computer as configured in the BB Admin Site.
||The Group ID of the computer at the time the action was fired.
||The current name of the group identified by iGroupID.
||The Prompt ID of the prompt to which the action belongs.
||The name of the prompt.
||The name of the notification window if the action came from a notification window within a prompt.
|sData1, sData2, sData3
||Additional data on each action, or user-specified in Track For Reporting.
bIsFromNW True if the actions came from a Notification Window within a prompt (such as clicking a window and having a set of actions fire)
||The numeric action identifier.
||The name of the action performed.
All of these fields may be specified in the conditions, and they are returned in the data query.
||Appends data to the specified lookup table.
||Deletes data from the specified lookup.
||Disables a prompt. The prompt is not deleted, and my be enabled at any time.
||Enables a prompt.
||Prepares the lookup tables in a specified group for download. This must be done after any lookup table changes so that the workstations get the updated data.
||Prepares the prompts in a specified group for download. This must be done after enabling/disabling prompts so that the workstations get the updated prompt settings.
||Queries a lookup table and returns how many matching records were found.
||Queries the Prompt Action statistical database and returns how many matching records were found.
||Queries a lookup table and returns all data from the matching rows.
||Queries the Prompt Action statistical database and returns all data from the matching rows.
||Deletes all data from a lookup table and replaces it with the specified data.
||Changes all rows in a lookup table that match the specified conditions to the specified data.
If you have any questions about how to use Genie Window Placement By Region please contact us at: firstname.lastname@example.org