<?xml version="1.0" encoding="utf-8"?>
<ManualTopic ID="/baanerp/td/onlinemanual/000432" xml:lang="en">
   <Header>
      <Title>CRM – predefined
		variables in the Text Editor</Title>
      <Keyword type="header" order="d1e1643990">
         <Level1>CRM</Level1>
         <Level2>predefined variables in the text editor</Level2>
      </Keyword>
   </Header>
   <AimSection>
      <Paragraph>If you use the Text Editor to define the layout of a letter or
		to create a selection expression, you can use predefined variables.</Paragraph>
   </AimSection>
   <GeneralSection>
      <SectionTitle>General predefined variables for business
		partners/opportunities/contacts/activities</SectionTitle>
      <Paragraph>Within order documents, addresses are stripped off empty fields.
		Such a stripped address is available by using the following fields:</Paragraph>
      <TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated">
         <TBODY noTR="21">
            <TR no="1" isLast="false">
               <TD rowspan="1" colspan="1">cor.nama</TD>
               <TD rowspan="1" colspan="1">First field of Postal
				Address</TD>
            </TR>
            <TR no="2" isLast="false">
               <TD rowspan="1" colspan="1">cor.namb</TD>
               <TD rowspan="1" colspan="1">Second field of Postal
				Address</TD>
            </TR>
            <TR no="3" isLast="false">
               <TD rowspan="1" colspan="1">cor.namc</TD>
               <TD rowspan="1" colspan="1">Third field of Postal
				Address</TD>
            </TR>
            <TR no="4" isLast="false">
               <TD rowspan="1" colspan="1">cor.namd</TD>
               <TD rowspan="1" colspan="1">Fourth field of Postal
				Address</TD>
            </TR>
            <TR no="5" isLast="false">
               <TD rowspan="1" colspan="1">cor.name</TD>
               <TD rowspan="1" colspan="1">Fifth field of Postal
				Address</TD>
            </TR>
            <TR no="6" isLast="false">
               <TD rowspan="1" colspan="1">cor.namf</TD>
               <TD rowspan="1" colspan="1">Sixth field of Postal
				Address</TD>
            </TR>
            <TR no="7" isLast="false">
               <TD rowspan="1" colspan="1">cor.ccty.dsca</TD>
               <TD rowspan="1" colspan="1">Description of Postal Address
				Country</TD>
            </TR>
            <TR no="8" isLast="false">
               <TD rowspan="1" colspan="1">del.nama</TD>
               <TD rowspan="1" colspan="1">First field of Delivery
				Address</TD>
            </TR>
            <TR no="9" isLast="false">
               <TD rowspan="1" colspan="1">del.namb</TD>
               <TD rowspan="1" colspan="1">Second field of Delivery
				Address</TD>
            </TR>
            <TR no="10" isLast="false">
               <TD rowspan="1" colspan="1">del.namc</TD>
               <TD rowspan="1" colspan="1">Third field of Delivery
				Address</TD>
            </TR>
            <TR no="11" isLast="false">
               <TD rowspan="1" colspan="1">del.namd</TD>
               <TD rowspan="1" colspan="1">Fourth field of Delivery
				Address</TD>
            </TR>
            <TR no="12" isLast="false">
               <TD rowspan="1" colspan="1">del.name</TD>
               <TD rowspan="1" colspan="1">Fifth field of Delivery
				Address</TD>
            </TR>
            <TR no="13" isLast="false">
               <TD rowspan="1" colspan="1">del.namf</TD>
               <TD rowspan="1" colspan="1">Sixth field of Delivery
				Address</TD>
            </TR>
            <TR no="14" isLast="false">
               <TD rowspan="1" colspan="1">del.ccty.dsca</TD>
               <TD rowspan="1" colspan="1">Description of Delivery Address
				Country</TD>
            </TR>
            <TR no="15" isLast="false">
               <TD rowspan="1" colspan="1">pad.nama</TD>
               <TD rowspan="1" colspan="1">First field of Private
				Address</TD>
            </TR>
            <TR no="16" isLast="false">
               <TD rowspan="1" colspan="1">pad.namb</TD>
               <TD rowspan="1" colspan="1">Second field of Private
				Address</TD>
            </TR>
            <TR no="17" isLast="false">
               <TD rowspan="1" colspan="1">pad.namc</TD>
               <TD rowspan="1" colspan="1">Third field of Private
				Address</TD>
            </TR>
            <TR no="18" isLast="false">
               <TD rowspan="1" colspan="1">pad.namd</TD>
               <TD rowspan="1" colspan="1">Fourth field of Private
				Address</TD>
            </TR>
            <TR no="19" isLast="false">
               <TD rowspan="1" colspan="1">pad.name</TD>
               <TD rowspan="1" colspan="1">Fifth field of Private
				Address</TD>
            </TR>
            <TR no="20" isLast="false">
               <TD rowspan="1" colspan="1">pad.namf</TD>
               <TD rowspan="1" colspan="1">Sixth field of Private
				Address</TD>
            </TR>
            <TR no="21" isLast="true">
               <TD rowspan="1" colspan="1">pad.ccty.dsca</TD>
               <TD rowspan="1" colspan="1">Description of Private Address
				Country</TD>
            </TR>
         </TBODY>
      </TABLE>
   </GeneralSection>
   <GeneralSection>
      <SectionTitle>Predefined variables for business partners</SectionTitle>
      <TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated">
         <TBODY noTR="12">
            <TR no="1" isLast="false">
               <TD rowspan="1" colspan="1">pldd_mcs034.dsca</TD>
               <TD rowspan="1" colspan="1">Description of
				Price List</TD>
            </TR>
            <TR no="2" isLast="false">
               <TD rowspan="1" colspan="1">pcpr_com010.nama</TD>
               <TD rowspan="1" colspan="1">Name of Parent Customer
				for Prices/Discounts</TD>
            </TR>
            <TR no="3" isLast="false">
               <TD rowspan="1" colspan="1">pctx_com010.nama</TD>
               <TD rowspan="1" colspan="1">Name of Parent
				Customer for Texts</TD>
            </TR>
            <TR no="4" isLast="false">
               <TD rowspan="1" colspan="1">pctf_com010.nama</TD>
               <TD rowspan="1" colspan="1">Name of Parent
				Customer for Finance</TD>
            </TR>
            <TR no="5" isLast="false">
               <TD rowspan="1" colspan="1">ccus_com010.nama</TD>
               <TD rowspan="1" colspan="1">Name of Parent
				Customer for Statistics Update</TD>
            </TR>
            <TR no="6" isLast="false">
               <TD rowspan="1" colspan="1">iscn_com000.nama</TD>
               <TD rowspan="1" colspan="1">Name 1
				of Affiliated Company</TD>
            </TR>
            <TR no="7" isLast="false">
               <TD rowspan="1" colspan="1">iscn_com000.namb</TD>
               <TD rowspan="1" colspan="1">Name 2 of
				Affiliated Company</TD>
            </TR>
            <TR no="8" isLast="false">
               <TD rowspan="1" colspan="1">iscn_com000.namc</TD>
               <TD rowspan="1" colspan="1">Address 1 of
				Affiliated Company</TD>
            </TR>
            <TR no="9" isLast="false">
               <TD rowspan="1" colspan="1">iscn_com000.namd</TD>
               <TD rowspan="1" colspan="1">Address 2 of
				Affiliated Company</TD>
            </TR>
            <TR no="10" isLast="false">
               <TD rowspan="1" colspan="1">iscn_com000.name</TD>
               <TD rowspan="1" colspan="1">City 1 of
				Affiliated Company</TD>
            </TR>
            <TR no="11" isLast="false">
               <TD rowspan="1" colspan="1">iscn_com000.namf</TD>
               <TD rowspan="1" colspan="1">City 2 of
				Affiliated Company</TD>
            </TR>
            <TR no="12" isLast="true">
               <TD rowspan="1" colspan="1">iscn_com000.pstc</TD>
               <TD rowspan="1" colspan="1">ZIP Code of
				Affiliated Company</TD>
            </TR>
         </TBODY>
      </TABLE>
   </GeneralSection>
   <GeneralSection>
      <SectionTitle>Predefined variables for opportunities</SectionTitle>
      <TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated">
         <TBODY noTR="8">
            <TR no="1" isLast="false">
               <TD rowspan="1" colspan="1">mprj_com001.nama</TD>
               <TD rowspan="1" colspan="1">Name of Assigned
				To</TD>
            </TR>
            <TR no="2" isLast="false">
               <TD rowspan="1" colspan="1">mprj_com012.nama</TD>
               <TD rowspan="1" colspan="1">Name A of Postal
				Address</TD>
            </TR>
            <TR no="3" isLast="false">
               <TD rowspan="1" colspan="1">mprj_com012.namb</TD>
               <TD rowspan="1" colspan="1">Name B of Postal
				Address</TD>
            </TR>
            <TR no="4" isLast="false">
               <TD rowspan="1" colspan="1">mprj_com012.namc</TD>
               <TD rowspan="1" colspan="1">Address A of Postal
				Address</TD>
            </TR>
            <TR no="5" isLast="false">
               <TD rowspan="1" colspan="1">mprj_com012.namd</TD>
               <TD rowspan="1" colspan="1">Address B of Postal
				Address</TD>
            </TR>
            <TR no="6" isLast="false">
               <TD rowspan="1" colspan="1">mprj_com012.name</TD>
               <TD rowspan="1" colspan="1">City A of Postal
				Address</TD>
            </TR>
            <TR no="7" isLast="false">
               <TD rowspan="1" colspan="1">mprj_com012.namf</TD>
               <TD rowspan="1" colspan="1">City B of Postal
				Address</TD>
            </TR>
            <TR no="8" isLast="true">
               <TD rowspan="1" colspan="1">mprj_com012.pstc</TD>
               <TD rowspan="1" colspan="1">ZIP Code of Postal
				Address</TD>
            </TR>
         </TBODY>
      </TABLE>
   </GeneralSection>
   <GeneralSection>
      <SectionTitle>Predefined variables for contacts</SectionTitle>
      <TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated">
         <TBODY noTR="17">
            <TR no="1" isLast="false">
               <TD rowspan="1" colspan="1">cper_mcs122.dsca</TD>
               <TD rowspan="1" colspan="1">Description of
				Attention</TD>
            </TR>
            <TR no="2" isLast="false">
               <TD rowspan="1" colspan="1">cper_mcs046.dsca</TD>
               <TD rowspan="1" colspan="1">Description of
				Language</TD>
            </TR>
            <TR no="3" isLast="false">
               <TD rowspan="1" colspan="1">cper_mcs019.dsca</TD>
               <TD rowspan="1" colspan="1">Description of
				Title</TD>
            </TR>
            <TR no="4" isLast="false">
               <TD rowspan="1" colspan="1">wadr_com012.nama</TD>
               <TD rowspan="1" colspan="1">Name A of Work
				Address</TD>
            </TR>
            <TR no="5" isLast="false">
               <TD rowspan="1" colspan="1">wadr_com012.namb</TD>
               <TD rowspan="1" colspan="1">Name B of Work
				Address</TD>
            </TR>
            <TR no="6" isLast="false">
               <TD rowspan="1" colspan="1">wadr_com012.namc</TD>
               <TD rowspan="1" colspan="1">Address A of Work
				Address</TD>
            </TR>
            <TR no="7" isLast="false">
               <TD rowspan="1" colspan="1">wadr_com012.namd</TD>
               <TD rowspan="1" colspan="1">Address B of Work
				Address</TD>
            </TR>
            <TR no="8" isLast="false">
               <TD rowspan="1" colspan="1">wadr_com012.name</TD>
               <TD rowspan="1" colspan="1">City A of Work
				Address</TD>
            </TR>
            <TR no="9" isLast="false">
               <TD rowspan="1" colspan="1">wadr_com012.namf</TD>
               <TD rowspan="1" colspan="1">City B of Work
				Address</TD>
            </TR>
            <TR no="10" isLast="false">
               <TD rowspan="1" colspan="1">wadr_com012.pstc</TD>
               <TD rowspan="1" colspan="1">ZIP Code of Work
				Address</TD>
            </TR>
            <TR no="11" isLast="false">
               <TD rowspan="1" colspan="1">padr_com012.nama</TD>
               <TD rowspan="1" colspan="1">Name A of Private
				Address</TD>
            </TR>
            <TR no="12" isLast="false">
               <TD rowspan="1" colspan="1">padr_com012.namb</TD>
               <TD rowspan="1" colspan="1">Name B of Private
				Address</TD>
            </TR>
            <TR no="13" isLast="false">
               <TD rowspan="1" colspan="1">padr_com012.namc</TD>
               <TD rowspan="1" colspan="1">Address A of Private
				Address</TD>
            </TR>
            <TR no="14" isLast="false">
               <TD rowspan="1" colspan="1">padr_com012.namd</TD>
               <TD rowspan="1" colspan="1">Address B of Private
				Address</TD>
            </TR>
            <TR no="15" isLast="false">
               <TD rowspan="1" colspan="1">padr_com012.name</TD>
               <TD rowspan="1" colspan="1">City A of Private
				Address</TD>
            </TR>
            <TR no="16" isLast="false">
               <TD rowspan="1" colspan="1">padr_com012.namf</TD>
               <TD rowspan="1" colspan="1">City B of Private
				Address</TD>
            </TR>
            <TR no="17" isLast="true">
               <TD rowspan="1" colspan="1">padr_com012.pstc</TD>
               <TD rowspan="1" colspan="1">ZIP Code of Private
				Address</TD>
            </TR>
         </TBODY>
      </TABLE>
   </GeneralSection>
   <GeneralSection>
      <SectionTitle>Predefined variables for activities</SectionTitle>
      <TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated">
         <TBODY noTR="6">
            <TR no="1" isLast="false">
               <TD rowspan="1" colspan="1">acti_smi002.dsca</TD>
               <TD rowspan="1" colspan="1">Description of
				Source</TD>
            </TR>
            <TR no="2" isLast="false">
               <TD rowspan="1" colspan="1">acti_smi003.dsca</TD>
               <TD rowspan="1" colspan="1">Description of
				Phase</TD>
            </TR>
            <TR no="3" isLast="false">
               <TD rowspan="1" colspan="1">acti_smi004.dsca</TD>
               <TD rowspan="1" colspan="1">Description of
				Jobtitle</TD>
            </TR>
            <TR no="4" isLast="false">
               <TD rowspan="1" colspan="1">acti_smi006.dsca</TD>
               <TD rowspan="1" colspan="1">Description of
				Attention</TD>
            </TR>
            <TR no="5" isLast="false">
               <TD rowspan="1" colspan="1">empl_com001.nama</TD>
               <TD rowspan="1" colspan="1">Name of
				Employee</TD>
            </TR>
            <TR no="6" isLast="true">
               <TD rowspan="1" colspan="1">crep_com001.nama</TD>
               <TD rowspan="1" colspan="1">Name of Sales
				Representative</TD>
            </TR>
         </TBODY>
      </TABLE>
   </GeneralSection>
   <GeneralSection ID="selection_expression_variable">
      <SectionTitle>Predefined variable for selection expressions</SectionTitle>
      <TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated">
         <TBODY noTR="1">
            <TR no="1" isLast="true">
               <TD rowspan="1" colspan="1">bp.turnover.previous.year</TD>
               <TD rowspan="1" colspan="1">The
				turnover from the <GUIRef href="/baanerp/tc/com/tccom4513s000" role="session">Invoice-to Business Partner Balances (tccom4513s000)</GUIRef> session. <List>
                     <ListIntro>This value represents last year's turnover for all
					 departments that belong to the financial company of:</ListIntro>
                     <ListItem>The sales office that is linked to the business
					 partner.</ListItem>
                     <ListItem>The current logistic company if this company is also a
					 financial company and no sales office is linked to the business partner.</ListItem>
                  </List>
               </TD>
            </TR>
         </TBODY>
      </TABLE>
      <ExampleSection>
         <SectionTitle>Example</SectionTitle>
         <Paragraph>bp.turnover.previous.year &lt; 15000.00 and
		  bp.turnover.previous.year &gt; 0.0</Paragraph>
      </ExampleSection>
      <Paragraph>Based on the selection expression, business partners that match
		the turnover criteria can be retrieved in the <GUIRef href="/baanerp/td/smi/tdsmi2410m000" role="session">Mail Merge by Standard Letter (tdsmi2410m000)</GUIRef> and <GUIRef href="/baanerp/td/smi/tdsmi2410m100" role="session">Flexible Printing (tdsmi2410m100)</GUIRef> sessions. You can, for example, send a letter to all
		business partners with a turnover value below 15000 and above 0.</Paragraph>
      <List>
         <ListIntro>The following limitations apply to the turnover:</ListIntro>
         <ListItem>The turnover value of only one financial company is calculated.
		  Turnover of multiple financial companies are not totalized.</ListItem>
         <ListItem>For a business partner, only one record can be retrieved from
		  the <GUIRef href="/baanerp/tc/com/tccom4513s000" role="session">Invoice-to Business Partner Balances (tccom4513s000)</GUIRef> session.</ListItem>
      </List>
   </GeneralSection>
   <RelatedTopics>
      <SectionTitle>Related topics</SectionTitle>
      <RelTopic>
         <Link href="/baanerp/td/onlinemanual/000430" role="manual">
            <GUIRef href="/baanerp/crm" role="package">CRM</GUIRef> – Text Editor</Link>
      </RelTopic>
      <RelTopic>
         <Link href="/baanerp/td/onlinemanual/000422" role="manual">
            <GUIRef href="/baanerp/crm" role="package">CRM</GUIRef> – overview</Link>
      </RelTopic>
   </RelatedTopics>
</ManualTopic>