Update online database with changed VIP data
Setting temporary connection options
sql
set temporary option blocking = on;
set temporary option blocking_timeout = 10000;
set temporary option chained = on;
Query online for last_vip_id and email options
web
last_id
Set last_vip_id from data received
var_read
Update email options
opt_email
Prepare updated data in VIP
comment
VIP Initialization
sql
call vip.sync_upl_init(#last_id#)
VIP Post Code Selection
sql
call vip.sync_upl_post_code()
VIP Country List selection
sql
call vip.sync_upl_country_ref()
VIP Country To Account bindings selection
sql
call vip.sync_upl_country_account()
Driver List selection
sql
call vip.sync_upl_driver()
Allowed Field Values selection
sql
call vip.sync_upl_booking_field_value()
Booker List selection
sql
call vip.sync_upl_booker()
Passenger List selection
sql
call vip.sync_upl_passenger()
Passenger To Account bindings selection
sql
call vip.sync_upl_passenger_account()
Place List selection
sql
call vip.sync_upl_place_ref()
Booking selection
sql
call vip.sync_upl_booking()
Booking passenger selection
sql
call vip.sync_upl_booking_passenger()
Booking place selection
sql
call vip.sync_upl_booking_place()
Booking fields selection
sql
call vip.sync_upl_booking_fields()
Booking Additional Fields
___create confirm section___
sql
select 'ok' as result;
Send collected data to online
web
update_data
Parse received sections
comment
Check confirm section
section_check
Check return code for Post Codes
section_check
Check return code for Country
section_check
Check return code for Country-Account
section_check
Check return code for Driver
section_check
Check return code for Field Allowed Values
section_check
Check return code for Field Allowed Values
section_check
Update external IDs on Booker
section_sql
call vip.sync_uplc_booker(#vip_id#, #online_id#)
Update external IDs on Passenger
section_sql
call vip.sync_uplc_passenger(#vip_id#, #online_id#)
Update external IDs on Place
section_sql
call vip.sync_uplc_place_ref(#vip_id#, #online_id#)
Update external IDs on Booking
section_sql
call vip.sync_uplc_booking(#vip_id#, #online_id#, #reference_num#)
Check return code for Booking passengers
section_check
Check return code for Booking places
section_check
Check return code for Booking fields
section_check
Booking Additional Fields
VIP Deinitialization
sql
call vip.sync_upl_deinit()
Update VIP database with changed online data
Setting temporary connection options
sql
set temporary option blocking = on;
set temporary option blocking_timeout = 10000;
set temporary option chained = on;
get last online_id from VIP
sql
call vip.sync_dnl_init()
___create confirm section___
sql
select 'ok' as result;
Send last online id to online
web
get_data
clear
Clear DataOut
1
Check confirm section
section_check
Get last_online_id from data received
var_read
Update bookers
section_sql
call vip.sync_dnl_booker(
#id#,
#vip_booker_id#,
#account_id#,
#name#,
#password#,
#phone#,
#email#,
#fax#,
#enabled#,
#locked#,
#phone2#)
Update passengers
section_sql
call vip.sync_dnl_passenger(
#id#,
#vip_passenger_id#,
#booker_id#,
#pin#,
#mobile_phone#,
#title#,
#given_name#,
#surname#,
#enabled#)
Update passengers-to-accounts bindings
section_sql
call vip.sync_dnl_passenger_account_xref(#passenger_id#, #account_id#, #del#)
Update places
section_sql
call vip.sync_dnl_place_ref(
#id#,
#vip_place_id#,
#name#,
#num#,
#street#,
#locality#,
#town#,
#post#,
#sub_post_code#,
#type_id#,
#country#,
#enabled#)
Preparing for booking download
sql
call vip.sync_dnl_booking_clear()
Update bookings
section_sql
call vip.sync_dnl_booking(
#id#,
#vip_booking_id#,
#captured_dz#,
#vehicle_id#,
#country_id#,
#total_psg#,
#job_date_time#,
#status#,
#comment_text#,
#account_id#,
#booker_id#,
#chauffeur_id#,
#reference_num#)
Update booking passengers
section_sql
call vip.sync_dnl_booking_psg(
#booking_id#,
#passenger_id#,
#principal_ind#)
Update booking places
section_sql
call vip.sync_dnl_booking_pl(
#booking_id#,
#place_id#,
#seq_num#,
#house_flight_no#)
Update booking fields
section_sql
Booking Additional Fields
call vip.sync_dnl_booking_fld(
#booking_id#,
#field_id#,
#field_value#)
Perform actual booking import
sql
call vip.sync_dnl_booking_import();
Clearing booking temporary data
sql
call vip.sync_dnl_booking_clear()
store last online_id from site
sql
call vip.sync_dnl_deinit(#last_id#)
Send confirmation on bookers data
sql
call vip.sync_dnlc_booker()
Send confirmation on passengers data
sql
call vip.sync_dnlc_passenger()
Send confirmation on passengers-to-accounts data
sql
select 'ok' as result;
Send confirmation on places data
sql
call vip.sync_dnlc_place_ref()
Send confirmation on bookings
sql
call vip.sync_dnlc_booking()
Send confirmation on booking passengers
sql
select 'ok' as result;
Send confirmation on booking places
sql
select 'ok' as result;
Send confirmation on booking fields
sql
Booking Additional Fields
select 'ok' as result;
___create confirm section___
sql
select 'ok' as result;
Send confirmation data to online
web
confirmation
Check confirm section (last breathe :))
section_check