Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

General Purpose

This command will make a new ticket sales in EHORS system. By providing guest selected attraction and/or together with package.
This command allow multiple attraction to be send in once, and together 1 package.

Please do note the individual attraction may select more than 1 sessions if attraction itself have more than 1 session.
However, if package are selected, all attractions with 1 session MUST be selected and if attraction in the package have more than 1 session, it MUST only select at least and at most 1 session.

Is advisable to re-check again the plan board availability by command [ G_ATT_Planboard ] and the chosen session MUST not have pax more than available.

Sample Selections

Request Parameter

Do Notice the "Parent Variable" is the length max length of the variable loop start from 1 until the number of the "Parent Variable" replacement of the {x#}. Example if varABC_{x0} have parent variable of varEFG and varEFG = 5, meaning you'll need to have variable of varABC_1varABC_2varABC_3varABC_4 and varABC_5. And if Parent Variable = "varEFG;varHIJ" meaning the loop will be a nested loop from first level varEFG and follow by varHIJ 


Variable Name

Mandatory

Variable Type

Example

Parent Variable

Explain

dateOfSalesYesDate(YYYY-mm-dd)2020-10-17-Date of the ticket sales, it'll also be use as ticket valid on date
packageIDNoVarchar(255)ABC123-Package ID retrieve from [ G_ATT_Package ] Get Available Attraction Package, If package are selected ( selectedPckgAttr == "1" ) this variable are mandatory, else can be '' (Blank) or not set.
noPaxYesNum(9)10-Number of pax / guests multiple with selected package and / or selected individual attraction' session
selectIndvAttrYesEnum(0,1)1-"0" mean not being selected or no individual attraction / sessions selected
"1" mean have individual attractions / sessions selected more than 0, at least 1 should trigger and set to "1"
selectPckgAttrYesEnum(0,1)1-"0" mean no package selected or chosen to book
"1" mean at most only 1 package been chosen or used, ONLY 1 (one) package can be set to use here
numAttrIndvSelectedYesNum(9)3-Cannot be blank, at least 0 even nothing been selected for individual attraction, this is the total of attraction(s) been selected
numAttrPckgSelectedYesNum(9)6-Cannot be blank, at least 0 even nothing been selected for selected package, this is the total attraction in the package
attrSelectedIndv_{x0}NoVarchar(255)ABC123numAttrIndvSelected
Max until (x0)

Selected attraction (BDI ID / Attraction ID / Item ID), loop start from 1 until parent variable x, replacing the number of {x0} start from 1 until maximum number of the parent variable.

Example: 
numAttrIndvSelected = 3
attrSelectedIndv_1 = "ABC123", attrSelectedIndv_2 = "EFG123", attrSelectedIndv_3 = "HIJ123"

attrSelectedPckg_{x0}NoVarchar(255)ABC123numAttrPckgSelected
Max until (x0)

All package' attractions within selected package referring to [ G_PKG_Details ] Get Package Details, loop start from 1 until parent variable x, replacing the number of {x0} start from 1 until maximum number of the parent variable.

Example: 
numAttrPckgSelected = 6
attrSelectedPckg_1 = "ABC123", attrSelectedPckg_2 = "EFG123", attrSelectedPckg_3 = "HIJ123", attrSelectedPckg_4 = "KLM123", attrSelectedPckg_5 = "NOP123", attrSelectedPckg_6 = "QRS123"

attrPriceIndv_{x0}NoDouble(10.2)1234.56numAttrIndvSelected
Max until (x0)

Price / Amount referring to [ G_IND_Attractions ] Get Individual Attractions Price, XML node of #ATTRACTION_ITEMS@itemPrice of the attraction price, loop start from 1 until parent variable x, replacing the number of {x0} start from 1 until maximum number of the parent variable and MUST match the attraction like attrSelectedIndv_2 have price 400.00, then attrPriceIndv_2 = "400.00"

Example: 
numAttrIndvSelected = 3
attrPriceIndv_1 = "612.34", attrPriceIndv_2 = "1200.00", attrPriceIndv_3 = "0.00"

attrPricePckg_{x0}NoDouble(10.2)0.00

numAttrPckgSelected
Max until (x0)

Price / Amount referring to [ G_PKG_Details ] Get Package Details, XML node of #ATTRACTION_ITEMS@itemPrice_1 of the package attraction price, loop start from 1 until parent variable x, replacing the number of {x0} start from 1 until maximum number of the parent variable and MUST match the attraction like attrSelectedPckg_2 have price 60.00, then attrPricePckg_2 = "60.00"

Example: 
numAttrPckgSelected = 6
attrPricePckg_1 = "60.00", attrPricePckg_2 = "60.00", attrPricePckg_3 = "100.00", attrPricePckg_4 = "160.00", attrPricePckg_5 = "60.00", attrPricePckg_6 = "100.00"

numAttrSessIndvSelected_{x0}NoNum(9)2numAttrIndvSelected 
Max until (x0)

Number of the session selected for the selected individual attractions if non-selected for the attractions, it should be "0". The number cannot be more than available sessions for the attraction from [ G_IND_Attractions ] Get Individual Attractions Price. Loop start from 1 until maximum number of parent variable of numAttrIndvSelected. Where {x0} are representing the attraction of attrSelectedIndv_{x0}.

Example:
numAttrSessIndvSelected_2 = "ABC1" and "ABC" have 2 sessions selected numAttrSessIndvSelected_2 = "2"

numAttrSessPckgSelected_{x0}NoNum(9)1numAttrPckgSelected 
Max until (x0)

Number of the session selected for the selected individual attractions if non-selected for the attractions, it should be "0". The number cannot be more one of the available sessions for the attraction from [ G_PKG_Details ] Get Package Details. Loop start from 1 until maximum number of parent variable of numAttrPckgSelected. Loop start from 1 until maximum number of parent variable of numAttrPckgSelected. Where {x0} are representing the attraction of attrSelectedIndv_{x0}.

And please be note for package session ARE maximum ONLY to have 1 session per attratcion as the package are grouping the total price.

Example:
numAttrSessPckgSelected_2 = "ABC1" and "ABC" have 1 sessions selected numAttrSessPckgSelected_2 = "1"

selectedIndvSessionID_{x0}_{x1}NoVarchar(255)ABC123numAttrIndvSelected 
Max until (x0)
numAttrSessIndvSelected_{x0} 
Max until (x1)

This variable use for selected sessionID/plamBoardID getting from [ G_IND_Attractions ] Get Individual Attractions Price, and this variable will be 2 level loop, which first from parent of maximum parent variable numAttrIndvSelected and follow by each attraction of selected with maximum parent variable numAttrSessIndvSelected

The looping from both level are start from 1 until the parent variable as max length

Example:
Number of selected individual attraction is 3 and the second attraction have 2 sessions selected, One session with ID AC12, and second session with ID EF34
 - First level parent variable numAttrIndvSelected = "2"
 - Second level parent variable numAttrSessIndvSelected = "2"
 - Meaning the 2 selected session for second attraction are selectedIndvSessionID_2_1 = "AC12", selectedIndvSessionID_2_2 = "EF34"

selectedPckgSessionID_{x0}_{x1}NoVarchar(255)ABC123

numAttrPckgSelected 
Max until (x0)
numAttrSessPckgSelected_{x0} 
Max until (x1)

This variable for selected sessionID/plamBoardID getting from [ G_PKG_Details ] Get Package Details, and this variable also have 2 level of looping. However for package selected session ID it'll be ALWAYS ONLY 1 (ONE) session as above mentioned. 

The looping from both level are start from 1 until the parent variable as max length

Example:
Number of selected package attraction is 6 and the fourth attraction have ONLY 1 sessions selected, which with session ID HJ8819
 - First level parent variable numAttrIndvSelected = "6"
 - Second level parent variable numAttrSessIndvSelected = "1"
 - Meaning the fourth attraction selected session ID is selectedIndvSessionID_4_1 = "HJ8819"

Sample Request with JS

$(document).ready(function(){
	$.ajax({
		url:"https://api.ehors.com",
		method:'POST',
		dataType:'text',
		data:{
			accessID:'Bed1C5Wa',
			accessKey:'R3fX3DMSzf7QJ',
			moduleCode:'TicketSales',
			command:'P_TKT_NewSales',
			dateOfSales:'2020-10-17',
			noPax:'1',
			packageID:'BB5547',
			selectIndvAttr:'1',
			selectPckgAttr:'1',
			numAttrIndvSelected:'3',
			numAttrPckgSelected:'6',
			attrSelectedIndv_1:'CB55',
			attrSelectedIndv_2:'BB600',
			attrSelectedIndv_3:'CB71',
			attrSelectedPckg_1:'CB13',
			attrSelectedPckg_2:'CB11',
			attrSelectedPckg_3:'BB15',
			attrSelectedPckg_4:'BB10',
			attrSelectedPckg_5:'BB17',
			attrSelectedPckg_6:'BB12',
			attrPriceIndv_1:'612.34',
			attrPriceIndv_2:'1200.00',
			attrPriceIndv_3:'0.00',
			attrPricePckg_1:'60.00',
			attrPricePckg_2:'60.00',
			attrPricePckg_3:'100.00',
			attrPricePckg_4:'160.00',
			attrPricePckg_5:'60.00',
			attrPricePckg_6:'100.00',,
			numAttrSessIndvSelected_1:'1',
			numAttrSessIndvSelected_2:'2',
			numAttrSessIndvSelected_3:'1',
			numAttrSessPckgSelected_1:'1',
			numAttrSessPckgSelected_2:'1',
			numAttrSessPckgSelected_3:'1',
			numAttrSessPckgSelected_4:'1',
			numAttrSessPckgSelected_5:'1',
			numAttrSessPckgSelected_6:'1',
			selectedIndvSessionID_2_1:'HBB32956',
			selectedIndvSessionID_3_1:'CB31521',
			selectedIndvSessionID_3_2:'HCC33160',
			selectedIndvSessionID_5_1:'HCC33521',
			selectedPckgSessionID_1_1:'CB32096',
			selectedPckgSessionID_2_1:'CB31738',
			selectedPckgSessionID_3_1:'HBB32510',
			selectedPckgSessionID_4_1:'CB31335',
			selectedPckgSessionID_5_1:'CB31366',
			selectedPckgSessionID_6_1:'CB32127'
		},
		success:function(response){
			console.log(response);
		}
	})
});



  • No labels