Skip to content

Instantly share code, notes, and snippets.

@yeradis
Forked from codesnik/amadeus_workflow.md
Created December 13, 2016 09:42
Show Gist options
  • Save yeradis/ef2c563dc73f2d092e47451b8f0adf84 to your computer and use it in GitHub Desktop.
Save yeradis/ef2c563dc73f2d092e47451b8f0adf84 to your computer and use it in GitHub Desktop.
amadeus wokflow

SEARCH & DISPLAY

get session from pool

get customer input (departure, destination, dates, passengers count)

# search for recommendations conforming to customer input
do Fare_TravelBoardSearch

# search again with the same options and additiona restriction: only nonstop flights
do Fare_TravelBoardSearch

# optionally
do Fare_MasterPricerCalendar

merge recommendations and filter out some of them according to our business rules

display recommendations to customer

return session to pool

SELECT RECOMMENDATION

get session from pool

# check price
do Fare_InformativeBestPricingWithoutPNR

if price discrepancy?
  display corrected recommendation, advise customer
  break

return session to pool

# bookability check
create new session

do Air_SellFromRecommendation

if unable to sell any segment?
  display error to customer
  break

display flights details, prices, etc

logout session

BOOKING

get and validate passengers data and credit card data

create new session

# add itinerary
do Air_SellFromRecommendation

if unable to sell any segment?
  display error to customer
  break

# add passenger name records and commit pnr
do PNR_AddMultiElements with passengers data
  SRDOCS, SR FOID, FE, FFN elements
  ES and RP access remarks
  and option code for commit/retrieve

if got errors adding name records, or no PNR number returned on commit
  # cancel PNR itinerary
  do PNR_Cancel with option code for commit
  display error to customer
  break

# repricing block start
do Fare_PricePNRWithLowerFares

if last ticket date is too near to process
  do PNR_Cancel with option code for commit
  display error to customer
  break

if got price discrepancy
  display corrected recommendation, advise customer
  logout session

  if customer does not confirm booking with new price
    do PNR_Cancel with option code for commit
    break
  else
    do PNR_retrieve
    reenter at "# repricing block start"

do Ticket_CreateTSTFromPricing

do PNR_AddMultiElements with option code for commit/retrieve

# check again for seat confirmation, some carriers have several second delay before dropping reservation
do PNR_Retrieve
if any segment isn't confirmed
  do PNR_Cancel with option code for commit
  display error to customer
  break

logout session

# payment processing
if payment authorization on credit card fails
  display time remaining before booking will be canceled
  allow user to correct credit card data or confirm another means of payment
  reenter at "# payment processing"

STALE PNR CANCELING

for each PNR, which haven't received payment in half an hour
  create new session
  do PNR_Retrieve for pnr number
  # cancel PNR itinerary
  do PNR_Cancel with option code for commit
  logout session

TICKETING

create new session in ticketing office

for each unprocessed PNR do

  create new session for TICKETING office
  do PNR_Retrieve
  do DocIssuance_IssueTicket

  unless ok eticket returned
    Queue_PlacePNR
    next

  # wait 5 seconds
  do PNR_Retrieve
  unless eticket number returned?
    Queue_PlacePNR
    next

logout ticketing session
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment