4.3 ww.dll API Reference : API descriptions : Functions with database access : newbooking
 
newbooking
 
Description
newbooking adds the booking to the privates schedule by passing in <department>, <category>, <item>, <guest_no>, <start_time>, <end_time> and, optionally, <instructor>, <request> and <max4sale>. The following are examples. The first example uses a requested regular instructor and the second uses a TBD instructor.
 
Example:
<func>newbooking</func><guest_no>212000000</guest_no>
<department>PRIVATES</department><category>SKIING</category>
<item>2HRPRIV</item><start_time>03/12/2007 11am</start_time>
<end_time>03/12/20071 pm</end_time><instructor>SWILSON</instructor>
<request>SWILSON</request>
 
<func>newbooking</func><guest_no>212000000</guest_no>
<department>privates</department><category>skiing</category>
<item>2hrpriv</item><start_time>03/13/2007 9am</start_time>
<end_time>03/13/2007 11am</end_time>
<instructor>TBDALL01</instructor>
 
A <booking_id> is returned if the booking is added to the schedule. The booking is scheduled if it doesn’t have a conflict in the instructor schedule or exceed lesson type Max4Sale limits. If <max4sale> is passed in with the call, then DCI Max4Sale limits are checked to verify that these limits have not been used up.
 
Note: Currently, if you want to book into the TBD schedule, you need to specify a TBD instructor as in the example shown above.
To submit a sale with a booking via the processsale function, the booking is specified using the booking_id. The following is an example of a portion of the processsale call:
 
Example:
<func>processsale</func><sale><save><guest_no>14001000</guest_no>
<first_name>SAM</first_name><last_name>SPADE</last_name>
<phone>(505) 555-2468</phone></save><settlement>CASH</settlement>
<item><dci>PRIVATES SKIING 2HRPRIV</dci><qty>1</qty><finalprice>75.00</finalprice>
<guest><renew><guest_no>14001000</guest_no></renew></guest>
<date>03-12-2007</date><do_on_sale></do_on_sale><pvt_book>
<booking_id>1409000000</booking_id></pvt_book></item></sale>
 
When the sale is processed by Sales Host, the trans_no is added to the booking and other pertinent information is populated into the data.
 
Input fields
 
XML tag
Description
<department>
<item> department.
<category>
<item> category.
<item>
Item.
<guest_no>
Guest number.
<start_time>
Start time for booking.
<end_time>
End time for booking.
<instructor>
Optional. Instructor.
<request>
Optional. Request for instructor.
<max4sale>
Optional. Max4Sale limits are checked to verify that these limits have not been used up. Boolean.
 
Return fields
 
XML tag
Description
<booking_id>
The ID of the successful booking.
 
Examples
 
Example invocation:
<func>newbooking</func><guest_no>212000000</guest_no>
<department>privates</department><category>skiing</category>
<item>2hrpriv</item><start_time>03/13/2007 9am</start_time>
<end_time>03/13/2007 11am</end_time>
<instructor>TBDALL01</instructor>
 
Example return string:
OK :<booking_id>86000001</booking_id>
 
See also
getdciavail