TABLE OF CONTENTS
Introduction
This article will help you to understand what is command builder, what is his purpose and how you can use it.
What is a command builder?
The command builder is a functionality that can be used in order to add different types of remarks or commands in the PNR. Travel agencies are able to set rules when the command will be auto-generated in the PNR.
Setup
Please follow the next path in order to find the Command builder location:
Admin panel → Command builder
Image 1. Command builder location
How to use it
When you enter the Command builder section, you will see the Add New Command button, and below it, there will be commands that you are already created if they exist:
Image 2. Command builder
If you already have some commands created you will see them. You will have information about command name, variable, condition, is per passenger or not, and per related passenger association. Under the action, you can edit or delete the command:
Image 3. Existing command
By clicking on the Add New Command button, you will get the form where you will create your command.
First, you will need to name the command that you will create. This field is mandatory, and there is no restriction on how you can name it.
The second thing that you can choose is various types of variables. When you choose one of the variables you need to click on Add button. This field is not mandatory to be selected. You can add as many variables as you want into one command.
Command builder also allows you to add remarks for custom fields that you have created:
Image 4. Adding command for the custom field
When you click on Add button, the variable will be added in the field below:
Image 5. Adding variables
NOTE: The command builder allows you to set free flow text remark. In that case you do not need to select and add variable. In the text field you can enter what remark you want to have. However, that means that remark will be the same for all reservations. For example, if you enter command RM*TEST123 this remark will appear in all reservations that are created on your website.
NOTE: Examples in the screenshots are for Amadeus command. The command for Sabre should start with 5 instead of RM as it as for Amadeus. Also, Sabre has special characters like cross-of-lorrain, change key and end item. In the table below you can find what symbol you need to enter on Thomalex system in order to these special character be sent to Sabre.
Sabre | Thomalex |
¥ | ' |
¤ | ^ |
§ | \ |
Table 1. Sabre special characters in Thomalex
In the table below you can find options and explanations of how and when the command will be applied:
Option | Explanation |
Send command for each passenger | If this option is enabled and if the reservation contains more than one passenger, a command will be sent to each of them |
Send command for each flight segment | If this option is enabled and if the flight contains more than one segment, a command will be sent for each segment |
Send command ONLY if non-GDS segment exist | If this option is enabled and if the reservation contains a non-GDS segment, a command will be sent |
Send command ONLY if all variables have value | If this option is enabled and all of your variables have value, a command will be sent |
Send command to non-GDS hotel provider (if Available) | If this option is enabled, and if the Hotel reservation is created with a non-GDS hotel provider, a command will be sent |
Send command with related passenger association | If this option is enabled, at the end of the remark it will be added /P1 which means that the remark is related to passenger 1. The same procedure will be done if you have more than one passenger. |
Send command for each flight segment with related segment association | If this option is enabled, at the end of the remark it will be added /S1 or S2 if it is for one segment. If it for example for 4 segments, at the end of the remark it will be added /S1-4. |
Online command | This option is enabled by default. If it is enabled the command will be sent for all reservations created online |
Send command at PNR creation | If this option is enabled the command will be sent at the moment of the PNR creation |
Send command after PNR creation | If this option is enabled the command will be sent after the PNR is created |
Send command at PNR issue ticket | If this option is enabled the command will be sent once the tickets are issued |
Send Command at PNR Approval process | If this option is enabled the command will be sent when the first approval/rejection is done |
Send command at PNR cancellation | If this option is enabled the command will be sent when the reservation is cancelled |
Send command at PNR modification | If this option is enabled the command will be sent when the PNR is modified, on the last step when the new booking is created |
Offline command | Not in use. |
Table 2. Options and explanations
Specify conditions
If this option is enabled you can add conditions which need to be applied in order to execute the command.
There are two ways to specify conditions.
The first one is that you have to define two variables data items, and a comparison operator. When the comparison of the two data items is true, the command will be sent.
Image 6. Setting Condition
The second one is to select Variable 1, then select comparison operator, and in the field for the literal value you can enter whatever you want to be matched with the variable. It is a free-flow text.
For example, you want to set that command will be sent only if the issuing office ID is a specific one. You will select the variable Issuing Office ID under Variable 1, select operation as EQ (equal), and in the literal value you will enter the specific Office ID:
Image 7. Setting up conditions with the literal value
In the table below you can find what each comparison operator means:
Comparison operator | Explanation |
INF | Compares if the Variable1<Variable2. It is used for numeric values. |
SUP | Compares if the Variable1>Variable2. It is used for numeric values. |
== | Compares two operands for equality. It is used for numeric values. |
!= | Compares two operands for inequality. It is used for numeric values. |
EQ | Compares two operands for equality. |
NOTQ | Compares two operands for inequality. It is used for text values. |
CONTAINS | Check if some variables contain some value. For example, check if the Email of the PNR creator contains @gmail.com. If it contains, the system will execute the command. |
BEFORE | Compares dates between variables. For example Departure date with some value. If the Departure Date is before the specified value, the command will execute. |
AFTER | Compares dates between variables. For example Departure date with some value. If the Departure Date is after the specified value, the command will execute. |
SAMEDATE | Compares dates between variables. For example Departure date with some value. If the Departure Date is the same as the specified value, the command will execute. |
Table 2. Comparison operators and explanations
Examples
In the example below we will create one simple command and see how it will be executed.
Example 1:
We will create a command that will send the Travelers' last name. Before we added the variable we will enter RM*Traveler Last name: to be easier to find the remark. And now we will add a variable. We will set that as online command and it will be created at the creation of the PNR:
Image 8. Simple test command
When we create a reservation and retrieve PNR, we will see that RM is created:
Image 9. Command executed
Example 2:
We will create a command but we will not use any variable. This time we want to be created when the PNR is canceled so we are selecting online command and send command at PNR cancelation. The command will be RM*COMMAND FOR CANCEL.
Image 10. Testing command when PNR is canceled
When the reservation is created and we retrieve PNR, we can see that we do not have a remark that we created.
Image 11. No command executed
But, when we cancel the reservation and check again we can find the remark that we created and that is expected behavior:
Image 12. Cancel command executed]
Example 3:
We will create a command to be executed but with a condition. We will set that online command at PNR creation with variable Travelers date of birth execute only if Travelers email contains @thomalex.com:
Image 13. Command with the condition
Now we will create a reservation with the traveler's email that not contains @thomalex.com so we can check if the command will be executed.
As we can see, the traveler's email does not contain @thomalex.com. Since the condition is not true, we can not find a remark with the date of birth. In this case, the command works as expected.
Image 14. Condition is false no remark was added
Now we want to check if the command will execute if the email contains @thomalex.com.
We can see that email contains @thomalex.com, Regarding that, the condition is true and command is executed and it works as expected:
Image 15. Condition is true and remark is added
Example 4:
We will now create a command with the combination of more variables.
We added variables such as travelers' email, travelers' date of birth, and fare without tax and decimals. Also, we enable the option Send command with related passenger association:
Image 16. Combinations of variables and commands with related passenger association
We created a reservation for two adults, and when we retrieve the PNR we can see that two commands are created, and they are related to each passenger. Since that for one traveler we did not enter email, you can see that for P1 variable for email is N/A which is mean that system did not find it. The system executed the command as expected.
Image 17. Command related to passenger association