Commercial Examples

These example calculated attributes are written to use the data defined in the following tables.

For function syntax information and more detailed use cases, refer to the Commercial Functions topic in the Resource Materials online help documentation.

Note: Text used for 'attribute-id' and 'unit-id' is case-sensitive.

The example value templates require the Terms List Type and Terms List defined in the following table:

Term List Type ID = PriceID Terms List ID = TermsListID
Product Name Value Unit - name(id) Min Qty Max Qty Start End

Pink Party Hat

$7.79

$ (iso4217.unit.USD)

1

11

Jan-1-25

Dec-31-25

Pink Party Hat

$2.79

$ (iso4217.unit.USD)

12

24

Jan-1-25

Dec-31-26

Blue Party Hat

£6.79

£ (iso4217.unit.GBP)

1

11

Jan-1-25

Dec-31-27

Blue Party Hat

£3.79

£ (iso4217.unit.GBP)

12

24

Jan-1-25

Dec-31-28

After creating the data above, open the Function Editor. Copy and paste any of the Value Template text below into the Function Editor, select the Object identified, and click the Evaluate button to display the defined Result.

Value Template Object Result
termqtymax('PriceID', '1') 

Blue Party Hat

11

termqtymin('PriceID', '2')

Blue Party Hat

12

termunit('PriceID', '1')

Pink Party Hat

Blue Party Hat

$

£

termunitid('PriceID', '1') 

Pink Party Hat

Blue Party Hat

iso4217.unit.USD

iso4217.unit.GBP

termval('PriceID', '1', '2015-12-31 01:01:01')

Pink Party Hat

$7.79

termval('PriceID', '2', '2015-12-31 01:01:01')

Pink Party Hat

$2.79

termvalid('TermsListID', '2')

Pink Party Hat

$7.79