We’ve developed some resources to help you work effectively from home during COVID-19 Click to learn more

Creating Quote templates

In this article

    All available Merge Fields in the SuperOffice quote system

    from the document in SO_Arc: ProductTemplateAllTemplateVariables.docx

    Prerequisites for testing

    If you want to try out all tags, then you must first use the Quote Settings in Admin to enable all fields. Fields on Quote Line that are not enabled will have blank values for their tags – even if you add data to the database manually.

    Numeric and date data, culture settings

    Numeric tags that have decimal values (all amounts and percentages) have four variants of the tag, with different formats. The decimal separator is always according to the selected language/culture (dropdowns in the Send Quote and Order Confirmation dialogs). The number of decimals is either the default, or 0, 2 or 5 depending on the tag name suffix. Thus, line/totalPrice:2 will force 2 decimals, while line/totalPrice will have whatever the default number of decimals is for the culture.

    Date/time tags have a similar set of variants. The tag alone will produce a «short date», with the variants :ShortDate, :ShortTime, :ShortDateTime, :LongDate, :LongTime and :LongDateTime also available. The actual formatting (day/month order, etc.) is always according to the selected culture.

    Culture is selected by the user in the Send Quote and Place Order dialogs; the language chosen there directs the system to the correct template subfolder (English template vs. German). It also sets the .NET Culture used for the numeric and date formatting. However, some times the culture is not completely specified, such as German – do you mean Germany, or Switzerland, with different number formats‌.

    In such cases it is possible to include the merge field Culture: in the template, specifying a .NET culture code, taken from http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo%28v=vs.80%29.aspx (do not use http://msdn.microsoft.com/en-us/library/ee825488%28v=cs.20%29.aspx as a reference, there are slight differences). For Switzerland, use «Culture:de-CH», and you will get the Swiss number formats regardless of the users’ choice. This implies that such a culture code should be embedded in a special template called «Offer to Swiss customers» or something similar. Arabic-Kuwait (ar-KW) will give you 23 ﺳﺒﺘﻤﺒﺮ, 2013 as the quote/sent:LongDate.

    Tables and nesting

    Table names are quote, alternative, group and line – nested in this order. Tags for a particular table are available from that table’s TableStart: tag on downwards; it’s possible to use (for instance) the quote/currency tag when inside a TableStart:line level.

    Every template must conform to the nesting order and always start with the outermost level (quote); it need not go all the way down, but cannot start with alternative or anything else than quote.

    Grouping

    Templates support grouping, which is a user-defined level in between alternative and line. Grouping is activated using a special tag, GroupBy:xxx, where xxx is (in principle) any string field on the line level (but without the line/ prefix). As an example, you can use GroupBy:productFamilyKey to activate grouping by product family.

    The GroupBy: tag is case sensitive and can be located anywhere in the document. At runtime it will disappear (no text is inserted in its place). There can be at most one GroupBy: tag in a template.

    If GroupBy is present, then TableStart:group and TableEnd:group can be used to mark the start and end of group-related sections. group/groupField is a tag that will contain the value of the group field (productFamily in the example above), and the part of the document between TableStart:group and TableEnd:group will be repeated for each distinct value of the group field.

    It is possible to have more than one set of TableStart:group / TableEnd:group sections, for instance if you want a summary table with just the sums, and elsewhere tables with the lines that actually make up each group. In this case, the summary table would not contain an inner TableStart:line / TableEnd:line.

    Order of lines

    Quote lines are, by default, listed in rank order, which is the same that you see in the quote line archives. If grouping is used, then groups come in alphabetical order, and the lines that belong to each group come in rank order.

    The OrderBy:xxx tag can be used to change the order of quote lines. Similarly to GroupBy:, it is case sensitive and can occur at most once, anywhere within the document. It can refer to any field on the line level, without the line/ prefix. Example: OrderBy:vatInfo to sort lines by the VAT status. Only one level of sorting is supported.

    Main document vs. Quote details

    The tags for the details (lines, prices etc.) of the quote are generally in a document template separate from the «Quote Main Document», the document that the sales rep writes and that is a cover letter for the whole quote.

    If only the Main Document or the Details Document is chosen for the email, then it is generated and rendered as a PDF and included. However, if both documents exist, there are two possibilities:

    1. The merge field  MERGEFIELD  QuoteDetails  \* MERGEFORMAT «QuoteDetails» is found somewhere within the Main Document. If so, then the Details Document will be inserted at that point
    2. No such merge field exists in the Main Document. The Details Document is appended at the end of the Main Document

    In both cases, a single PDF results, and will be attached to the email.

    VAT

    When you want to correctly calculate VAT you must first subtract ALL discounts, including alternative discount (order discount). This must be done for each quoteline (product).

    We call this the “Total price with alternative discount”.

    We multiply the “Total price with alternative discount” with the VAT (-Percentage). The resulting number we call “VATAmount”.

    These values are summed up into the alternatives VATAmount field.

    Finally, the alternatives TotalPrice and the alternatives VATAmount are then added together into the field we call “TotalPriceIncVAT”.

     

    Sale / Quote / Version

    «TableStart:quote»

    Merge field tag

    Name

    Description

    «quote/contactDepartment» 

    Sale - Owning department

    Name of the department at the company the user belongs to

    «quote/contactName» 

    Sale - Owning company

    Name of the company the user belongs to

    «quote/currency» 

    Sale – Currency

    The currency of the sale

    «quote/description» 

    Description

    Description of the quote version

    «quote/expiration» 

    Expiration

    The last date that the quote is valid

    «quote/saleType»

    Sale – sale type

    The sale type of the sale

    «quote/extraField1»

    Extra field 1

    One of the extra fields on the product; meaning is installation dependent

    «quote/extraField2»

    Extra field 2

    One of the extra fields on the product; meaning is installation dependent

    «quote/extraField3»

    Extra field 3

    One of the extra fields on the product; meaning is installation dependent

    «quote/extraField4»

    Extra field 4

    One of the extra fields on the product; meaning is installation dependent

    «quote/extraField5»

    Extra field 5

    One of the extra fields on the product; meaning is installation dependent

    «quote/fullName»

    Sale - Full name

    Displays full name of user (first, middle, last - according to settings)

    «quote/mrMrs»

    Sale - Mr/Ms

    Displays whether the contact is addressed as Mr or Ms

    «quote/number»

    Number

    Reference number for the quote version

    «quote/orderComment»

    Comment

    Customer's comment

    «quote/paymentTerms»

    Payment terms

    Payment terms

    «quote/paymentType»

    Payment type

    Payment type

    «quote/deliveryTerms»

    Delivery terms

    Delivery terms

    «quote/deliveryType»

    Delivery type

    Delivery type

    «quote/approvedBy»

    Approved by

    Associate who approved a Quote that broke one or more of the workflow rules that trigger an approval process

    «quote/approvalRegisteredBy»

    Approval reg by

    Associate who entered the approval (not necessarily the one who approved!) of a Quote that broke one or more of the workflow rules that trigger an approval process

    «quote/approvedText»

    Approval comment

    Comment added to the approval of a Quote that broke one or more of the workflow rules that trigger an approval process

    «quote/approvedDate»

    Approved date

    Date of approval of a Quote that broke one or more of the workflow rules that trigger an approval process

    «quote/poNumber»

    P.O.Number

    Customer's purchase order number

    «Image:quote/portraitThumbnail»

    Sale - Portrait

    Portrait of sale’s associate – note the Image: prefix, without it you will get a lot of funny letters & digits

    «quote/quoteId»

    Quote Id

    SuperOffice database id of quote record

    «quote/quoteVersionId»

    ID

    Database ID of QuoteVersion record

    «quote/saleAmount»

    Sale - Amount

    The gross sales total

    «quote/saleDescription»

    Sale - Text

    Displays the text entered in the description field

    «quote/saleEarning»

    Sale - Profit

    Gross profit (gross sales total - cost) for the sale

    «quote/saleEarningPercent»

    Sale - Profit as %:

    The profit as a percentage of the gross sales total

    «quote/saleHeading»

    Sale - Sale

    Displays a descriptive text for the item

    «quote/saleNumber»

    Sale - Number

    Number

    «quote/sent»

    Sent

    Quote sent date

    «quote/title»

    Sale - Title

    Displays whether the contact is addressed as Mr or Ms

     

    Alternative

    «TableStart:alternative»

    Merge field tag

    Name

    Description

    «alternative/description»

    Description

    Description of the quote alternative

    «alternative/discountAmount»

    Discount

    Enter total discount for entire alternative

    «alternative/discountPercent»

    Discount %

    Enter discount in percent for entire alternative

    «alternative/earningAmount»

    Earnings

    Total Earning of all lines in the quote alternative, including all discounts

    «alternative/earningPercent»

    Earnings %

    Total Earning as a percentage of the total price, of all lines in the quote alternative, including all discounts

    «alternative/erpDiscountAmount»

    ERP Discount

    Discount amount suggested by ERP system

    «alternative/erpDiscountPercent»

    ERP Discount %

    Discount percentage suggested by ERP system

    «alternative/extraField1»

    Extra 1

    Extra field 1 on the quote alternative

    «alternative/extraField2»

    Extra 2

    Extra field 2 on the quote alternative

    «alternative/extraField3»

    Extra 3

    Extra field 3on the quote alternative

    «alternative/extraField4»

    Extra 4

    Extra field 4 on the quote alternative

    «alternative/extraField5»

    Extra 5

    Extra field 5 on the quote alternative

    «alternative/name»

    Name

    Name of the quote alternative

    «alternative/numLines»

    Number of lines

    Number of lines in alternative

    «alternative/quoteAlternativeId»

    QuoteAlternative Id

    SuperOffice database id of QuoteAlternative record

    «alternative/quoteVersionId»

    ID

    Database ID of QuoteVersion record

    «alternative/sumDiscountAmount»

    Sum of discounts

    Sum of all discounts in alternative

    «alternative/subTotal»

    Sub total

    Sum of all the quotelines Totalprice, which is the same as alternative.totalPrice + alternative.discountAmount

    «alternative/totalPrice»

    Total

    Total price of all items in the quote alternative, including all discounts

    «alternative/vatInfo»

    VAT Info

    Information about value-added and other taxes

    «alternative/vat»

    VAT

    Value-added and other tax, total amount

    «alternative/vatAmount»

    VAT

    Value-added and other tax, total amount. The quoteline VAT field is interpreted as a percentage and used to calculate from the line-total

    «alternative/totalPriceIncVAT»

    Total

    Total price of all items in the quote alternative, including all discounts and VAT

     

    Group (user-selectable on Sale Type)

    «GroupBy:productFamilyKey»«TableStart:group»

    Merge field tag

    Name

    Description

    «group/sumDiscountAmount»

    Sum of discounts

    Sum of all discounts in the group

    «group/sumtotalPrice»

    Sum of price

    Total price of all lines in the group

    «group/sumVat»

    Sum of VAT

    Sum of VAT of all lines in the group

    «group/numLines»

    Number of lines

    Number of lines in the group

    «group/groupField»

    Group field value

    The value of whatever field has been designated the group field

     

    Line

    «TableStart:line»

    Merge field tag

    Name

    Description

    «line/code»

    Code

    The product or article code. This code is created to help you quickly find products you offer regularly.

    «line/description»

    Description

    Description of the product that is offered

    «line/discountAmount»

    Discount

    Discount amount given by salesperson

    «line/discountPercent»

    Discount (%)

    Discount percent given by salesperson

    «line/earningAmount»

    Earning

    Amount of Earning (Total - Cost) on the line, after discount

    «line/earningPercent»

    Earning (%)

    Percentage Earnings on the line (Total - Cost / Total), after discount

    «line/name»

    Name

    The name of the product that is being offered

    «line/priceUnit»

    Price unit

    What is the price unit defined in

    «line/PriceUnitSubscriptionQuantityUnit»

    Expanded unit

    Price unit @ subscription quantity + unit

    «line/PriceUnitSubscriptionUnit»

    P/S Unit

    Price unit/subscription unit

    «line/productCategoryKey»

    Product category

    The category the product is defined in

    «line/productFamilyKey»

    Product family

    The family the product is defined in

    «line/productTypeKey»

    Product type

    The type of product

    «line/quantity»

    Quantity

    The amount that is offered

    «line/quantityUnit»

    Unit

    The unit of the product that is offered.

    «line/quoteAlternativeId»

    Alternative ID

    The database identity of the quote alternative

    «Image:line/quoteLineThumbnail»

    Thumbnail

    A miniature version of the product picture – note the Image: prefix, without it you will get a lot of funny letters & digits

    «line/rank»

    Rank

    Shows the rank of a quote line

    «line/status»

    Quote status

    Status field showing the status of each line.

    «line/subTotal»

    SubTotal

    List price * Quantity, and if the quoteline is a subscription, we also multiply in the SubscriptionQuantity.

    «line/totalPrice»

    Total

    SubTotal - Discount Amount

    «line/totalPriceWithAlternativeDiscount»

    Total with alternative discount

    TotalPrice * (1 – (Alternative.DiscountPercent / 100))

    «line/totalPriceIncVAT»

    Total inc VAT

    TotalPrice + VAT

    «line/unitCost»

    Cost

    Cost per item.

    «line/unitListPrice»

    Unit list price

    List price of a unit

    «line/UnitListPriceSubscriptionQuantity»

    Subscription unit list

    price

    Unit price * subscription quantity

    «line/unitMinimumPrice»

    Unit minimum price

    Minimum price per item. Users are not allowed to send quotes with prices lower than the minimum price.

    «line/url»

    Web address

    The web address of the product info.

    «line/vatInfo»

    VAT info

     

    «line/vat»

    VAT

    May be filled out by the ERP system. (Should be the VAT percentage, but can be the amount)

    «line/vatAmount»

    VAT

    Will be the VAT amount

    «line/supplier»

    Supplier

    Supplier

    «line/supplierCode»

    Supplier code

    Supplier code

    «line/isSubscription»

    Subscription?

    Is this line a subscription line

    «line/subscriptionUnit»

    Subscription unit

    Subscription lines have an additional unit, usually a time (month, week quarter etc.), so you can sell n tons / m months

    «line/subscriptionStart»

    Subscription start

    Start date of subscription

    «line/subscriptionQuantity»

    Subscription quantity

    The quantity tied to the subscription unit, as opposed to the quantity tied to the price/sale units

    «line/itemNumber»

    Item number

    Item number

    «line/extraField1»

    Extra field 1

    The installation-defined extra field 1

    «line/extraField2»

    Extra field 2

    The installation-defined extra field 2

    «line/extraField3»

    Extra field 3

    The installation-defined extra field 3

    «line/extraField4»

    Extra field 4

    The installation-defined extra field 4

    «line/extraField5»

    Extra field 5

    The installation-defined extra field 5

    «TableEnd:line»

    «TableEnd:group»

    «TableEnd:alternative»

    «TableEnd:quote»