4.3 ww.dll API Reference : API descriptions : Functions with database access : getitemexpanded : Example:
 
Example:
IF(DATE(SUB(RANGE1)) AND DCI(,,ONE),SETPRICE(10))
IF(DATE(SUB(RANGE1)) AND DCI(,,TWO),SETPRICE(15))
IF(DATE(SUB(RANGE1)) AND DCI(,,THREE),SETPRICE(20))
 
Previously, this would get the RANGE1 rule three times from the database during a getitemexpanded or getitemtree call. Now, it only gets retrieved once. This can lead to a substantial speed improvement with complicated Dynamic Pricing Rules.
 
<calcprice> uses the current date or the date passed in the <datetime> tag to calculate the price. The prices are included in the return string in the price_info field, including final price, tax and fee information. These all are included in each <item> section when passed to the processsale function. If <max4sale> is sent as true (<max4sale>1</max4sale>), then information is sent back in the qty_rem field with the number left to sell at that <datetime>. Otherwise, a “-” is returned in that field.
An enhanced getitemexpanded call includes the ability to use the <item1> and <item2> tags to pass in multiple DCIs.
 
Example:
<func>getitemexpanded</func><item1><department>TEST_THIS </department><category>TEST_THIS </category><item>TEST_THIS1</item><datetime>11-14-2011</datetime><qty>1</qty></item1><item2><department>TEST_THIS </department><category>TEST_THIS </category><item>TEST_THIS2</item><datetime>11-14-2011</datetime><qty>1</qty></item2><item3><department>TEST_THIS </department><category>TEST_THIS </category><item>TEST_THIS3</item><datetime>11-14-2011</datetime><qty>1</qty></item3><item4><department>TEST_THIS </department><category>TEST_THIS </category><item>TEST_THIS4</item><datetime>11-14-2011</datetime><qty>1</qty></item4><calcprice>1</calcprice><template>1</template><max4sale>1</max4sale><points4sale>1</points4sale><calcpoints>1</calcpoints>

The enhanced function returns all items with modifiers in the order received by the function (parent followed by its modifier[s], and then the next parent followed by its modifier[s], etc.). Also, in addition to the ord field, which gives the overall numerical order of the items returned starting with 0, a parent field contains a 1 for parent items and a 0 for children (or modifiers).
As a result of this work, the getitemexpanded call now correctly handles modifiers. In addition, the getitemexpanded call now preserves the same order for items and modifiers being passed in as for those being returned.
With regard to the <pass_no> field, if the corresponding pass template contains a special macro (e.g., SELECTLAST()ITEMSPECIAL ("ONLINE ")), then a discounted price is returned in price_xml in the [ext] field. The specials can be any of the following in the macro for the pass template: selectivespecial, globalspecial, itemspecial or special. If the pass is voided or expired, then the discounted price is not returned. For an example, see getitem.
 
Immediate member benefit example:
The following functionality has been added to ww.dll in support of immediate member benefit recognition. The getitemexpanded function can now take optional <pass_dci> . . . </pass_dci> tags. These tags hold the DCI of a membership pass within <item> . . . . </item> tags.
 
Example:
<pass_dci><item>MEMBERSHIPANNUAL LEVEL1 </item></pass_dci>
 
Following the <pass_dci><item> tags are the other items in the cart each enclosed in <itemN> . . . </itemN> tags, where N is a positive integer indicating the order of the items in the cart. Within the <itemN> tags are <department>, <category>, <item>, <datetime> and <qty> tags. Then, finally, the <pass_dci><item> tags are repeated at the end of the XML string.
 
Example:
<func>getitemexpanded</func><calcprice>1</calcprice><pass_dci><item>MEMBERSHIPANNUAL
LEVEL1
</item></pass_dci><item1><department>MEMBERONLY</department><category>RETAIL</category
><item>MMBRMUGNEW</item><datetime>05-15-
2012</datetime><qty>1</qty></item1><item2><department>MEMBERONLY</department><category
>RETAIL</category><item>MMBRPOSNEW</item><datetime>05-15-
2012</datetime><qty>1</qty></item2><item3><department>MEMBERONLY</department><category
>RETAIL</category><item>MMBRCALDAR</item><datetime>05-15-
2012</datetime><qty>1</qty></item3><pass_dci><item>MEMBERSHIPANNUAL LEVEL1
</item></pass_dci>
 
If there is more than one membership pass in the cart that is handled by adding additional <item> . . .
</item> tags to the <pass_dci> tags.
 
Example:
<pass_dci><item>MEMBERSHIPANNUAL
LEVEL1 </item><item>MEMBERSHIPANNUAL LEVEL2 </item></pass_dci>
 
ww.dll then checks to see if the membership pass is configured with a SELECTIVESPECIAL
("SPECIAL ") Sales Screen action macro on the Pass Template > Global Settings tab, if it is configured to Allow "on-the-fly" discounting and if the special is applicable to any of the items included in the function call. If so, then the price returned reflects the special membership price.
 
Example of pass numbers with itemx tags:
<func>getitemexpanded</func>
<calcprice>1</calcprice>
<item1>
<department>MEMBERONLY</department>
<category>TICKETS</category>
<item>ADULT1DAY</item>
<datetime>06-04-2012</datetime>
<qty>3</qty>
<val_info>
<0>
<entry>P1129101000</entry>
</0>
<1>
<entry>P1129101000</entry>
</1>
<2>
<entry>P1129101000</entry>
</2>
</val_info>
</item1>
 
Input fields
 
XML tag
Description
<qty>
Optional. Quantity. Price returned is for specified quantity instead of per unit. If no <qty></qty> tags are passed, then ww.dll assumes the quantity is 1 and returns the price for a quantity of 1. See How ww.dll reacts to quantity tags for more information.
<item1>
Optional. Provides the ability to pass in multiple DCIs. See example in main description of this API.
<item2>
Optional. Provides the ability to pass in multiple DCIs. See example in main description of this API.
<itemx>
Provides the ability to include pass numbers to check for specials and/or validation.
<department>
<item> department.
<category>
<item> category.
<item>
Item.
<pass_no>
Optional. Pass number. If the corresponding pass template contains a special macro (e.g., SELECTLAST()ITEMSPECIAL ("ONLINE ")), then a discounted price is returned in price_xml in the [ext] field. The specials can be any of the following in the macro for the pass template: selectivespecial, globalspecial, itemspecial or special. If the pass is voided or expired, then the discounted price is not returned. For an example, see getitem.
<calcprice>
Optional. Boolean (1 = calculate the price, 0 = does not calculate the price)
<max4sale>
Optional. Boolean (1 = return Max4Sale information, 0 = does not return Max4Sale information)
<calcpoints>
Optional. Boolean. If 1, a point cost of each item (at qty=1) is returned as <pts_cost>.
 
Note: The ckpts4sale (is Points4Sale enforced) and pts4saledp (Dynamic Pricing Rule to use to calculate Points4Sale points to deduct) fields from the items table must be obtained in the field list from the item record (e.g., <fields>it.department, it.category, it.item, i.ckmax4sale, ckpts4sale, pts4saledp</fields>). Also note that all item reservation functionality works the same for Points4Sale as it does for Max4Sale capability except that the total point cost is stored in the item_res.pts4qty field.
<avail>
Optional. Returns information on whether a particular item is available based on Max4Sale or Points4Sale restrictions for a certain date or date range. If the tag is absent or is specified as <avail>0</avail>, nothing is calculated. See Note on the <avail> tag.
<datetime>
Optional. Date/time of interest.
<template>
Optional. Gets template information for the item (if available).
<account>
Optional. An account nickname. When used, item price information is returned based on any Dynamic Pricing Rule associated with the account. If a user is logged into a group (which is really an account), that group name is passed to ww.dll when getting product prices and any Dynamic Pricing Rule assigned to that account is applied to the prices.
 
Note: In order for Dynamic Pricing Rules assigned to accounts to work correctly in E-Commerce module, you must add the following settings to the [Preferences] section of the Sales32c.INI file for the Sales Host and the salespoint where you recall these sales:
[Preferences]
ApplyAccountRulesOnRecall=FALSE
RecalculatePriceOnRecall=FALSE
 
Without these settings in place, you see incorrect pricing on recall of these sales.
<fields>
Optional. Fields to be returned. See Note on the <fields> tag. Template fields do not need to be specified (and are not) however in the <fields> tag.
<hasmod>
Optional. Modifier. See example in main description of this API.
<holdnumber>
The ability to specify hold numbers that will return the seats associated with the holdnumber back to calling routine.
 
Example:
<func>getitemexpanded</func>
<holdnumber>247</holdnumber>
<mktgcode>
Optional. Marketing code. See ww.dll now supports specials.
<srcecode>
Optional. Source code. See ww.dll now supports specials.
<dw_info>
Used with Bonus Cash associated with In-House Cards (IHC) items to obtain the Debitware information
<rel>
Amount to be reloaded in Bonus Cash for IHC items.
<pass_no>
Pass number associated with the IHC item which is being reloaded.
<val_info>
Passes numbers to the proccesssale call.
<sale_tot>
Used with the Dynamic Pricing Rule DONATIONROUNDUP to provide the sales total. A <sale_tot> field can be passed in or the <sale> can be passed in. The value of the <sale_tot> tag is used over the presence of a <sale> tag.
 
Example:
<func>getitemexpanded</func><sale_tot>54.37</sale_tot><ITEM1><QTY>1</QTY><department>DONATIONS</department><category>DONATIONRU</category><item>DONATIONRU</item></ITEM1><c alcprice>1</calcprice>
This would return a price of $0.63 for the DONATIONRU item provided that the Dynamic Pricing Rule is configured as DONATIONROUNDUP() or DONATIONROUNDUP(1)
<sale>
Used with the Dynamic Pricing Rule DONATIONROUNDUP to provide the sales total. A <sale_tot> field can be passed in or the <sale> can be passed in. The value of the <sale_tot> tag is used over the presence of a <sale> tag.
 
Example:
<func>getitemexpanded</func><sale><item><dci>TEST TEST REGULAR </dci><message>such a deal</message><qty>3</qty><finalprice>18.95</finalprice></item></sale><ITEM1><QTY>1</QTY><d epartment>DONATIONS</department><category>DONATIONRU</category><item>DONATIONRU</ite m></ITEM1><calcprice>1</calcprice>
 
This would return a price of $0.15 for the DONATIONRU item provided that the Dynamic Pricing Rule is configured as DONATIONROUNDUP() or DONATIONROUNDUP(1).
 
Return fields
XML recordset of the matching record from the items table. See getitem.
 
Note: Field names such as c60 that do not appear in the data dictionary are automatically generated when there are duplicate field names in joined data sets. These field names are not defined in the following table because their meanings vary. The description in the data set tells exactly what the duplicate field is.
 
Example:
<s:AttributeType name='c52' rs:name='department' rs:number='53' rs:nullable='true'
rs:writeunknown='true'>
<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='10'
                rs:fixedlength='true'/>
</s:AttributeType
 
Field
Description
parent
Parent.
department
Department.
category
Category.
item
Item.
item_id
Item ID.
descrip
Description.
gl_no
General ledger number.
user_code
User code.
type_1
Type 1.
type_2
Type 2.
type_3
Type 3.
type_4
Type 4.
type_5
Type 5.
type_6
Type 6.
type_7
Type 7.
type_8
Type 8.
type_9
Type 9.
type_10
Type 10.
security
Security level.
help_info
Help information.
start_show
Start date/time to show.
end_show
End date/time to show.
blackout1s
Blackout 1 start.
blackout1e
Blackout 1 end.
blackout2s
Blackout 2 start.
blackout2e
Blackout 2 end.
blackout3s
Blackout 3 start.
blackout3e
Blackout 3 end.
blackout4s
Blackout 4 start.
blackout4e
Blackout 4 end.
start_time
Start time.
end_time
End time.
show_mon
Special usable on Mondays?
show_tue
Special usable on Tuesdays?
show_wed
Special usable on Wednesdays?
show_thu
Special usable on Thursdays?
show_fri
Special usable on Fridays?
show_sat
Special usable on Saturdays?
show_sun
Special usable on Sundays?
price_type
Price type.
dp_set_id
The set of Dynamic Pricing Rules to apply first.
price_cols
Price columns – 1, 2 or 3
wknd_start
Weekend start.
wknd_end
Weekend end.
rate_sched
Rate schedule.
daily_pric
Daily price.
monday_0
Monday 1.
monday_1
Price during special rate period 1.
monday_2
Price during special rate period 2.
monday_3
Price during special rate period 3.
monday_4
Price during special rate period 4.
monday_5
Price during special rate period 5.
tuesday_0
Default price.
tuesday_1
Price during special rate period 1.
tuesday_2
Price during special rate period 2.
tuesday_3
Price during special rate period 3.
tuesday_4
Price during special rate period 4.
tuesday_5
Price during special rate period 5.
weds_0
Default price.
weds_1
Price during special rate period 1.
weds_2
Price during special rate period 2.
weds_3
Price during special rate period 3.
weds_4
Price during special rate period 4.
weds_5
Price during special rate period 5.
thursday_0
Default price.
thursday_1
Price during special rate period 1.
thursday_2
Price during special rate period 2.
thursday_3
Price during special rate period 3.
thursday_4
Price during special rate period 4.
thursday_5
Price during special rate period 5.
friday_0
Default price.
friday_1
Price during special rate period 1.
friday_2
Price during special rate period 2.
friday_3
Price during special rate period 3.
friday_4
Price during special rate period 4.
friday_5
Price during special rate period 5.
saturday_0
Default price.
saturday_1
Price during special rate period 1.
saturday_2
Price during special rate period 2.
saturday_3
Price during special rate period 3.
saturday_4
Price during special rate period 4.
saturday_5
Price during special rate period 5.
sunday_0
Default price.
sunday_1
Price during special rate period 1.
sunday_2
Price during special rate period 2.
sunday_3
Price during special rate period 3.
sunday_4
Price during special rate period 4.
sunday_5
Price during special rate period 5.
tax_rate
Tax rate.
tax_rate_b
Tax rate is defined in defaults table.
cust_tax
Custom tax rate.
cust_tax_b
Custom tax rate is defined in defaults table.
fee_rate
Fee rate.
add_tax
Add tax.
add_tax_b
Add tax b.
time_span
Time span.
span_type
Span type.
admissions
Admissions.
admprconly
Whether value in admissions field is only for price calculations and not for actual admissions.
min_qty
Minimum quantity to sell.
max_qty
Maximum quantity to sell.
prn_tkt1
Type of layout for Ticket 1.
one_tkt1
Print one Ticket 1, regardless of quantity.
prn_tkt2
Type of layout for Ticket 2.
one_tkt2
Print one Ticket 2, regardless of quantity.
prn_vouch1
Type of layout for Voucher 1.
one_vch1
Print one Voucher 1, regardless of quantity.
prn_vouch2
Type of layout for Voucher 2.
one_vch2
Print one Voucher 2, regardless of quantity.
prn_recpt
Print a receipt for this item?
split_type
Profit center split type – percentage or fill method.
pr_ctr_1
Profit center 1.
pcsplit_1
Profit center split 1.
pr_ctr_2
Profit center 2.
pcsplit_2
Profit center split 2.
pr_ctr_3
Profit center 3.
pcsplit_3
Profit center split 3.
pr_ctr_4
Profit center 4.
pcsplit_4
Profit center split 4.
pr_ctr_5
Profit center 5.
pcsplit_5
Profit center split 5.
pr_ctr_6
Profit center 6.
pcsplit_6
Profit center split 6.
item_type
Item type.
validate
Validate.
validate2
Additional validation.
last_mod
Last modified.
stockt1
Number of pieces of ticket 1 stock.
stockt2
Number of pieces of ticket 2 stock.
stockv1
Number of pieces of voucher 1 stock.
stockv2
Number of pieces of voucher 2 stock.
ckmax4sale
Check Max4Sale capability.
ckpts4sale
Check Points4Sale capability.
pts4saledp
Dynamic Pricing Rule to use to calculate Points4Sale points to deduct.
ckm4s_rt
Perform real-time inventory checking in addition to regular Max4Sale checking?
dw_act
In-House Cards (Debitware) action.
do_on_sale
String of Sales32 commands that can be run at the salespoint when this item is sold.
novalonret
When a “forced validation” item is returned, the salespoint makes sure the pass is valid prior to returning it?
set_price
Set price.
inventory
Inventory.
invent_id
Inventory ID.
barcode
Barcode.
upc
UPC.
keycode
Keycode.
keydescrip
Key description.
vendor_1
Vendor 1.
vendor_2
Vendor 2.
reorder_pt
Re-order point.
target_qty
Target quantity.
max_tod
Number of minutes since midnight that a rental item must be returned by.
min_age
Minimum age.
max_age
Maximum age.
gf_cc
Operator is forced to enter credit card swipe for guest when selling this product.
gf_address
Guest address.
gf_zip
Guest zip.
gf_areacod
Guest area code.
gf_phone
Guest phone.
gf_birthda
Guest birthday.
gf_notes
Guest notes.
gf_number1
Guest number 1.
gf_number2
Guest number 2.
gf_number3
Guest number 3.
gf_number4
Guest number 4.
gf_number5
Guest number 5.
gf_text1
Guest text 1.
gf_text2
Guest text 2.
gf_text3
Guest text 3.
gf_text4
Guest text 4.
gf_text5
Guest text 5.
gf_date1
Guest date 1.
gf_dtime1
Guest date/time 1.
gf_memo1
Guest memo 1.
gf_city
Guest city.
gf_state
Guest state.
revnu_type
Link to the rev_type table for use in the revenue program.
rev_days
For Revenue reporting module.
rev_money
For Revenue reporting module.
rfnd_cond
Refund condition.
i_matrix
If this is an inventory item, does it use a matrix?
gstno_ret
Collect guest number when doing a return so that the return can be associated with the guest.
remote_p1
Should this item be printed on remote printer #1?
remote_p2
Should this item be printed on remote printer #2?
remote_p3
Should this item be printed on remote printer #3?
remote_p4
Should this item be printed on remote printer #4?
rtnvaloptn
Return validation option.
vpartno
Vendor part number.
role_no
Role number.
prevalidat
Pre-validation.
subclass
Subclass.
season
Season.
hidden
Hidden.
meet_reqd
Meeting location required.
gf_height
Guest height.
gf_weight
Guest weight.
mod_reqd
Modifier required?
mod_min
Minimum number of modifiers required to sell.
mod_max
Maximum number of modifiers required to sell.
multiline
Multiline.
do_on_web
String of Sales32 commands that can be run at the salespoint when this item is sold on a web sale.
web_rule
Web Rule.
allow_pah
Allow Print At Home Tickets items.
price_info
Price information. Includes final price, tax and fee information.
dwp_ext
A field that was added to the "price_info" field which is the quantity requested, multiplied by the Debitware preload value.
qty_rem
If <max4sale> is sent as true (<max4sale>1</max4sale>), then information is sent back with the number left to sell at that <datetime>. Otherwise, a - is returned in that field.
avail_info
Values returned as a result of using the <avail> tag. See Note on the <avail> tag.
pts_cost
If <calcpoints> is sent as true (<calcpoints >1</calcpoints>), then information is sent back with the points cost of each item (at qty=1).
price_xml
Price information. If the <pass_no> tag is sent in and the corresponding pass template contains a specials macro (e.g., SELECTLAST()ITEMSPECIAL ("ONLINE ")), then a discounted price is returned in price_xml in the [ext] field. The specials can be any of the following in the macro for the pass template: selectivespecial, globalspecial, itemspecial or special. If the pass is voided or expired, then the discounted price is not returned. The [i2] tag returns the price of an item excluding taxes and before any discounts are applied. See main description of this getitem for an example.
 
Example
 
Example invocation:
<func>getitemexpanded</func><department>FBBAR</department><category>BEER</category><item>BTL-COORS</item><calcprice>1</calcprice>
 
Example return string:
OK :…recordset
<rs:data>
<z:row ord='0' parent='1' department='FBBAR ' category='BEER '
item='BTL-COORS ' item_id='475' descrip='Coors - Bottle '
gl_no=' ' user_code=' '
type_1='True' type_2='True' type_3='True' type_4='True'
type_5='True' type_6='True' type_7='True' type_8='True'
type_9='True' type_10='True' security='0' help_info=''
start_show='2006-10-18T00:00:00' end_show='2999-01-01T00:00:00'
blackout1s='1900-01-01T00:00:00' blackout1e='1900-01-01T00:00:00'
blackout2s='1900-01-01T00:00:00' blackout2e='1900-01-01T00:00:00'
blackout3s='1900-01-01T00:00:00' blackout3e='1900-01-01T00:00:00'
blackout4s='1900-01-01T00:00:00' blackout4e='1900-01-01T00:00:00'
start_time='00:00' end_time='23:59' show_mon='True' show_tue='True'
show_wed='True' show_thu='True' show_fri='True' show_sat='True'
show_sun='True' price_type='0' dp_set_id='0' price_cols='1'
wknd_start='0' wknd_end='0' rate_sched='1' daily_pric='1'
monday_0='2.5' monday_1='0' monday_2='0' monday_3='0'
monday_4='0' monday_5='0' tuesday_0='0' tuesday_1='0'
tuesday_2='0' tuesday_3='0' tuesday_4='0' tuesday_5='0'
weds_0='0' weds_1='0' weds_2='0' weds_3='0' weds_4='0'
weds_5='0' thursday_0='0' thursday_1='0' thursday_2='0'
thursday_3='0' thursday_4='0' thursday_5='0' friday_0='0'
friday_1='0' friday_2='0' friday_3='0' friday_4='0' friday_5='0'
saturday_0='0' saturday_1='0' saturday_2='0' saturday_3='0'
saturday_4='0' saturday_5='0' sunday_0='0' sunday_1='0'
sunday_2='0' sunday_3='0' sunday_4='0' sunday_5='0' tax_rate='2'
tax_rate_b='1' cust_tax='.0000' cust_tax_b='.0000' fee_rate='1'
add_tax='False' add_tax_b='False' time_span='0' span_type='1'
admissions='.00' admprconly='False' min_qty='1' max_qty='999'
prn_tkt1='1' one_tkt1='False' prn_tkt2='1' one_tkt2='False'
prn_vouch1='1' one_vch1='False' prn_vouch2='1' one_vch2='False'
prn_recpt='False' split_type='1' pr_ctr_1='7' pcsplit_1='100'
pr_ctr_2='13' pcsplit_2='0' pr_ctr_3='13' pcsplit_3='0'
pr_ctr_4='13' pcsplit_4='0' pr_ctr_5='13' pcsplit_5='0'
pr_ctr_6='13' pcsplit_6='0' item_type='1' validate='1'
validate2='False' last_mod='1120' stockt1='0' stockt2='0'
stockv1='0' stockv2='0' ckmax4sale='False' ckpts4sale='False'
pts4saledp='0' ckm4s_rt='False' dw_act='1' do_on_sale='IGNOREERRORS()SPECIAL(&#x22;HAPPYHOUR &#x22;)
'
novalonret='False' set_price='False' inventory='False'
invent_id='0' barcode=' ' upc=' '
keycode='0' keydescrip=' ' vendor_1='0' vendor_2='0'
reorder_pt='.00' target_qty='.00' max_tod='0' min_age='.00'
max_age='.00' gf_cc='False' gf_address='False' gf_zip='False'
gf_areacod='False' gf_phone='False' gf_birthda='False'
gf_notes='False' gf_number1='False' gf_number2='False'
gf_number3='False' gf_number4='False' gf_number5='False'
gf_text1='False' gf_text2='False' gf_text3='False' gf_text4='False'
gf_text5='False' gf_date1='False' gf_dtime1='False' gf_memo1='False'
gf_city='False' gf_state='False' revnu_type='0' rev_days='0'
rev_money='0' rfnd_cond='' i_matrix='False' i_tmpnm_id='0'
gstno_ret='False' remote_p1='False' remote_p2='False'
remote_p3='False' remote_p4='False' rtnvaloptn='0' vpartno=' '
role_no='0' prevalidat='False' subclass=' ' season=' '
hidden='False' meet_reqd='False' gf_height='False' gf_weight='False'
mod_reqd='0' mod_min='0' mod_max='99' multiline='False'
do_on_web='' web_rule='' c202='True' c203='True' c204='True'
c205='True' c206='True' c207='True' c208='True' allow_pah='False'
price_info='2.5000,0.1636,0.0000,0.1636,0.0000' price_xml='[ext]2.5000[/ext][tax]0.1636[/tax][fee]0.0000[/fee][txa]0.1636[/txa][txb]0.0000[/txb][dwp]0.0000[/dwp][in]2.5000[/in][sp][/sp]'/>
</rs:data>
 
See also
getitem
getitemtree
getmods
processsale