Jump to: navigation, search
(Created target blank page For Version: PSAAS:Public)
 
(Update with the copy of version: 8.5.0)
 
Line 1: Line 1:
<!-- Creation of the target page -->
+
= Field Code Variables=
 +
__NOTOC__
 +
 
 +
Using Field Code Variables includes:
 +
 
 +
* [[variables#Using_UCS_Data_as_System_Variables_in_Standard_Responses|Using UCS Data as System Variables in Standard Responses]]
 +
 
 +
* [[variables#Custom_Variables|Custom Variables]]
 +
 
 +
* [[variables#Using_Your_Own_Data_in_Standard_Responses|Using Your Own Data in Standard Responses]]
 +
 
 +
==Using UCS Data as System Variables in Standard Responses==
 +
 
 +
In the example given in [[fieldcode|Field Codes Overview]], the <tt>Contact.FirstName</tt> retrieves a piece of data about the interaction. The ability to access interaction data is perhaps the most frequent use of field codes. Although field code formulas can be very complicated, many simply retrieve a single piece of data, such as a contact’s name.
 +
 
 +
You access Universal Contact Server data using predefined variables, called "system variables."
 +
 
 +
These variables access three predefined objects. Each object has a name and a set of properties. In the example, <tt>Contact</tt> is an object and <tt>FirstName</tt> is one of its properties. The system variable <tt>Contact</tt>.  <tt>FirstName</tt> retrieves the value of the <tt>FirstName</tt> property of the <tt>Contact</tt> object.
 +
 
 +
In similar fashion, there is a system variable for each <tt>object+property</tt> pair. The objects and properties that you can use in field code formulas are described in the following sections.
 +
 
 +
===Interaction===
 +
This object represents the particular interaction being worked on, such as an inbound e-mail. These are its properties:<br/>
 +
<ul>
 +
<li>
 +
<tt>Id</tt>
 +
<br/>
 +
</li>
 +
<li>
 +
<tt>DateCreated</tt>
 +
<br/>
 +
</li>
 +
<li>
 +
<tt>Subject</tt>
 +
<br/>
 +
</li>
 +
<li>
 +
<tt>ToAddress</tt>
 +
<br/>
 +
</li>
 +
<li>
 +
<tt>FromAddress</tt>
 +
<br/>
 +
</li>
 +
<li>
 +
<tt>AttachedData</tt>
 +
<br/>
 +
</li>
 +
<li>
 +
<tt>TimeZone</tt>
 +
<br/>
 +
</li>
 +
</ul>
 +
 
 +
===Contact===
 +
This object represents the contact associated with the interaction being worked on. These are its properties:<br/>
 +
<ul>
 +
<li>
 +
<tt>Id</tt>
 +
<br/>
 +
</li>
 +
<li>
 +
<tt>Title</tt>
 +
<br/>
 +
</li>
 +
<li>
 +
<tt>FirstName</tt>
 +
<br/>
 +
</li>
 +
<li>
 +
<tt>LastName</tt>
 +
<br/>
 +
</li>
 +
<li>
 +
<tt>FullName</tt>
 +
<br/>
 +
</li>
 +
<li>
 +
<tt>PrimaryPhoneNumber</tt>
 +
<br/>
 +
</li>
 +
<li>
 +
<tt>PrimaryEmailAddress</tt>
 +
<br/>
 +
</li>
 +
</ul>
 +
 
 +
===Agent===
 +
This object represents the agent working on the interaction. These are its properties:<br/>
 +
<ul>
 +
<li>
 +
<tt>FirstName</tt>
 +
<br/>
 +
</li>
 +
<li>
 +
<tt>LastName</tt>
 +
<br/>
 +
</li>
 +
<li>
 +
<tt>FullName</tt>
 +
<br/>
 +
</li>
 +
<li>
 +
<tt>Signature</tt>
 +
<br/>
 +
</li>
 +
 
 +
{{NoteFormat|Automated responses use the default agent. Create the default agent as a Person object just like any other in Configuration Manager. Then select this Person on the Automated Reply Agent screen of the E-mail Server configuration wizard (or set this Person as the value of the autobot-agent-login-name option in the E-Mail Processing section of the E-mail Server Java application). Since this is the Person who the automated response appears to be from, you may want to name it after your company or institution. }}
 +
</ul>
 +
 
 +
==Custom Variables==
 +
 
 +
In addition to the system variables, you can use Knowledge Manager to create custom variables. Custom variables have the following properties:<br/>
 +
<ul>
 +
<li>
 +
Their values are assigned by strategy objects.<br/>
 +
</li>
 +
<li>
 +
Therefore, standard responses that use field codes containing custom variables must have the usage type Autoresponse
 +
or Acknowledgment.
 +
<br/>
 +
</li>
 +
</ul>
 +
For an example of the use of a custom variable in a standard response, see [[FCexmpls#Using_a_Custom_Variable|Using a Custom Variable]].
 +
<br/>
 +
<!-- Available styles: (default)-Important, 2-Tip, 3-Warning -->
 +
{{NoteFormat|The names of custom variables must begin with an alphabetic character or underscore, and the remainder of the name must consist only of alphanumeric characters or underscores. This differs from the requirements for the names of other Knowledge Manager objects, which may also contain hyphen and space. For example, 5-usercode is not an acceptable name for a custom variable, but it is acceptable as the name of a screening rule or category.}}
 +
 
 +
==Using Your Own Data in Standard Responses==
 +
 
 +
It is possible to incorporate data that you keep external to Universal Contact Server into your standard responses (including automated responses). This data could include case numbers, account information, and so on. Remember that attached data always consists of key-value pairs.<br/>
 +
 
 +
Incorporating external data into standard responses is a two-step process:<br/>
 +
<ol>
 +
<li>
 +
Retrieve the external information and add it to the interaction as attached data. One place to do this is in a routing strategy.<br/>
 +
</li>
 +
<li>
 +
Now that you have attached the data to the interaction, you can use the <tt>AttachedData</tt>
 +
property of the Interaction object to access the data and incorporate it into your standard response. The <tt>AttachedData</tt> property requires one argument, which is the key name. The result of the following formula is the value associated with the <tt>OrderStatus</tt> attached-data key:<br/>
 +
</li>
 +
</ol>
 +
<ul><ul>
 +
<tt><$Interaction.AttachedData("OrderStatus")$></tt>
 +
</ul></ul>
 +
 
 +
[[Category:V:PSAAS:Public]]

Latest revision as of 13:39, August 10, 2017

Field Code Variables

Using Field Code Variables includes:

Using UCS Data as System Variables in Standard Responses

In the example given in Field Codes Overview, the Contact.FirstName retrieves a piece of data about the interaction. The ability to access interaction data is perhaps the most frequent use of field codes. Although field code formulas can be very complicated, many simply retrieve a single piece of data, such as a contact’s name.

You access Universal Contact Server data using predefined variables, called "system variables."

These variables access three predefined objects. Each object has a name and a set of properties. In the example, Contact is an object and FirstName is one of its properties. The system variable Contact. FirstName retrieves the value of the FirstName property of the Contact object.

In similar fashion, there is a system variable for each object+property pair. The objects and properties that you can use in field code formulas are described in the following sections.

Interaction

This object represents the particular interaction being worked on, such as an inbound e-mail. These are its properties:

  • Id
  • DateCreated
  • Subject
  • ToAddress
  • FromAddress
  • AttachedData
  • TimeZone

Contact

This object represents the contact associated with the interaction being worked on. These are its properties:

  • Id
  • Title
  • FirstName
  • LastName
  • FullName
  • PrimaryPhoneNumber
  • PrimaryEmailAddress

Agent

This object represents the agent working on the interaction. These are its properties:

  • FirstName
  • LastName
  • FullName
  • Signature
  • Important
    Automated responses use the default agent. Create the default agent as a Person object just like any other in Configuration Manager. Then select this Person on the Automated Reply Agent screen of the E-mail Server configuration wizard (or set this Person as the value of the autobot-agent-login-name option in the E-Mail Processing section of the E-mail Server Java application). Since this is the Person who the automated response appears to be from, you may want to name it after your company or institution.

Custom Variables

In addition to the system variables, you can use Knowledge Manager to create custom variables. Custom variables have the following properties:

  • Their values are assigned by strategy objects.
  • Therefore, standard responses that use field codes containing custom variables must have the usage type Autoresponse or Acknowledgment.

For an example of the use of a custom variable in a standard response, see Using a Custom Variable.

Important
The names of custom variables must begin with an alphabetic character or underscore, and the remainder of the name must consist only of alphanumeric characters or underscores. This differs from the requirements for the names of other Knowledge Manager objects, which may also contain hyphen and space. For example, 5-usercode is not an acceptable name for a custom variable, but it is acceptable as the name of a screening rule or category.

Using Your Own Data in Standard Responses

It is possible to incorporate data that you keep external to Universal Contact Server into your standard responses (including automated responses). This data could include case numbers, account information, and so on. Remember that attached data always consists of key-value pairs.

Incorporating external data into standard responses is a two-step process:

  1. Retrieve the external information and add it to the interaction as attached data. One place to do this is in a routing strategy.
  2. Now that you have attached the data to the interaction, you can use the AttachedData property of the Interaction object to access the data and incorporate it into your standard response. The AttachedData property requires one argument, which is the key name. The result of the following formula is the value associated with the OrderStatus attached-data key:
      <$Interaction.AttachedData("OrderStatus")$>
This page was last edited on August 10, 2017, at 13:39.
Comments or questions about this documentation? Contact us for support!