You are viewing this page from an external source and its content may or may not be applicable in your market. If you are already a registered user of Amadeus Service Hub, please login to access the full knowledge base, news, training materials and other services specific to your market.
null Amadeus Selling Platform Connect: Smart Flow Advanced Language Syntax
ES
IT
PT
TC

Amadeus Selling Platform Connect: Smart Flow Advanced Language Syntax

Description

Statement Description Examples
ask Prompts the user with a question.
The answer must be assigned to a variable.
The string in quotes between ask and assign to is the question that appears in the prompt when the Smart Flow is running.
The string after assign to is the name of the variable to which the answer is assigned.
You can also use a specific set of HTML tags in an ask statement to format the appearance of the question. For more information, see HTML Tags in the Smart Flow Advanced Language.
ask “What is your first name?” assign to firstname
ask “<h1>What is your first name?</h1>” assign to firstname
ask “<font size=\“3\” color=\“red\”>What is your last name?</font>” assign to lastname
mandatory ask Same as the ask statement except that the user must answer the question.
If no answer is entered, the user receives an error message when the Smart Flow is running.
mandatory ask “What is your last name?” assign to lastname
ask email Prompts the user with a question where the answer must be an email address.
If an incorrect email address format is entered, the user receives an error message when the Smart Flow is running.
You can also use a specific set of HTML tags in an ask email statement to format the appearance of the question. For more information, see HTML Tags in the Smart Flow Advanced Language..
ask email “What is your email address?” assign to customeremail
mandatory ask email Same as the ask email statement except that the user must answer the question.
If no answer is entered, the user receives an error message when the Smart Flow is running.
mandatory ask email “What is your email address?” assign to customeremail
ask number Prompts the user with a question where the answer must be a number.
If a number is not entered, the user receives an error message when the Smart Flow is running.
You can also use a specific set of HTML tags in an ask email statement to format the appearance of the question. For more information, see HTML Tags in the Smart Flow Advanced Language.
ask number “What is your age?” assign to age
mandatory ask number Same as the ask number statement except that the user must answer the question.
If no answer is entered, the user receives an error message when the Smart Flow is running.
mandatory ask number “What is your age?” assign to age
ask date Prompts the user with a question where the answer must be in an accepted date format.
The accepted formats are:
  • DDMON (example: 19APR)
  • DDMONYY (example: 19APR15)
  • DDMONYYYY (example: 19APR2015)
  • DDMM (example: 1904)
  • DDMMYY (example: 190415)
  • MMYY (example: 0415)
If an accepted date format is not entered, the user receives an error message when the Smart Flow is running.
You can also use a specific set of HTML tags in an ask date statement to format the appearance of the question. For more information, see HTML Tags in the Smart Flow Advanced Language.
ask date “What date do you want to return?” assign to returndate
mandatory ask date Same as the ask date statement except that the user must answer the question.
If no answer is entered, the user receives an error message when the Smart Flow is running.
mandatory ask date “What date do you want to return?” assign to returndate
ask date with format Same as the ask date statement except that you can define the exact date format that the user must enter.
For example:
Only the date format of DDMON is acceptable. If a date in any other format is entered, the user receives an error message when the Smart Flow is running.
ask date “What date do you want to return?” with format DDMON assign to returndate
mandatory ask date with format Same as the ask date with format statement except that the user must answer the question.
If no answer is entered, the user receives an error message when the Smart Flow is running.
mandatory ask date “What date do you want to return?” with format DDMON assign to returndate
ask with format Prompts the user with a question where the answer must match the format defined by a regular expression.
If the answer is not entered in the required format, the user receives an error message when the Smart Flow is running.
For more information about using regular expressions, see Syntax Used in regular expressions below.
You can also use a specific set of HTML tags in an ask with format statement to format the appearance of the question. For more information, see HTML Tags in the Smart Flow Advanced Language.
ask “What is your cost centre?” with format “\D{2}\d{3}” assign to costcentre
mandatory ask with format Same as the ask with format statement except that the user must answer the question.
If no answer is entered, the user receives an error message when the Smart Flow is running.
mandatory ask “What is your cost centre?” with format “\D{2}\d{3}” assign to costcentre
send Send the cryptic entries. send “NM1SMITH/JOHN” send “NM1” + lastname + “/” + firstname
capture Capture part of the cryptic screen. The capture instruction is followed by three parameters, separated by commas:
  • Line: and a number to indicate which line of the screen the beginning of the string is captured.
  • Column: and a number to indicate which column of the screen the beginning of the string is captured.
  • Length: and a number to indicate the length of the string that is captured.
The string after assign to is the name of the variable in which the captured string is stored.
capture line:2, column:3, length:10 assign to lastname
if, else Perform different actions depending on whether a condition is true or false.
The if instruction is always followed by an expression that is between parenthesis. The expression is a comparison between two terms that can be a variable or a constant.
  • The == operator verifies whether the two terms are equal.
  • The != operator verifies whether the two terms are different.
  • The > operator verifies whether the first term is greater than the second term.
  • The < operator verifies whether the first term is less than the second term.
  • The >= operator verifies whether the first term is greater than or equal to the second term.
  • The <= operator verifies whether the first term is less than or equal to the second term.
If the condition is true, the first block of instructions that is delimited by the curly brackets is executed.
If the condition is false, the second block of instructions that is delimited by the word else and curly brackets is executed.
ask “What is your destination?”
assign to destination
if (destination == “PAR”) {
send “rm ok”
} else {
send “rm no”
}
ask until Asks a question until a particular answer is reached.
The string with quotes between ask and until are the instructions that appear in the prompt when a Smart Flow is running.
The string after the word until is the value of the answer that stops the iteration of the block of instructions. The string after the word when determines the action.
You can also use a specific set of HTML tags in an ask until statement to format the appearance of the instructions. For more information, see HTML Tags in the Smart Flow Advanced Language.
ask “Do you need to include visa information?”
1 : Yes - ESTA for the USA
2 : Yes - other countries
3 : No - continue” until “3” {
when(“1”) {
send “RIR for travel to the USA, an ESTA (online visa) is required”
}
when(“2”) {
send “RM no visa required”
}
}
mandatory ask until Same as the ask until statement except that the user must answer the question.
If no answers are entered, the user receives an error message when the Smart Flow is running.
today The today variable is a global variable that is used to get the value of the date when executing a Smart Flow. The date is in the IATA format (DDMMM). send “rm visa information added on” + today
choose Prompts the user with a limited choice where only one choice is possible.
The string within the quotes that follow the choose statement is the question that is asked when the Smart Flow is run.
The when statements are the options that are provided for the question. The first when statement is the default.
The user can only choose one when statement by either selecting the option button in the prompt or using the keyboard shortcuts from letters A to Z.
When the user makes a choice, the content of the when statement is executed and the flow exits the choose block.
You can also use a specific set of HTML tags in a choose statement to format the appearance of the question. For more information, see HTML Tags in the Smart Flow Advanced Language.
choose “Do you want to” {
when (“send pax remark”) {
send “rm 1”
}
when (“send comment”) { send “rm 2”
}
}
choose “<b><i>Do you want to</i></b>” {
when (“Send pax remark”) {
send “rm 1”
}
when (“Send comment”) { send “rm 2”
}
}
choose until Similar to the choose statement except the prompt continues to loop when the Smart Flow is run.
The exit option is represented by the until statement. The user can also exit by pressing the X key on the keyboard.
When the user makes a choice, the content of the when statement is executed, after which the flow returns to the choose until loop unless the user exits.
choose “Do you want to” until “end” {
when (“Send pax remark”) {
send “rm pax”
}
when (“Send comment”) {
send “rm comment”
}
}
group The group instruction is used to group several questions in the Smart Flow prompt that are defined by the ask or select instructions.
This allows you to include several questions in the same Smart Flow prompt rather than having separate prompts for each ask instruction.
The group instruction can only contain ask and select instructions; it cannot contain any other instructions.
group {
ask “Enter first name” assign to name
ask “Enter last name” assign to lastname
ask date “Enter DOB” assign to dob
}
call The call instruction is used to call another Smart Flow from the running Smart Flow.
The call instruction is followed by the name of the Smart Flow to call.
 
You can also explicitly call either an office Smart Flow or a personal Smart Flow with the same name by defining either office or personal in the call syntax.
ask “What is the passenger last name?” assign to lastname
call “mySmartFlow”
send “RM” + lastname
 
call office “mySmartFlow”
call personal “mySmartFlow”
select Allows the user to select one option from a drop-down list of predefined options.
The string with quotes between the words select and from is the question that appears in the prompt when a Smart Flow is running.
The comma-separated string with quotes between the words from and assign to defines the predefined list of options from which the user can choose.
A comma is used to separate the options. There is no limit to the number of options you can provide.
The string after the words assign to is the name of the variable in which the answer is stored.
You can also use a specific set of HTML tags in a select statement to format the appearance of the question. For more information, see HTML Tags in the Smart Flow Advanced Language.
select “What is the passenger title?” from “MR,MRS,DR” assign to title
select “<b>What is the passenger title?</b>” from “MR,MRS,DR” assign to title
append Used to append variables by text or variable name.
The value between the words append and to can be a concatenation of different strings and variables.
The string after the word to is the name of the variable to store.
The first character of this variable name should be a lowercase letter [a-z] and the other characters should be a number or letter [a-zA-Z0-9] or an underscore character. If the variable is not empty, the value is appended to the variable.
append “name” + var1 + “toto” to var2
comment Allows you to enter comments in the Advanced Language Editor. // your comments

 

Example of a Smart Flow 

The following Smart Flow prompts the user to enter passport information for each passenger in the Booking File.

Note: This example shows a Smart Flow defined by an office administrator in the Advanced Language Editor.

Example of a Smart Flow with HTML tags

The following Smart Flow uses HTML tags to format the questions defined in ask, mandatory ask, select and choose statements.

Note: This example shows a Smart Flow defined by an office administrator in the Advanced Language Editor.