Beruflich Dokumente
Kultur Dokumente
Users Guide
Version 6.4
Copyright
Copyright, Unica Corporation 1998 - 2005. All rights reserved. Unica Corporation Reservoir Place North 170 Tracer Lane Waltham, MA 02451-1379
Examples and Data
All software and related documentation is subject to restrictions on use and disclosure as set forth in the Unica Software License and Services Agreement, with restricted rights for U.S. government users and applicable export regulations. Companies, names, and data used in examples herein are fictitious unless otherwise noted.
Trademarks and Patents
Unica is registered in the U.S. Patent and Trademark Office. Unica Affinium, Affinium, Affinium Campaign, Affinium Campaign Optimize, Affinium Campaign Interact, Affinium Campaign eMessage, Affinium Campaign Collaborate, Affinium Mart, Affinium Model, Affinium Plan, Affinium Report, Universal Dynamic Interconnect, Interconnect Modules, Powering Marketing Innovation, Customer Value Maximization, MAP, and One-to-One Optimization are trademarks of Unica Corporation. All other trademarks are the property of their respective owners. Portions of the software described in this document are covered by U.S. Patent No. 6,317,752 and U.S. Patent No. 6,269,325. NOTICE: This document contains confidential and proprietary information of Unica Corporation (Unica). Use, duplication, or disclosure without the express written consent of Unica Corporation is prohibited.
Document Information
Affinium Campaign Users Guide, for Affinium Campaign Version 6.4 ATD 01-10020-100, 6/13/05
Table of Contents
Preface About Affinium and This Guide 9
About the Affinium suite.................................................................... .10 About this guide ................................................................................ .14 Related documents..................................................................... .14 Typographic conventions............................................................ .15 Special information ..................................................................... .16 Keyboard conventions ................................................................ .16 Feedback .................................................................................... .16 Technical support ............................................................................. .17 Users Guide ............................................................................... .17 Unica Technical Support............................................................. .17
Chapter 1
Introduction
21
What does Affinium Campaign do? .................................................. .22 Who will use Affinium Campaign? .................................................... .23 Affinium Campaign concepts ............................................................ .23 Campaigns.................................................................................. .23 Sessions ..................................................................................... .24 Flowcharts .................................................................................. .25 Processes ................................................................................... .25 Offers .......................................................................................... .29 Using Affinium Campaign ................................................................. .29
Chapter 2
Getting Started
31
Installation and configuration ............................................................ .32 Signing in to Affinium Campaign....................................................... .32 Preparing the data ............................................................................ .35 Creating a campaign......................................................................... .35 Running a campaign......................................................................... .48
Unica Confidential
Table of Contents
Chapter 3
51
Introduction.........................................................................................52 Setting your Home page options ........................................................53 Bookmarking reports ..........................................................................55 Customizing your links .......................................................................56 Searching for objects in Affinium Campaign ......................................59
Chapter 4
Campaigns
61
Creating a campaign ..........................................................................62 Associating strategic segments with a campaign.........................69 Associating offers with a campaign ..............................................71 Viewing a campaign ...........................................................................73 Viewing a campaign linked to Affinium Plan.......................................76 Printing a campaign............................................................................77 Editing a campaign.............................................................................78 Running a campaign ..........................................................................79 Organizing campaigns........................................................................80 Creating a folder structure............................................................80 Moving a campaign ......................................................................85 Deleting a campaign...........................................................................86
Chapter 5
Flowcharts
89
Creating a flowchart ...........................................................................90 Viewing a flowchart ............................................................................97 Editing a flowchart ..............................................................................98 Keyboard shortcuts ....................................................................100 Testing a flowchart ...........................................................................101 Running a flowchart..........................................................................102 Pausing a run .............................................................................105 Continuing a paused run ............................................................105 Stopping a run ............................................................................105 Continuing a stopped run ...........................................................106 Troubleshooting runtime errors ..................................................107 Deleting a flowchart..........................................................................107
Unica Confidential
Table of Contents
Chapter 6
Processes
109
Processes overview .........................................................................109 Types of processes ..........................................................................111 Data manipulation processes .....................................................111 Run processes ...........................................................................113 Optimization processes ..............................................................115 Working with processes ...................................................................116 Adding new processes to flowcharts ..........................................117 Copying, cutting and pasting processes.....................................118 Pasting processes from the template library ..............................120 Moving processes ......................................................................121 Deleting processes .....................................................................121 Connecting processes ................................................................122 Configuring and editing processes .............................................124 Running processes.....................................................................126 List of processes ..............................................................................127 Audience ....................................................................................128 Call List.......................................................................................153 Create Seg .................................................................................153 Cube...........................................................................................155 Decision......................................................................................159 eMessage...................................................................................160 Event In ......................................................................................160 Event Out ...................................................................................160 Extract ........................................................................................160 Mail List ......................................................................................164 Merge .........................................................................................191 Model..........................................................................................194 Optimize .....................................................................................197 Recommend ...............................................................................198 Response ...................................................................................198 Sample .......................................................................................209 Schedule ....................................................................................219 Score ..........................................................................................230 Segment .....................................................................................234 Select .........................................................................................245 Creating Queries ........................................................................249 Snapshot ....................................................................................276
Version 6.4
Unica Confidential
Table of Contents
Chapter 7
Offers
293
Overview ..........................................................................................294 Offer versions and groups ..........................................................294 Version codes.............................................................................295 Offer codes.................................................................................296 Creating a new offer .........................................................................297 Printing an offer ................................................................................309 Creating an offer version ..................................................................309 Editing offers and offer versions.......................................................313 Duplicating an offer or offer version .................................................314 Deleting offers, offer versions, and offer groups ..............................314 Moving single offers and offer groups ..............................................316 Viewing offer reports from a Summary page....................................318 Searching for an offer or offer version..............................................320
Chapter 8
Stored Objects
323
Stored objects overview ...................................................................324 Derived fields....................................................................................324 Creating derived fields................................................................325 Storing derived fields..................................................................328 User variables ..................................................................................335 Creating a user variable .............................................................338 Custom macros ...............................................................................338 Creating a custom macro ...........................................................339 Custom macro guidelines...........................................................343 Managing custom macros ..........................................................347 Templates.........................................................................................349 Copying templates to the Template Library................................349 Pasting a template from the Template Library ...........................350 Managing templates ...................................................................352 Stored table catalogs........................................................................353
Chapter 9
Sessions
357
Sessions...........................................................................................358
Unica Confidential
Table of Contents
Creating a session......................................................................358 Viewing a session.......................................................................360 Editing a session ........................................................................363 Running a session ......................................................................364 Organizing sessions ...................................................................365 Strategic segments...........................................................................372 Creating a strategic segment .....................................................373 Viewing a strategic segment ......................................................374 Editing a strategic segment ........................................................377 Running a strategic segment......................................................379 Organizing strategic segments ...................................................379 Deleting a segment ....................................................................384 Dimension hierarchies......................................................................385 Cubes ...............................................................................................392
Chapter 10
Reports
395
Overview ..........................................................................................396 Working with reports.........................................................................397 Accessing reports .......................................................................397 Generating reports for a campaign.............................................398 Flowchart Status Summary Report ............................................399 Generating reports from the Analytics Home page ....................400 Bookmarking reports ..................................................................400 Exporting and printing reports ....................................................401 Customizing your reports ...........................................................402 Organizational reports .....................................................................403 Summary report..........................................................................403 Listings reports ..........................................................................406 Calendar reports.........................................................................424 Segment analysis reports ..........................................................427 Segment profile analysis report ..................................................434 Performance/profitability reports ......................................................438 Performance summary reports ...................................................441 Performance over time reports ...................................................449 Cell reports .......................................................................................455 Printing and exporting cell reports ..............................................456 Cell List reports ..........................................................................456 Cell Variable Profile reports........................................................459
Version 6.4
Unica Confidential
Table of Contents
Cell Variable Crosstab reports ...................................................462 Cell Contents reports..................................................................466 Cell Waterfall reports..................................................................468 How report values are calculated .....................................................471 Revenue .....................................................................................472 Run Cost ....................................................................................472 Run Expense..............................................................................473 Net Revenue ..............................................................................473 Gross Revenue ..........................................................................473 Return on Marketing Investment and Incremental ROI ..............474
Glossary Index
475 487
Unica Confidential
This preface provides information about the Affinium suite of applications and the conventions used in this Users Guide. Key topics include: About this guide Technical support
Unica Confidential
10
Unica Confidential
Affinium technology delivers an integrated suite of applications that address the comprehensive scope of EMM:
Affinium Model is Unicas award-winning data-mining and predictive analysis application that provides segmentation and profiling, valuation, response modeling, and cross selling features to solve specific marketing problems. It is the only data-mining product that automates the model building and optimization process. This capability allows you to very quickly create very accurate predictive models. Affinium Campaign provides a complete set of campaign management capabilities that allow marketers to create, test, optimize, deploy and analyze multi-wave, cross-channel marketing campaigns quickly and easily. Marketing campaigns can be simulated before execution, enabling a marketer to project anticipated ROI results. Affinium Campaign Collaborate enables marketing organizations to distribute the execution of centrally managed marketing campaigns throughout the enterprise to agents, branch managers, field sales, etc. It also
Version 6.4
Unica Confidential
11
allows organizations to ensure that corporate business rules and best practices are enforced while allowing execution and controlled customization.
Affinium Campaign eMessage is an email application that enables marketers to create, preview, test, execute, and track personalized email communications. It provides reports on key measurements such as clickthroughs, opt-outs, and undeliverable messages. With eMessage, email marketing can be coordinated with other marketing efforts. Affinium Campaign Interact is a real-time personalization application that allows marketers to utilize data from all customer interactions to provide the right level of personalization and most effective offer, content, or service to individuals across all real-time channels. It combines predictive analysis, current interaction context and business objectives and rules to deliver powerful personalization. Affinium Campaign Optimize is a world-class optimization application that enables marketers to determine the optimal interaction strategy for each customer over time. It looks across selected marketing campaigns, offers, and touch points to respect customer privacy, limit contact fatigue, prevent conflicting offers, meet channel or inventory capacity limitations, and maximize marketing ROI and profitability. Affinium Plan is a marketing planning application which empowers the entire marketing team to define, coordinate, resolve, automate, simulate, and monitor various marketing plans, programs and tasks across initiatives. Plan eases organizational collaboration and provides real-time visibility into all marketing activities within an organization. This means marketers achieve improved decision making, collaboration program management, enhanced financial management, and increased productivity and performance. Affinium Leads is a full-featured lead management application that extends the lead generation capabilities of Affinium Campaign into lead management, opportunity maturation, and sales closure. Integration between Marketing and Sales is accomplished through a dynamic workflow and distribution engine, role-specific user interfaces, and end-to-end analytics capabilities.
12
Unica Confidential
Affinium Security Manager (ASM) provides centralized management and control of authentication and security for the Affinium suite. It is a repository that stores information such as user passwords, user group privileges, and data source credentials.
UDI interconnectivity
Affiniums Universal Dynamic Interconnect (UDI) technology forms the foundation of the Affinium suite of products, providing simultaneous, dynamic connectivity to your existing databases and flat files. By using UDI, you can include data from multiple sources, as long as a common identifier is available. UDI technology connects directly to existing databases and flat files, so you can have Affinium applications up and running quickly without needing to first establish a separate datamart or data model. Unicas Affinium suite is able to simultaneously access and manipulate information from multiple databases and flat files through UDI. This includes capabilities to not only read but also write data, making Affinium compatible with multiple touch point systems, such as contact center applications.
Universal Dynamic Interconnect (UDI) technology allows marketers to adapt to an ever-changing marketing data environment. A fully integrated marketing suite with integrated analytics, predictive and historical modeling, campaign management, email marketing, and crosschannel real-time personalization provides consistent and effective one-toone interactions. One-to-one marketing achieved by targeting the right people, at the right time, through multiple channels, with the right offer. A central location for implementing cross-channel marketing methodology and building campaign and interaction logic minimizes hard-coding of rules within your touch point systems and allows for consistent customer treatment and branding.
Version 6.4
Unica Confidential
13
Real-time personalization and optimization at each touch point increases the effectiveness of each offer. Enterprise-wide planning, tracking, and collaboration capabilities provide real-time visibility into all marketing initiatives, increase marketing velocity, and enable control over the achievement of marketing objectives. Automatic optimization of campaigns based on corporate-wide rules, constraints, scoring, and a patented optimization algorithm maximizes your campaign objectives.
Related documents
In addition to this guide, you can find more information about Affinium Campaign in the following documents:
14
Unica Confidential
Note
All guides assume familiarity with Microsoft Windows environments and Microsoft Internet Explorer.
Typographic conventions
Specific conventions are used in this guide to convey additional information about a subject. Style
Code
Description
Code style is used for text that is used literally, appearing exactly as shown. This includes command names, path names, and system information. Italic code style is used for names of variables that you must provide. For example, you need to supply a value for your_file in the path name example to the right. Bold code style is used to indicate the option used by default if none is specified. The GUI style is used to indicate objects in the applications interface or keys on your keyboard. Square brackets are used to enclose optional items in syntax descriptions. Braces enclose a list from which you must choose an option. A vertical bar separates items in a list. Ellipses in a syntax description indicate that the preceding parameter can be repeated multiple times. For instance, you could use multiple filenames as parameters in the example to the right.
Example
\Affinium\model\model.exe
Italic code
\Affinium\data\your_file
Bold code
{ALL | COL | ROW} the User Name field, the Enter key macro_name(required_var [, optional_variable]) {ALL | COL | ROW} {ALL | COL | ROW}
GUI [] {} |
run filename,
Version 6.4
Unica Confidential
15
Special information
Note
Notes in the text are displayed like this. They highlight information or provide supplementary information. Critical information is displayed with this label, to inform you of an important point. Be sure to read this before continuing.
Important!
Keyboard conventions
Convention KEY1 + KEY2 KEY1 - KEY2 Keystrokes
A plus sign (+) between two keys means to press both keys down at the same time. A dash (-) between two keys means to press one key, followed by the other.
Alt-F-P means to press the Alt key followed by the letter F, and then the letter P.
Feedback
We appreciate your comments about this Guide. Please contact us at the location most convenient for you:
Unica Corporation, Technical Documentation Reservoir Place North, 170 Tracer Lane, Waltham, MA 02451-1379 Unica Corporation Limited, Technical Documentation Aston Court, Kingsmead Business Park, Frederick Place, High Wycombe, HP11 1LA, UK Unica France, Technical Documentation 27 rue de Berri - 75008 Paris - France Unica Corporation, Technical Documentation 7 Temasek Boulevard, Suntec Tower One, #44-01, Singapore, 039789
By Mail:
16
Unica Confidential
Technical support
By Phone:
44.1494.616.547 for Europe 33.1.56.69.44.07 for France 65.6430.6618 for Asia Pacific documentation@unica.com
By Email:
Technical support
We offer three technical support resources: the Affinium Campaign Users Guide, the Affinium Campaign Administrators Guide, and Unicas Technical Support department.
Users Guide
The Affinium Campaign Users Guide is designed to allow you to begin using Affinium Campaign quickly. It will also help you develop a clear understanding of the product that will enable you to continue to explore it and learn on your own. You can access the book through the Help link in Affinium Campaign or in the Help subdirectory of the directory where you installed Affinium Campaign.
Version 6.4
Unica Confidential
17
If you choose to contact Unica by email or phone, use the appropriate contact information for your region: Region Contact information
Unica Corporation, Reservoir Place North, 170 Tracer Lane, Waltham, MA 02451-1379 781.839.8250 support@unica.com Unica Corporation Limited, Aston Court, Kingsmead Business Park, Frederick Place, High Wycombe, HP11 1LA, UK 44.1494.616.547 supporteurope@unica.com Unica France, 27 rue de Berri - 75008 Paris - France
Americas
Europe
France
33.1.56.69.44.07 supporteurope@unica.com Unica Corporation, 7 Temasek Boulevard, Suntec Tower One, #44-01, Singapore, 039789 65.6430.6618 apsupport@unica.com
Asia Pacific
If you are not a designated support contact at your company, please contact your Affinium administrator for information on who to contact within your company to address any issues. When logging a call with Unica Technical Support the following information may be needed in order to properly diagnose your issue.
Affinium application name and version number Environment details - server operating system, database, and web application (if necessary) Brief description of the nature of your issue Detailed error messages you see when the issue occurs Detailed steps to reproduce the issue Related log files, session files, configuration files, data files, and so on.
18
Unica Confidential
Technical support
Gathering this information prior to submitting your issue into Technical Support could help in finding a resolution more quickly.
Version 6.4
Unica Confidential
19
20
Unica Confidential
1 INTRODUCTION
Affinium Campaign is an Enterprise Marketing Management (EMM) solution that enables users to design, execute, and analyze direct marketing campaigns. This chapter provides an introduction to Affinium Campaign. This chapter includes the following key topics: What does Affinium Campaign do? Who will use Affinium Campaign? Affinium Campaign concepts Using Affinium Campaign
Unica Confidential
21
Chapter 1: Introduction
Affinium Campaign Collaborate to support distributed, custom execution of centrally managed campaigns. Affinium Campaign eMessage to leverage the email channel for personalized messages. Affinium Campaign Interact to process real-time interactions and offer serving. Affinium Campaign Users Guide
22
Unica Confidential
Affinium Campaign Optimize to optimize contacts from a customercentric perspective while considering business rules and constraints. Affinium Model to leverage scoring of predictive models for response modeling, cross-selling, customer valuation, and segmentation.
Campaigns
Affinium Campaign treats a marketing campaign as a complete marketing effort consisting of one or more flowcharts. Flowcharts are comprised of one or more
Version 6.4
Unica Confidential
23
Chapter 1: Introduction
processes. Campaigns can be associated with one or more offers or strategic segments. Figure 1-1 shows a sample campaign flowchart.
Figure 1-1 A sample campaign flowchart and its processes
Campaign
Flowchart
Process
Sessions
A session is a special place in the application where fundamental, persistent, global data constructs (such as strategic segments and cubes) are created by Affinium Campaign administrators and then made available to all campaigns. Like campaigns, sessions are also comprised of individual flowcharts.
24
Unica Confidential
Flowcharts
The flowchart is a collection of processes linked together to accomplish a particular marketing goal, such as linking a particular offer to a particular audience for a direct mail campaign, tracking responders and non-responders, or targeting a particular segment of a customer list. Affinium Campaign supports flowcharts that are run manually or by a scheduler. Licensed users of Affinium Campaign Interact can also use Affinium Campaign to run real-time interaction flowcharts that depend on the occurrence of an event. For more information on interaction flowcharts, see the Affinium Campaign Interact Users Guide. The processes combined in a flowchart perform the actual data manipulation, offer assignment, scheduling, response tracking, and everything else required to deploy a marketing campaign. You access processes through the flowchart workspace, an area of the application where processes can be dragged and dropped from the process palette onto the workspace, where they can be configured, refined, renamed, and connected to one another in meaningful ways.
Processes
Flowcharts are comprised of individual processes that are configured to perform a particular task in a campaign or session, such as merging two distinct audience groups with the Merge process or writing out the results of the entire campaign with either a Snapshot process or one of the contact processes (Call List, Mail List, eMessage, or Recommend). Tasks are usually accomplished using processes that work with cells. Cells are lists of identifiers of marketing message recipients (such as customer or prospect IDs). Generally, each cell in a flowchart takes one or more cells as input, transforms the data, and produces one or more cells as output. There are three types of processes:
Data manipulation processes Data manipulation processes allow you to perform tasks such as selecting customers based on a set of criteria, merging lists of customers together for inclusion or exclusion, segmenting customers into meaningful groups,
Version 6.4
Unica Confidential
25
Chapter 1: Introduction
sampling for test or control groups, and working with different audiences. For more information on these processes, see Chapter 6, Processes, on page 109.
Run processes Run processes control the actual execution of completed campaigns, which includes the management and output of contact lists, assigning offers to target audiences, the tracking of contacts, the logging of data, and the scheduling of campaign or session runs. For more information on these processes, see Chapter 6, Processes, on page 109.
Optimization processes Optimization processes let you fine tune your campaign to maximize effectiveness. You use optimization processes to generate scores to refine audience selection and track contacts and responses to optimize your ROI for customer contacts. For more information on these processes, see Chapter 6, Processes, on page 109.
Table 1-1, Table 1-2, and Table 1-3 organize processes by type and provide a brief description of each process.
Table 1-1 Data Manipulation Processes
Process Select
Description
Use the Select process to define criteria to select a list of customers from your data. The Select process outputs a cell containing a list of customer IDs for the campaign, which can be modified and refined by other processes. Use the Merge process to combine IDs from multiple cells or exclude IDs. For example, you can use the Merge process to exclude all the customers who meet certain criteria, such as those with delinquent accounts. Use the Segment process to divide customers into meaningful groups. For example, you can use the Segment process to group customers by account type if you want to treat Platinum account holders differently than Gold account holders. Use the Sample process to create one or more cells for different treatments, control groups, or a subset for analytic processing. For example, you can use the Sample process if you want a certain percentage of your target audience to receive a pilot version of an offer through email, and the rest of the target audience to receive a standard offer through regular mail.
Merge
Segment
Sample
26
Unica Confidential
Process
Description
Use the Audience process to switch between audience levels or to scope one audience level by another (for example, to choose one individual per household). Audience levels are defined when the customer database tables are mapped into Affinium Campaign. For example, the audience levels for a campaign may be defined as Household and Individual. You can use the Audience process to select all individuals who meet a certain criteria, but only make an offer to those consumers who are also the head of their household. Use the Extract process to improve performance by writing specified data (fields and rows) into a database table or file for further processing.
Audience
Extract
For example, you can extract rows of transational purchase data from the last three months for the current set of individuals for subsequent analysis. This allows you to process a small fraction of a potentially very large database table. As a licensed user of Affinium Campaign Interact, use the Decision process to segment customers by controlling which subsequent branches of the flowchart are run.
Decision
Process
Description
Use the Snapshot process to output the data from the flowchart to a database table or flat file. For example, you can use the output of the Snapshot process to measure changes over the course of a campaign, such as the changes in credit card use following a usage stimulation campaign. Use the Schedule process to specify when a flowchart, group of processes, or a single process should run. For example, you can take snapshots of data at specified time intervals or at preset campaign stages. External events can also trigger campaigns. Use the Cube process to create data cubes from dimensions derived from database tables. Cubes can then be used for visual selection or interactive drilling and analysis. Use the Create Seg process to create strategic data segments from database tables. For example, strategic segments can be created for commonly used target groups, such as high-value customers.
Snapshot
Schedule
Cube
Create Seg
Version 6.4
Unica Confidential
27
Chapter 1: Introduction
Process Event In Event Out Recommend Mail List Call List eMessage
Description
As a licensed user of Affinium Campaign Interact, use the Event In process to accept data from a UDI queue to begin processing in an interaction flowchart. As a licensed user of Affinium Campaign Interact, use the Event Out process to write data to a UDI queue. A contact process. As a licensed user of Affinium Campaign Interact, use the Recommend process to generate a list of recommended offers for a customer. A contact process. Use the Mail List process to assign offers, generate a contact list, and log contact history for direct mail communications. A contact process. Use the Call List process to assign offers, generate a contact list, and log contact history for telemarketing communications. A contact process. As a licensed user of Affinium Campaign eMessage, use the eMessage process to support personalized email execution.
Process Track
Description
Use the Track process for delayed recording of IDs and offer information for the customers who were contacted in one of the contact processes, or for offers given to an individual by Affinium Campaign Interact. If you use the Track process to record this information, in can be displayed in reports. Use the Response process to record the IDs, response type, and response data for the customers who responded to a contact process. This information can then be displayed in a number of performance and profitability reports. As a licensed user of Affinium Campaign Optimize, use the Optimize process to allow your organization to determine the optimal interaction strategy for each customer across multiple marketing campaigns offers and channels. Use the Model process to generate response models using the Affinium Campaign modeling engine. Use the Score process to score the IDs in a cell using one or more models created either in a Model process or in Affinium Model. For example, you can score a list to identify the best customers or prospects for an offer you plan to use.
Response
Optimize Model
Score
28
Unica Confidential
Offers
An offer represents a single marketing message, which can be delivered in a variety of ways. Different versions of the same marketing communication are offer versions and belong in the same offer group. By defining multiple versions of an offer to change offer attributes, you can use an offer in different marketing campaigns, at different points in time. For example, different offer versions can be used in different channels, use different creatives, and have different expiration dates. An offer is associated with a target audience in a flowchart using one of the contact processes (Mail List, Call List, Recommend, or eMessage). Customers who received the offer and customers who responded are tracked in a flowchart using Track and Response processes, which make the offer data available for a variety of reports, including performance and profitability reports. In Affinium Campaign, you can:
Link an unlimited number of offer versions to a campaign Associate one or more products with an offer version Select effective dates and expiration dates for an offer version Search for offer versions by name, description, or offer code(s) Create a report based on one or more specific offer versions In Affinium Campaign version 5.1 and above, offer handling has changed from Campaign version 5.0. Most importantly, the concept of multi-part offers with offer instances has been replaced by offer versions. See Chapter 8, Stored Objects, on page 323 for details about offer groups and offer versions.
Note
Install and configure Affinium Campaign. Sign in to Affinium Campaign. Prepare the data and objects to be used by campaigns.
Version 6.4
Unica Confidential
29
Chapter 1: Introduction
4 5 6
Design and create your campaign. Run your campaign. Analyze the results of your campaign. These steps are each described in greater detail in Chapter 2, Getting Started, on page 31.
30
Unica Confidential
2 GETTING STARTED
Read this chapter to quickly get started using Affinium Campaign to create, run, and analyze the results of your campaigns. This chapter includes the following topics: Installation and configuration Signing in to Affinium Campaign Preparing the data Creating a campaign Running a campaign Analyzing campaign results
Unica Confidential
31
Launch a supported version of Microsoft Internet Explorer. See your Affinium Campaign administrator for more information on which versions are supported.
In the address field of Internet Explorer, enter the Affinium Campaign servers internet or intranet address (URL). For example, http://CampaignServer:7001/Campaign/.
32
Unica Confidential
Note
If you are uncertain of the correct URL, contact your Affinium administrator.
Depending on the level of security enabled on the Affinium Campaign server, you may be prompted to accept a digital security certificate the first time you sign in. Click Yes to accept the certificate. The Affinium Campaign sign in page appears, as shown in Figure 2-1.
Figure 2-1 Sign in page
Enter your user name and password, then click Sign In.
Note
You can press Tab to move from the Username field to the Password field, then press Enter to sign in.
If you need a user name or password, contact your Affinium administrator. If your sign in is successful, Affinium Campaign displays your Home page, as shown in Figure 2-2. For more information about your Home page, see Chapter 3, Your Home Page, on page 51.
Version 6.4
Unica Confidential
33
34
Unica Confidential
Creating a campaign
Before creating a campaign, you should have already designed it on paper and determined the goals for the campaign. This section describes how to use Affinium Campaign to implement your campaign design. Campaigns are comprised of one or more flowcharts. Flowcharts are comprised of interconnected processes. The processes combined in a flowchart are the heart of Affinium Campaign, since they perform the actual data manipulation, contacts, scheduling, and response tracking; in effect, the processes are how you define and implement a campaign. For example, Figure 2-3 and Figure 2-4 show the two flowcharts of a retention campaign that uses multiple channels to deliver an offer to customers that are likely to be lost through attrition. The campaign flowchart shown in Figure 2-3 uses different channels to deliver an offer to low, medium, and high-value customers. It uses three Select processes to select the customers in each segment most likely to be lost through attrition. These customers are then merged using a Merge process to exclude all the customers that have opted out of marketing contacts. Then the customers are segmented with a Segment process into value tiers based on their scores. The high-value customers are output to a call list with a Call List process, and will be contacted by phone with an offer. The medium-value customers are output to a mail list with a Mail List process, and will receive a direct mailing with the offer. The lowest value customers receive the offer via email.
Version 6.4
Unica Confidential
35
Another flowchart in this same campaign tracks responses to the phone, direct mail, and email offers captured by the call center and response capture systems, as shown in Figure 2-4. Response information is then available through the various performance reports in Affinium Campaign.
36
Unica Confidential
Creating a campaign
Once you have designed a campaign on paper, you will implement it in Affinium Campaign by creating a campaign and creating one or more flowcharts to accomplish the objectives of your campaign. To create a campaign
1
Click Campaigns in the left frame. The All Campaigns page displays the folder structure used to organize your companys campaigns, as shown in Figure 2-5. If you previously opened a subfolder within the All Campaigns page, that subfolder will be displayed instead. For more information on using folders to organize your campaigns, see Organizing campaigns on page 80.
Version 6.4
Unica Confidential
37
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Figure 2-5 All Campaigns page, with folders used to organize campaigns
Navigate through the folder structure until you are displaying the contents of the folder where you want to add your campaign. Navigate through the folder structure by clicking a folder name to open it, clicking All Campaigns to return to the Campaigns page, or clicking Parent Folder to open the folder that contains the currently open folder.
Click Add a Campaign. The New Campaign page appears. Figure 2-6 shows example campaign information already entered on the page.
38
Unica Confidential
Creating a campaign
Enter campaign information into the fields on the page, as described in Table 21.
Table 2-1 Elements on the New Campaign page
Description
Enter a name for the campaign. We recommend creating a unique name for each campaign to help avoid confusion. Avoid using the pound (#), dollar ($), ampersand (&), less-than (<), and apostrophe () characters. Enter a description of the campaign. This description is displayed on the Home page and All Campaigns pages. Enter the campaigns objective.
Version 6.4
Unica Confidential
39
Element
Description
Affinium Campaign automatically generates a unique campaign code using the code generator. You can edit this code or click Regenerate code to create a new unique code. If you edit the code, you must match the correct format, and it must be unique. If your organization uses campaign codes of a particular format, your Campaign administrator can customize Affinium Campaigns code generator to automatically generate codes in that format. For more information, see the Affinium Campaign Administrators Guide. Enter the dates over which the campaign is effective. You can also click the arrows to change the dates by one business day, or click the calendar icon to select a date from a calendar. These dates determine where the campaign appears in the Campaign Calendar report. Select the initiative under which the campaign falls from the drop-down list. The selections in this list are created by the Campaign administrator. For more information on changing the initiative selections, see the Affinium Campaign Administrators Guide. Affinium Campaign displays your user name in this field. In Figure 2-6, the four fields at the bottom of the page are custom fields, created by the Campaign administrator to meet business reporting requirements. These fields may not appear, or will appear differently in your version of Affinium Campaign. For more information about creating custom campaign fields, see the Affinium Campaign Administrators Guide.
Campaign Code
Initiative Owner
Custom fields
Click Save Changes. You can also click Save and Add a Flowchart to immediately start creating the first flowchart in the campaign. However, we recommend that you associate the appropriate segments and offers to your campaign first, to make selecting customers and creating contact lists in your flowcharts easier. The Campaign Summary page displays the information you entered, as shown in Figure 2-7.
40
Unica Confidential
Creating a campaign
The Add/Remove Segments window displays all available segments in the Browse tab, as shown in Figure 2-8.
Version 6.4
Unica Confidential
41
b Select the segment you want to add from the All Segments list in the Browse
tab.
Note
Navigate through the list by clicking the + sign next to a segment folder to open it.Shift+click or Ctrl+click to select multiple segments.
The segments shown in the Segments to Target list appear on the Campaign Summary page. When you are selecting customers in your campaign flowcharts, these segments will appear at the top of the list to make finding them easier.
7
42
Unica Confidential
Creating a campaign
The Add/Remove Offers window displays all available offers in the Browse tab, as shown in Figure 2-9.
Figure 2-9 Add/Remove Offers page
b Select the offer you want to add from the All Offers list in the Browse tab.
Click the + sign next to an offer to view all the versions of the offer.
Note
The offers shown in the Offers to Send in this Campaign list appear on the Campaign Summary page. When you are creating contact lists in your campaign flowcharts, these offers will appear at the top of the list to make finding them easier.Add a flowchart to your campaign, as follows:
a Select Modify > Add a Flowchart from the campaign toolbar.
Version 6.4
Unica Confidential
43
The New Flowchart page appears. Figure 2-10 shows example flowchart information.
Figure 2-10 Completed information on the New Flowchart page
44
Unica Confidential
Creating a campaign
Description
Enter a name for the flowchart. Each flowchart in a campaign must have a unique name. Avoid using the pound (#), dollar ($), ampersand (&), less-than (<), and apostrophe () characters. (Optional) Enter a description of the flowchart. This description is not displayed in any Affinium Campaign reports, but is stored for external reporting. Select one of the following: Standard Batch Flowchart Select this flowchart type to do batch-style processing of large numbers of customers. Interaction Flowchart Select this flowchart type to process individual customers in real-time. Interaction flowcharts are available only for licensed users of Affinium Campaign Interact. For information and instructions, see the Affinium Campaign Interact Users Guide.
Flowchart Type
The Edit Flowchart page displays the process palette and a blank workspace, as shown in Figure 2-11.
Version 6.4
Unica Confidential
45
Process palette
Workspace 9
Add processes to your flowchart. You can add, configure, and connect your processes in the order that is easiest for you. You do not need to follow the order shown in this procedure. For example, most people add a process, connect it, then configure it before adding another process.
a Click the process you need in the process palette.
46
Unica Confidential
Creating a campaign
c Repeat steps a and b for each process you want to add to the flowchart. d Connect the processes in your flowchart.
For more information and instructions, see Connecting processes on page 122. A sample flowchart with connected but unconfigured processes is shown in Figure 2-12.
Figure 2-12 Flowchart with unconfigured processes
We recommend that you configure the processes in the order that they will be executed when the campaign is run, because a process often depends on the output of the process which it follows. In the example above, you would configure the first three Select processes, then the Merge, the Segment, and finally, the last three contact-style processes. Configuring in this order helps you avoid re-configuring processes because of changes upstream.
Version 6.4
Unica Confidential
47
For detailed information and instructions about configuring each type of process, see Chapter 6, Processes, on page 109.
11 Run the components of your flowchart and analyze the results.
We recommend that you test run or run each process, each branch, then the entire flowchart to finely tune your flowcharts to deliver the best results. We also recommend that you thoroughly analyze the results of each component of your flowchart to discover process configuration errors, make sure the results are what you expect, and to prevent you from discovering unexpected results after running the campaign on all your data or in production. For more information and instructions, see To run a process on page 105 and Running a flowchart on page 102. When you are finished running all your processes, the flowchart will appear as shown in Figure 2-3.
12 Repeat steps 8 through 11 until you have added all the flowcharts you need to
your campaign.
Running a campaign
Run your campaign by running each flowchart in the campaign. To run a campaign
1 2 3
Open the campaign flowchart you want to run. Select Run > This from the Campaign toolbar. Repeat steps 1 and 2 for each flowchart in the campaign.
48
Unica Confidential
profit per responder. Based on this information, Affinium Campaign can calculate your total and incremental revenue and profit, as well as your overall ROI. Affinium Campaign offers several types of reports to help you gather and analyze information about your campaigns. For information on working with reports, see Chapter 10, Reports, on page 395.
Version 6.4
Unica Confidential
49
50
Unica Confidential
This chapter describes how to work with your Home page. This chapter includes the following topics: Introduction Setting your Home page options Bookmarking reports Customizing your links Searching for objects in Affinium Campaign
Unica Confidential
51
Introduction
When you log into Affinium Campaign, your Home page appears. The Home page serves as a customizable dashboard or portal, a place where you can quickly see and act upon the information most relevant to you. Figure 3-1 shows an sample Home page.
Figure 3-1 Affinium Campaign Home page
52
Unica Confidential
The Home page contains the following sections: Section Description My Bookmarked Reports My Recent Campaigns My Recent Sessions My Custom Links Search
Displays all your bookmarked reports. For instructions, see Bookmarking reports on page 55. Displays, by default, the five most recent campaigns you created. You can view and edit campaigns from this section. For more information, see Chapter 4, Campaigns, on page 61. Displays, by default, the five most recent sessions you created. You can view and edit sessions from this section. For more information, see Chapter 9, Sessions, on page 357. Displays your links to web sites or files. For more information on creating, editing, and deleting links, see Customizing your links on page 56. Allows you to search for a set of characters in the names, descriptions, owners, or codes of all campaigns, sessions, offers, or segments. For more information, see Searching for objects in Affinium Campaign on page 59.
Click Home to open your Home page. Click Options. The Options - Home page appears, as shown in
Version 6.4
Unica Confidential
53
The sections that appear by default on the Home page are in the Selected Modules list box.
3
Click a section in the Selected Modules list box and use the arrow button to move the section into the Available Modules list box. This removes the section from the Home page. You can use the arrow button to add it back to the Home page by adding back into the Selected Modules list box.
54
Unica Confidential
Bookmarking reports
If you want to change the order in which the sections appear on the Home page, use the up and down arrows next to the Selected Modules list box to make the entries correspond to the order in which you want them to appear on the Home page. Select 5 items, 10 items, or 15 items in the Recent Menu Items field as the number of items you want to display in your My Recent Campaigns and My Recent Sessions sections on the Home page. Click Save Changes.
Bookmarking reports
Bookmarked reports store the parameters needed to generate the report. Clicking a bookmarked report re-generates the report with the selected parameters, ensuring that the information in the report contains the most recent data. You can bookmark any report you generate in Affinium Campaign to display it on your Home page. For instructions on generating reports, see the relevant report in Chapter 10, Reports, on page 395. To add a report to your Home page
1
Generate the report. For instructions, see the relevant report in Chapter 10, Reports, on page 395.
Click Bookmark. The Add Bookmark window appears, as shown in Figure 3-3.
Version 6.4
Unica Confidential
55
3 4
Enter a name for the bookmarked report. Click Save Changes. The report is bookmarked on your Home page and on the Analytics Home page. Your bookmarks appear listed with the first campaign that you generated and bookmarked at the top of the list. To remove a report from your Home page
Click Home to open your Home page and display the My Bookmarked Reports Analysis section. Click Remove next to the report you want to remove. Click OK on the confirmation window that appears. The report is removed from the My Bookmarked Reports Analysis section of the Home page and from the Analytics Home page.
Note
2 3
If you accidentally removed a bookmarked report, you can always regenerate it following the instructions under the relevant report in Chapter 10, Reports, on page 395
56
Unica Confidential
To add a link
1
Click Home to open your Home page and display the Custom Links section. An example set of custom links is shown in Figure 3-4.
Figure 3-4 Custom Links section of the Home page
Click Add a New Link. The Add Custom Link window appears. Information about creating a link to a local folder is shown in Figure 3-5.
Figure 3-5 Add Custom Link window
Version 6.4
Unica Confidential
57
3 4 5
Enter the name you want to appear on your Home page in the Page Name field. Enter the URL or complete path to a file in the Web Address field. Click Accept this Location. The new link appears in the Custom Links section of the Home page. To edit a link
1 2
Click Home to open your Home page and display the Custom Links section. Click Edit next to the link you want to edit. The Edit Custom Link window appears, as shown in Figure 3-6.
Figure 3-6 Edit Custom Link window
3 4
Edit the information in the Page Name and Web Address fields. Click Accept this Location. The new link information appears in the Custom Links section of the Home page. To remove a link
1 2
Click Home to open your Home page and display the Custom Links section. Click Remove next to the link you want to remove.
58
Unica Confidential
Click OK on the confirmation window that appears. The link is removed from the Custom Links section of the Home page.
Click Home to open your Home page and display the Search section. You can also search for campaigns only from the Campaigns page. An example search is shown in Figure 3-7.
Figure 3-7 The Search section of the Home page
Select the Affinium Campaign object type you want to find from the Look For drop-down list. Enter the characters you want to search for in the That match the following Names, Description, or Code field. Click Search. Affinium Campaign searches for the characters you entered in the name, description, owner, and code for all the objects of the type you specified. For example, if you select Campaigns and enter check, Affinium Campaign will display all campaigns containing the word check even when it is within other words, such as checks or checking. The results are displayed on the Search Results page, shown in Figure 3-8.
Version 6.4
Unica Confidential
59
60
Unica Confidential
4 CAMPAIGNS
This chapter describes how to create, view, edit, run, organize, and delete your campaigns in Affinium Campaign. This chapter includes the following topics: Creating a campaign Viewing a campaign Viewing a campaign linked to Affinium Plan Printing a campaign Editing a campaign Running a campaign Organizing campaigns Deleting a campaign
Unica Confidential
61
Chapter 4: Campaigns
Creating a campaign
Before creating a campaign, you should have already designed it on paper and determined the goals for the campaign. This section describes how to use Affinium Campaign to implement your campaign design. Campaigns are comprised of one or more flowcharts. Flowcharts are comprised of processes. The processes combined in a flowchart are the heart of Affinium Campaign, since they perform the actual data manipulation, contacts, scheduling, and response tracking; in effect, the processes are how you define and implement a campaign. For example, Figure 4-1 and Figure 4-2 show the two flowcharts of a retention campaign that uses multiple channels to deliver an offer to customers that are likely to be lost through attrition. The campaign flowchart shown in Figure 4-1 uses different channels to deliver an offer to low, medium, and high-value customers. It uses three Select processes to select the customers in each segment most likely to be lost through attrition. These customers are then merged using a Merge process to exclude all the customers that have opted out of marketing contacts. Then the customers are segmented with a Segment process into value tiers based on their scores. The high value customers are output to a call list with a Call List process, and will be contacted by phone with an offer. The medium value customers are output to a mail list with a Mail List process, and will receive a direct mailing with the offer. The lowest value customers receive the offer via email.
62
Unica Confidential
Creating a campaign
Another flowchart in this same campaign tracks responses to the phone, direct mail, and email offers captured by the call center and response capture systems, as shown in Figure 4-2. Response information is then available through the various offer reports in Affinium Campaign.
Version 6.4
Unica Confidential
63
Chapter 4: Campaigns
Once you have designed a campaign on paper, you will implement it in Affinium Campaign by creating a campaign and creating one or more flowcharts to accomplish the objectives of your campaign. To create a campaign
1
Click Campaigns in the left frame. The All Campaigns page displays the folder structure used to organize your companys campaigns, as shown in Figure 4-3. If you have previously opened a subfolder within the All Campaigns page, that subfolder will be displayed instead. For more information on using a folder structure to organize your campaigns, see Organizing campaigns on page 80.
64
Unica Confidential
Creating a campaign
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Figure 4-3 Folders on the All Campaigns page are used to organize campaigns
Navigate through the folder structure until you are displaying the contents of the folder where you want to add your campaign. Navigate through the folder structure by clicking a folder name to open it, clicking All Campaigns to return to the Campaigns page, or clicking Parent Folder to open the folder that contains the currently open folder.
Click Add a Campaign. The New Campaign page appears. Figure 4-4 shows example campaign information already entered on the page.
Version 6.4
Unica Confidential
65
Chapter 4: Campaigns
Enter campaign information into the fields on the page, as shown in Table 4-1.
66
Unica Confidential
Creating a campaign
Element
Description
Enter a name for the campaign. We recommend creating a unique name for each campaign to help avoid confusion. Avoid using the percent (%), asterisk (*), ampersand (&), less-than (<), greater-than (>), comma(,), colon (:), question mark (?), double quote (), pipe (|), forward slash(/), and backslash (\) characters. Enter a description of the campaign. This description is displayed on the Home page and All Campaigns pages. Enter the campaigns objective. Affinium Campaign automatically generates a unique campaign code. You can edit this code or click Regenerate code to create a new unique code. If your organization uses campaign codes of a particular format, your Campaign administrator can customize Affinium Campaigns code generator to automatically generate codes in that format. For more information, see the Affinium Campaign Administrators Guide. Enter the dates over which the campaign is effective. You can also click the arrows to change the dates by one business day, or click the calendar icon to select a date from a calendar. Select the initiative under which the campaign falls from the drop-down list. The selections in this list are created by the Campaign administrator. For more information on changing the initiative selections, see the Affinium Campaign Administrators Guide. Your user name appears in this field. In Figure 4-4, the four fields at the bottom of the page are custom fields, created by the Campaign administrator to meet business reporting requirements. For more information about creating custom campaign fields, see the Affinium Campaign Administrators Guide.
Name
Description Objective
Campaign Code
Click Save Changes. You can also click Save and Add Flowchart to immediately start creating your campaigns flowcharts. However, we recommend that you associate the appropriate segments and offers to your campaign to make selecting customers
Version 6.4
Unica Confidential
67
Chapter 4: Campaigns
and creating contact lists in your flowcharts easier. Associating segments and offers to your campaign also allows you to more easily create more detailed analyses of your results. The Campaign Summary page displays the information you entered, as shown in Figure 4-5.
Figure 4-5 Campaign Summary page
Associate the segments that will be used in your campaign. For more information and instructions, see Associating strategic segments with a campaign on page 69.
Associate the offers that will be used in your campaign: For more information and instructions, see Associating offers with a campaign on page 71.
Add flowcharts to your campaign. For more information, see Creating a flowchart on page 90.
68
Unica Confidential
Creating a campaign
When you are finished working with your flowcharts, your campaign is complete and ready to run. For more information, see Running a campaign on page 79.
Open the Summary tab for the campaign to which you want to associate a segment. You must open the campaign for editing. For more information and instructions, see Editing a campaign on page 78.
Click Add/Remove Segments. The Add/Remove Segments window displays all available segments in the Browse tab.
Version 6.4
Unica Confidential
69
Chapter 4: Campaigns
Select the segment you want to add from the All Segments list. Navigate through the list by clicking the + sign next to a segment folder to open it.
Note
Click Save Changes. The segments you added appear on the Campaign Summary page. When you use the Select process to select customers in your campaign flowcharts, these segments will appear at the top of the list to make finding them easier. For more information on the Select process, see Select on page 245.
70
Unica Confidential
Creating a campaign
Open the Summary tab for the campaign to which you want to associate an offer. You must open the campaign for editing. For more information and instructions, see Editing a campaign on page 78.
Click Add/Remove Offers. The Add/Remove Offers window displays all available offers in the Browse tab.
Version 6.4
Unica Confidential
71
Chapter 4: Campaigns
Select the offer you want to add from the All Offers list in the Browse tab. Navigate through the list by clicking the + sign next to an offer to display its versions.
Note
4 5
Click >>. Click Save Changes. The offers you added appear on the Campaign Summary page. When you use a contact process to create contact lists in your campaign flowcharts, these offers will appear at the top of the list to make finding them easier. Associating these offers to your campaign also allows you to more easily analyze the success of your campaign.
72
Unica Confidential
Viewing a campaign
Viewing a campaign
There are several methods you can use to view a campaign. You can see all the campaigns you created on your Home page, you can navigate through the folder structure of all campaigns stored in Affinium Campaign, or you can search for a campaign from either the Home page or Campaigns page. To view a campaign you created
1
Click Home in the navigation pane. The Home page appears, as shown in Figure 4-8.
If the campaign you want to view does not appear in the My Campaigns section of your Home page, click View all n campaigns. Click the View a tab icon ( view. ) next to the name of the campaign you want to
You can also click the name of the campaign to immediately display the campaigns Summary tab.
Version 6.4
Unica Confidential
73
Chapter 4: Campaigns
Click Campaigns in the left frame. The Campaigns page appears, as shown in Figure 4-3.
74
Unica Confidential
Viewing a campaign
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Navigate through the subfolders until you find the one that contains the campaign you want to view. Click the View a tab icon ( view. ) next to the name of the campaign you want to
You can also click the name of the campaign to immediately display the campaigns Summary tab.
The campaign appears, open to the tab you selected. To view a campaign from search results
1
From either the Home page or the Campaigns page, search for the campaign you want to view. The Search Results page appears. For information and instructions, see Searching for objects in Affinium Campaign on page 59.
You can also click the name of the campaign to immediately display the campaigns Summary tab.
Version 6.4
Unica Confidential
75
Chapter 4: Campaigns
76
Unica Confidential
Printing a campaign
Once you link a project and a campaign, you can move between Affinium Plan and Affinium Campaign to view information in both the project and the campiagn. To navigate from campaign to an Affinium Plan project
1
Click Home or Campaigns and click a campaign you previously linked to an Affinium Plan project while in Affinium Plan. The campaign opens to the Summary tab.
Click the name of the project in the Related Project field. Affinium Plan opens with the Summary tab of the linked project displayed.
If you want to return to Affinium Campaign, click the name of the project in the (Related Campaign (Code)) field in Affinium Plan. Once you integrate Affinium Campaign with Affinium Plan you can also use assets in the Affinium Plan asset library in your offers. For more information on using Affinium assets in offers, see Chapter 7, Offers, on page 293.
Printing a campaign
You can print any page in a campaign using the printer icon in the Campaign toolbar. To print a campaign you created
1
If the campaign you want to print does not appear in the My Campaigns section of your Home page, click All Campaigns. Click the name of the campaign you want to print to open it. Select the campaign tab you want to print.
Unica Confidential
3 4
Version 6.4
77
Chapter 4: Campaigns
Click the printer icon in the Campaign toolbar. A new window opens containing a printer-friendly version of the current page.
6 7
Click Print to print the page. Click Print in the Print dialog box. The page prints.
Editing a campaign
There are several methods you can use to open a campaign for editing. You can see all the campaigns you created on your Home page, you can navigate through the folder structure of all campaigns stored in Affinium Campaign, or you can search for a campaign from either the Home page or Campaigns page. To edit a campaign you created
1
Click Home in the left frame. The Home page appears, as shown in Figure 4-8.
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
If the campaign you want to view does not appear in the My Campaigns section of your Home page, click View all n campaigns. Click the Edit a tab icon ( ) next to the name of the campaign you want to edit.
Select the campaign tab you want to edit. The campaign appears, with the tab you selected opened for editing.
78
Unica Confidential
Running a campaign
Click Campaigns in the left frame. The Campaigns page appears, as shown in Figure 4-3.
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Navigate through the subfolders until you find the one that contains the campaign you want to view. Click the Edit a tab icon ( ) next to the name of the campaign you want to edit.
Select the campaign tab you want to edit. The campaign appears, with the tab you selected opened for editing. To edit a campaign from search results
From either the Home page or the Campaigns page, search for the campaign you want to view. For information and instructions, see Searching for objects in Affinium Campaign on page 59.
On the Search Results page, click the Edit a tab icon ( campaign you want to edit.
Select the campaign tab you want to edit. The campaign appears, with the tab you selected opened for editing.
Running a campaign
To run all the flowcharts in a campaign, select Run > All from the Campaign toolbar.
Version 6.4 Unica Confidential
79
Chapter 4: Campaigns
Important!
If you are editing flowcharts, we recommend that you make sure each flowchart has been saved before you run the campaign.
Data from the run is saved to the appropriate system tables. The results from the previous run will be overwritten by the new run. Each process in each flowchart displays a blue checkmark when it has run successfully. If there are errors, the process displays a red X. For more information, see Troubleshooting runtime errors on page 107. To determine if there were any errors in any of the flowchart runs, click the Analysis tab on the Campaign toolbar and view the Campaign Flowchart Status Summary report. For more information about this report, see Flowchart Status Summary Report on page 399.
Organizing campaigns
You can create a folder structure to organize your campaigns. You can then move campaigns from one folder to another within this structure.
Click Campaigns in the left frame. The Campaigns page appears, as shown in Figure 4-3.
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Click the folder where you want to add the subfolder. Navigate through the folder structure by clicking a folder name to open it, clicking All Campaigns to return to the Campaigns page, or clicking Parent Folder to open the folder that contains the currently open folder.
80
Unica Confidential
Organizing campaigns
Click Add a Subfolder. The New Folder window appears. A completed window is shown in Figure 4-10.
Version 6.4
Unica Confidential
81
Chapter 4: Campaigns
Enter a name and description for the folder in the Folder Name and Description fields. Click Save Changes. The new subfolder appears in its parent folder. To edit a folders name and description
Click Campaigns in the left frame. The Campaigns page appears, as shown in Figure 4-3.
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Click the folder you want to rename. Navigate through the folder structure by clicking a folder name to open it, clicking All Campaigns to return to the Campaigns page, or clicking Parent Folder to open the folder that contains the currently open folder. An example subfolder is shown in Figure 4-9.
82
Unica Confidential
Organizing campaigns
Click Rename. The Folder window appears. This window is similar to the New Folder window shown in Figure 4-10.
Edit the name and description of the folder in the Folder Name and Description fields. Click Save Changes. The name of the folder is changed in its parent folder. To move a folder
Click Campaigns in the left frame. The Campaigns page appears, as shown in Figure 4-3.
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Open the folder that contains the subfolder you want to move. Navigate through the folder structure by clicking a folder name to open it, clicking All Campaigns to return to the Campaigns page, or clicking Parent Folder to open the folder that contains the currently open folder. An example subfolder is shown in Figure 4-9.
Click the checkbox next to the folder you want to move. Click multiple checkboxes to move multiple folders at once.
Click Move. The Move Items To window appears, as shown in Figure 4-11.
Version 6.4
Unica Confidential
83
Chapter 4: Campaigns
Click the folder into which you want to move the selected subfolder. Navigate through the list by clicking the + sign next to a folder to open it.
You can also double-click the folder to select it and accept the location in one step.
The subfolder and all its contents are moved into the destination folder. To delete a folder You must move or delete any campaigns stored within the folder before you can delete it. For more information and instructions, see Moving a campaign on page 85, and Deleting a campaign on page 86.
1
Click Campaigns in the left frame. The Campaigns page appears, as shown in Figure 4-3.
84
Unica Confidential
Organizing campaigns
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Open the folder that contains the subfolder you want to delete. Navigate through the folder structure by clicking a folder name to open it, clicking All Campaigns to return to the Campaigns page, or clicking Parent Folder to open the folder that contains the currently open folder. An example folder is shown in Figure 4-9.
Click the checkbox next to the folder you want to delete. Click multiple checkboxes to delete multiple folders at once.
4 5
Click Delete Selected. Click OK on the confirmation window. The folder and all its empty subfolders are deleted. If your user name has permission to delete a folder, Affinium Campaign allows you to delete any of subfolders within that folder.
Moving a campaign
Important!
If someone is editing a flowchart in the campaign you plan to move, that entire flowchart may be lost when you move the campaign. Please be sure that none of the flowcharts in the campaign are open for editing when you move the campaign.
To move a campaign
1
Click Campaigns in the left frame. The Campaigns page appears, as shown in Figure 4-3.
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Open the folder that contains the campaign you want to move.
Version 6.4
Unica Confidential
85
Chapter 4: Campaigns
Navigate through the folder structure by clicking a folder name to open it, clicking All Campaigns to return to the Campaigns page, or clicking Parent Folder to open the folder that contains the currently open folder. An example folder is shown in Figure 4-9.
3
Click the checkbox next to the campaign you want to move. Click multiple checkboxes to move multiple campaigns at once.
Click Move. The Move Items To window appears, as shown in Figure 4-11.
Click the folder where you want to move the campaign. Navigate through the list by clicking the + sign next to a folder to open it.
You can also double-click the folder to select it and accept the location in one step.
Deleting a campaign
When you delete a campaign, the campaign and all flowchart files are deleted. Contact and response history information is retained. If there are portions of your campaign you want to store for reuse, you can save them as a stored object. For more information, see Derived fields on page 324.
1
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Open the folder that contains the campaign you want to delete.
86
Unica Confidential
Deleting a campaign
Navigate through the folder structure by clicking a folder name to open it, clicking All Campaigns to return to the Campaigns page, or clicking Parent Folder to open the folder that contains the currently open folder. An example subfolder is shown in Figure 4-9.
3
Click the checkbox next to the campaign you want to delete. Click multiple checkboxes to delete multiple campaigns at once.
4 5
Click Delete Selected. Click OK on the confirmation window. The campaign is deleted.
Version 6.4
Unica Confidential
87
Chapter 4: Campaigns
88
Unica Confidential
5 FLOWCHARTS
This chapter describes how to create, view, edit, organize, and delete your campaign flowcharts in Affinium Campaign. It also describes how to manipulate processes within flowcharts. This chapter includes the following topics: Creating a flowchart Viewing a flowchart Editing a flowchart Testing a flowchart Running a flowchart Deleting a flowchart
Unica Confidential
89
Chapter 5: Flowcharts
Creating a flowchart
Campaigns are comprised of one or more flowcharts. Flowcharts are comprised of processes. The processes combined in a flowchart are the heart of Affinium Campaign, since they perform the actual data manipulation, contacts, scheduling, and response tracking; in effect, the processes are how you define and implement a campaign. For example, Figure 5-1 and Figure 5-2 show the two flowcharts of a retention campaign that uses multiple channels to deliver an offer to customers that are likely to be lost through attrition. The campaign flowchart shown in Figure 5-1 uses different channels to deliver an offer to low, medium, and high-value customers. It uses three Select processes to select the customers in each segment most likely to be lost through attrition. These customers are then merged with a Merge process to exclude all the customers that have opted out of marketing contacts. Then, the customers are segmented with a Segment process into value tiers based on their scores. The high value customers are output to a call list with a Call List process, and will be contacted by phone with an offer. The medium value customers are output to a mail list with a Mail List process, and will receive a direct mailing with the offer. The lowest value customers receive the offer via email.
Note
When you are designing flowcharts, be careful not to create cyclical dependencies among your processes. For example, your flowchart has a Select process that provides input to a CreateSeg process. If you choose as input in your Select process a segment that will be created by the same CreateSeg process that the Select process provides output to, you will have created a cyclical dependency. This situation will result in an error when you try to run the process.
Another flowchart in this same campaign tracks responses to the phone, direct mail, and email offers captured by the call center and response capture systems, as shown in Figure 5-2. Response information is then available through the various offer reports in Affinium Campaign. Affinium Campaign provides many features that facilitate the construction of flowcharts, such as the ability to save and reuse objects such as queries, multiple processes, table catalogs, triggers, custom macros, user variables, and definitions of derived fields. For more information, see Chapter 8, Stored Objects, on page 323. 90
Unica Confidential Affinium Campaign Users Guide
Creating a flowchart
Version 6.4
Unica Confidential
91
Chapter 5: Flowcharts
Copying an existing flowchart allows you to save time by starting with a completed flowchart and modifying it to meet your needs. For instructions, see To copy a flowchart on page 96. To create a new campaign flowchart
1
Open the Summary tab of the campaign to which you want to add a flowchart. The Summary tab appears, as shown in Figure 5-3. For more information and instructions, see Viewing a campaign on page 73.
92
Unica Confidential
Creating a flowchart
Select > Add a Flowchart from the Campaign toolbar. A new flowchart tab appears. Figure 5-4 shows example flowchart information.
Version 6.4
Unica Confidential
93
Chapter 5: Flowcharts
Description
Enter a name for the flowchart. Avoid using the percent (%), asterisk (*), ampersand (&), less-than (<), greater-than (>), comma(,), colon (:), question mark (?), double quote (), pipe (|), forward slash(/), and backslash (\) characters. Enter a description of the flowchart. Select one of the following: Standard Batch Flowchart Select this flowchart type to do batch-style processing of large numbers of customers. Interaction Flowchart. Select this flowchart type to process individual customers in real-time. Interaction flowcharts are available only for licensed users of Affinium Campaign Interact. For information and instructions, see the Affinium Campaign Interact Users Guide.
Flowchart Type
94
Unica Confidential
Creating a flowchart
Click Save and Edit Flowchart. The Edit Batch Flowchart page displays the process palette and a blank workspace, as shown in Figure 5-5.
Note
You can click the minimize icon in the left frame to minimize it so that your workspace is maximized. Click the icon again to expand the left frame.
Process palette
Workspace 5
Add processes to your flowchart. A flowchart typically begins with one or more Select or Audience processes to define the customers or other marketable entities with which to work. For more information and instructions, see Working with processes on page 116.
Version 6.4
Unica Confidential
95
Chapter 5: Flowcharts
Currently, you can only create Audience levels through mapping a user table in the Administration page.
Important!
We recommend that you click Save frequently while adding and configuring the processes in your flowchart.
Click Save and Exit when you are finished creating your flowchart. Affinium Campaign saves the flowchart and displays the campaigns Summary tab. To copy a flowchart
Open the flowchart tab of the campaign you want to copy. The flowchart tab appears, as shown in Figure 5-1. For more information and instructions, see Viewing a campaign on page 73.
Figure 5-6 Campaign flowchart tab
Select > Copy Flowchart To from the Campaign toolbar. The Duplicate Flowchart window appears, as shown in Figure 5-7.
96
Unica Confidential
Viewing a flowchart
Select the campaign into which you want to copy the flowchart. Navigate through the list by clicking the + sign next to a folder to open it.
Click Accept This Location. The flowchart appears in the campaign you selected. If the flowchart contained contact processes (Mail List, Call List, eMessage, or Recommend) with assigned offers, those offers are given new, unique tracking codes for their use within the new campaign. The settings displayed in the User Interface are copied to the new flowchart. However, the temp files and temp tables from the original flowchart are not copied to the new flowchart.
Viewing a flowchart
You can view the processes and connections between processes for any flowchart to quickly see the purpose of the campaign flowchart.
Version 6.4
Unica Confidential
97
Chapter 5: Flowcharts
To see more information, such as how processes are configured, you must open the flowchart for editing. If you want to see this additional information, we recommend that you copy the flowchart and review the details in your copy to prevent accidental changes to the flowchart. When the flowchart is open for viewing, you can also zoom out to see more processes at once or zoom in to magnify a portion of the flowchart more closely. To view a flowchart You can view a flowchart in two ways:
Open the flowchart tab directly from the campaign. Open the campaigns Summary or Analysis tab, then click the flowchart tab you want to view.
For more information and instructions, see Viewing a campaign on page 73. To zoom out and in Click the zoom out and zoom in icons ( ) on the flowchart.
Editing a flowchart
You can edit a flowchart to add or remove processes or to configure the processes. You can also edit the flowcharts name and description.
Important!
If you try to edit a flowchart that is already being edited by someone else, Affinium Campaign warns you that the flowchart is open by another user. If you continue opening the flowchart, the other users changes are immediately and permanently lost. To prevent the loss of work, we recommend that you do not continue opening the flowchart without first checking with the other user.
To edit the processes in a flowchart You can edit a flowchart in two ways:
Open the flowchart tab for editing directly from the campaign. For more information and instructions, see Editing a campaign on page 78.
98
Unica Confidential
Editing a flowchart
In the campaign, you can also press Ctrl and click the flowchart tab to open the flowchart in edit mode.
Open the campaigns Summary or Analysis tab, click the flowchart tab you want to edit, then click Edit next to the name of the flowchart. In the campaigns Analysis tab, you can also press Ctrl and click the flowchart name to open the flowchart in edit mode.
For more information and instructions, see Editing a flowchart on page 98. To edit a flowcharts name and description
1
Open the flowchart for editing. For instructions, see Editing a campaign on page 78.
Click Properties in the Flowchart toolbar. The Edit Flowchart Properties window appears. This window is very similar to the New Flowchart window, shown in Figure 5-4.
Version 6.4
Unica Confidential
99
Chapter 5: Flowcharts
Description
Edit the flowcharts name. Avoid using the percent (%), asterisk (*), ampersand (&), less-than (<), greater-than (>), comma(,), colon (:), question mark (?), double quote (), pipe (|), forward slash(/), and backslash (\) characters. Edit the flowcharts description. the flowchart type by selecting one of the following: Standard Batch Flowchart Select this flowchart type to do batch-style processing of large numbers of customers. Interaction Flowchart. Select this flowchart type to process individual customers in real-time. Interaction flowcharts are available only for licensed users of Affinium Campaign Interact. For information and instructions, see the Affinium Campaign Interact Users Guide.
Flowchart Type
Click Save Changes. The new flowchart name appears at the top of the flowchart page and on the flowchart tab.
Keyboard shortcuts
You can use the following keyboard shortcuts in edit mode of an active flowchart. Keystrokes Ctrl+X Ctrl+C
Ctrl+V Ctrl+A
Action
Cut highlighted text. Copy highlighted text. Paste text. Select all text in flow.
100
Unica Confidential
Testing a flowchart
Testing a flowchart
You can conduct a test run on a flowchart or branch if you do not want to output data or update any tables or files.
Note
We recommend that you conduct test runs on processes and branches as you are building flowcharts, so that you can troubleshoot errors as they occur. You should also remember to save each flowchart before you run or test it.
Open a flowchart for editing. The flowchart tab appears, as shown in Figure 5-1. For more information and instructions, see Editing a flowchart on page 98.
Select Run > Test Run Flowchart from the Flowchart toolbar. Each process displays a blue checkmark when it has run successfully. If there are errors, the process displays a red X. For more information, see Troubleshooting runtime errors on page 107. Data is not written to any tables.
Click Save and Return to save the flowchart and display the campaigns Summary tab. You can also click Save to save the flowchart and leave it open for editing, or click Cancel to display the campaigns Summary tab without saving any changes to the flowchart.
Important!
If you click Save and Return before the flowchart has finished running, the flowchart will continue running and save when it finishes. If you or another user re-open the flowchart while it is still running, any changes made to the flowchart are lost. For this reason, we recommend that you always save a flowchart before running it.
If you click Save before the run is complete, the run is paused. If you click Cancel before the run is complete, the run is stopped.
Version 6.4
Unica Confidential
101
Chapter 5: Flowcharts
Click the Analysis tab on the Campaign toolbar and view the Campaign Flowchart Status Summary report to determine if there were any errors in the flowchart run. For more information, see Flowchart Status Summary Report on page 399. To test run a flowchart branch
Open a flowchart for editing. For more information and instructions, see Editing a flowchart on page 98.
2 3
Click a process on the branch you want to test. Select Run > Test Run Sel. Branch from the Flowchart toolbar. Each process displays a blue checkmark when it has run successfully. If there are errors, the process displays a red X. For more information, see Troubleshooting runtime errors on page 107.
Running a flowchart
You can choose to run an entire flowchart, a branch, or an individual process in the flowchart. We recommend that you conduct test runs as you are building flowcharts, so that you can troubleshoot errors as they occur. For information on testing flowcharts, refer to Testing a flowchart on page 101. You should save each flowchart before you run or test it.
Note
Users with Administrative privileges can access the Monitoring page, which displays all running flowcharts and their statuses, and provides
102
Unica Confidential
Running a flowchart
controls to suspend, resume, or stop the flowchart runs. For details, refer to the Affinium Campaign Administrators Guide. To run a flowchart
1
If you are viewing a flowchart, you can run it by selecting Run > Run This from the Campaign toolbar. For instructions on viewing a flowchart, see Viewing a flowchart on page 97. If you are editing a flowchart, save it, then run it by selecting Run > Run Flowchart from the Flowchart toolbar. For instructions on editing a flowchart, see Editing a flowchart on page 98.
If the flowchart has already been run, click OK on the confirmation window. Data from the run is saved to the appropriate system tables. The results from the previous run will be overwritten by the new run. Each process displays a blue checkmark when it has run successfully. If there are errors, the process displays a red X. For more information, see Troubleshooting runtime errors on page 107.
Click Save and Exit to save the flowchart and display the campaigns Summary tab. You can also click Save to save the flowchart and leave it open for editing, or click Cancel to display the campaigns Summary tab without saving any changes to the flowchart. The data from the flowchart run is still saved. You must save the flowchart once after running to view the results of the run in any reports. Once you have saved the flowchart, results of repeated runs are immediately available.
Important!
If you click Save and Exit before the flowchart has finished running, the flowchart will continue running and save when it finishes. If you or another user re-open the flowchart while it is still running, any changes made to the flowchart are lost. For this reason, we recommend that you always save a flowchart before running it.
If you click Save before the run is complete, the run is paused. If you click Cancel before the run is complete, the run is stopped.
Version 6.4
Unica Confidential
103
Chapter 5: Flowcharts
Click the Analysis tab on the Campaign toolbar and view the Campaign Flowchart Status Summary report to determine if there were any errors in the flowchart run. For more information, see Flowchart Status Summary Report on page 399. To run a flowchart branch
Open a flowchart for editing. For more information and instructions, see Editing a flowchart on page 98.
2 3
Click a process on the branch you want to run. Select Run > Run Selected Branch from the Flowchart toolbar.
104
Unica Confidential
Running a flowchart
Each process displays a blue checkmark when it has run successfully. If there are errors, the process displays a red X. For more information, see Troubleshooting runtime errors on page 107. To run a process See Running processes on page 126.
Pausing a run
When you pause a running flowchart, branch, or process, the server stops running, but saves all the data already processed. You may want to pause a run to free up computing resources on the server. After pausing a run, you can continue the run or stop it. For more information, see Continuing a paused run on page 105 and Stopping a run on page 105. To pause a run Select Run > Pause from the Flowchart toolbar.
Stopping a run
You may want to stop a run if you see unexpected results from a process or discover an error in the campaigns logic during the run.
Version 6.4
Unica Confidential
105
Chapter 5: Flowcharts
To stop a run Select Run > Stop from the Flowchart toolbar. The results of any currently running processes are lost and a red X appears on those processes, as shown in Figure 5-9.
Figure 5-9 Flowchart run stopped at the Value Tiers Segment process
106
Unica Confidential
Deleting a flowchart
Continuing a stopped run makes sense in the example shown in Figure 5-9. However, if the run were stopped during the top three Select processes, you should re-run the entire flowchart. To continue a stopped run
1 2
Click the process that displays a red X. Select Run > Run Selected Branch from the Flowchart toolbar.
If Affinium Campaign is configured so that system tables are stored in a database, you are not viewing the flowchart, and the run stops due to a database connection failure, the processes will not display a red X. Instead, the flowchart appears as it did when it was last saved.
You should also consult the log file for system error information, review the reports in the Analysis tab of the campaign, or review the Performance/Profitability reports for the campaign to see that the results are what you expect.
Deleting a flowchart
Deleting a flowchart permanently removes a flowchart and all of its associated files, including the log file. If there are portions of your flowchart that you want to store for reuse, you can save them as a stored object. For more information, see Stored Objects on page 323. Output files (such as those written by a Snapshot, Optimize, or a contact process) are not deleted, and contact and response history information is retained.
Version 6.4
Unica Confidential
107
Chapter 5: Flowcharts
Important!
If you try to delete a flowchart that is being edited by someone else, Affinium Campaign warns you that the flowchart is open by another user. If you continue deleting the flowchart, the other users changes will be permanently lost. To prevent the loss of work, we recommend that you do not continue deleting the flowchart without first checking with the other user.
To delete a flowchart
1
Open the flowchart you want to delete. The flowchart tab appears, as shown in Figure 5-1. For instructions on opening a flowchart, see Viewing a flowchart on page 97.
2 3
Select > Delete Flowchart from the Campaign toolbar. Click OK on the confirmation window. The flowchart and all its associated files are removed.
108
Unica Confidential
6 PROCESSES
This chapter provides an overview of processes and instructions for working with them in Affinium Campaign. Available process are described, and instructions provided on how to configure each process. All the processes available in Affinium Campaign appear alphabetically in this chapter under the List of processes on page 127. This chapter includes the following key topics: Processes overview Types of processes Working with processes List of processes Legacy processes
Processes overview
You configure processes to perform particular tasks in a campaign or session, then combine them in flowcharts to achieve the outputs you want. For example, you use the Merge process to merge two distinct audience groups, or use the
Unica Confidential
109
Chapter 6: Processes
contact processes (Call List, Mail List, eMessage, or Recommend) to write out the results of an entire campaign. Tasks are usually accomplished using processes that work with cells. Cells are lists of identifiers of marketing message recipients (such as customer or prospect IDs). Generally, each process in a flowchart takes one or more cells as input, transforms the data, and produces one or more cells as output. The processes available to you in Affinium Campaign are visible on the flowchart process palette, the space that you use for creating a flowchart and working with processes. You can distinguish the different types of processes by color: data manipulation processes are shown in blue, run processes in red, and optimization processes in green. A blank process workspace with available processes in the process palette is shown in the image below. For more information on the different types of processes, refer to Types of processes on page 111.
Process palette
Workspace
110
Unica Confidential
Types of processes
Types of processes
Affinium Campaign processes are divided into three types, which can be also distinguished by color in the flowchart process palette:
Data manipulation processes blue Run processes red Optimization processes green
Version 6.4
Unica Confidential
111
Chapter 6: Processes
configuring these processes, refer to the sections on the individual processes, under List of processes on page 127. Process Description
Use the Audience process to switch between audience levels or to scope one audience level by another (for example, to choose one individual per household). Audience levels are defined when the customer database tables are mapped into Affinium Campaign.
Audience
For example, the audience levels for a campaign may be defined as Household and Individual. You can use the Audience process to select all individuals who meet a certain criteria, but only make an offer to those consumers who are also the head of their household. For more details, refer to Audience on page 128. Use the Decision process to segment customers by controlling which subsequent branches of the flowchart are run.
Decision
This process is available only to licensed users of Affinium Campaign Interact. For more details, refer to Decision on page 159. Use the Extract process to improve performance by writing specified data into a database table or file for further processing.
Extract
For example, you can extract rows of transational purchase data from the last three months for the current segment of customers for subsequent analysis. This allows you to process a small fraction of a potentially very large database table. For more details, refer to Extract on page 160. Use the Merge process to combine IDs from multiple cells or exclude IDs. For example, you can use the Merge process to exclude all the customers who meet certain criteria (such as delinquent accounts). For more details, refer to Merge on page 191.
Merge
112
Unica Confidential
Types of processes
Process
Description
Use the Sample process to create one or more cells for different treatments, control groups, or subsets for analytic processing. For example, you can use the Sample process if you want a certain percentage of your target audience to receive an email offer, and the rest of the target audience to receive a direct mail offer. For more details, refer to Sample on page 209. Use the Segment process to divide customers into meaningful groups. For example, you can use the Segment process to group customers by account type if you want to treat Platinum account holders differently than Gold account holders. For more details, refer to Segment on page 234. Use the Select process to define criteria to select a list of customers from your data. The Select process outputs a cell containing a list of customer IDs for the campaign, which can be modified and refined by other processes. For more details, refer to Select on page 245.
Sample
Segment
Select
Run processes
Once you have built your campaign to select the audience you want, you need to output the results in a usable way using the run processes. Run processes control the running of the flowchart and trigger actual customer contact. Run processes control the actual execution of completed campaigns, which includes the management and output of contact lists, the treatment of target audiences, the tracking of responses and contacts, the logging of data, and the scheduling of campaign or session runs. The following table lists the run processes in alphabetical order and provides a brief description of their functions. For detailed information about configuring
Version 6.4
Unica Confidential
113
Chapter 6: Processes
these processes, refer to the sections on the individual processes, under List of processes on page 127. Process Call List Description
A contact process. Use the Call List process to assign offers, generate a contact list, and log contact history for telemarketing communications. For more details, refer to Call List on page 153. Use the Create Seg process to create strategic data segments from database tables. For example, strategic segments can be created for commonly used target groups, such as high-value customers. For more details, refer to Create Seg on page 153. Use the Cube process to create data cubes from dimensions derived from database tables. Cubes can then be used for visual selection or interactive drilling and analysis. For more details, refer to Cube on page 155. A contact process. Use the eMessage process to support personalized email execution. Available only to licensed users of Affinium Campaign eMessage. For more details, refer to eMessage on page 160. Use the Event In process to accept data from a UDI queue to begin processing in an interaction flowchart. Available only to licensed users of Affinium Campaign Interact. For more details, refer to Event In on page 160. Use the Event Out process to write data to a UDI queue. Available only to licensed users of Affinium Campaign Interact. For more details, refer to Event Out on page 160. A contact process. Use the Mail List process to assign offers, generate a contact list, and log contact history for direct mail communications. For more details, refer to Mail List on page 164.
Create Seg
Cube
eMessage
Event In
Event Out
Mail List
114
Unica Confidential
Types of processes
Process Recommend
Description
A contact process. Use the Recommend process to generate a list of recommended offers for a customer. Available only to licensed users of Affinium Campaign Interact. For more details, refer to Recommend on page 198. Use the Schedule process to specify when a flowchart, group of processes, or a single process should run. For example, you can take snapshots of data at specified time intervals or at preset campaign stages. External events can also trigger campaigns. For more details, refer to Schedule on page 219. Use the Snapshot process to output the data from the flowchart to a database table or flat file. For example, you can use the output of the Snapshot process to measure changes over the course of a campaign, such as the changes in credit card use following a usage stimulation campaign. For more details, refer to Snapshot on page 276.
Schedule
Snapshot
Optimization processes
Optimization processes let you fine tune your campaign to maximize effectiveness. You use optimization processes to generate scores to refine audience selection. They allow you to track contacts and responses, and use the results of predictive modeling from Affinium Campaign or from data mining products like Affinium Model to refine audience selection and maximize ROI. Optimization processes can also provide the ability to determine the most effective campaign, offer, and channel across your entire organization to use for contacting each individual prospect. The following table lists the optimization processes in alphabetical order and provides a brief description of their functions. or detailed information about
Version 6.4
Unica Confidential
115
Chapter 6: Processes
configuring these processes, refer to the sections on the individual processes, under List of processes on page 127. Process Model Description
Use the Model process to generate response models using the Affinium Campaign modeling engine. For more details, refer to Model on page 194. Use the Optimize process to allow your organization to determine the optimal interaction strategy for each customer across multiple marketing campaigns offers and channels. Available only to licensed users of Affinium Campaign Optimize. For more details, refer to Optimize on page 197. Use the Response process to record the IDs, response type, and response data for the customers who responded to a contact process (Mail List, Call List, eMessage, or Recommend). This information can then be displayed in a number of performance and profitability reports. For more details, refer to Response on page 198. Use the Score process to score the IDs in a cell using one or more models created either in a Model process or in Affinium Model. For example, you can score a list to identify the best customers or prospects for an offer you plan to use. For more details, refer to Score on page 230. Use the Track process to delay the recording of IDs and offer information for the customers who were contacted in one of the contact processes, or for offers given to an individual by Affinium Campaign Interact. If you use the Track process to record this information, in can be displayed in reports. For more details, refer to Track on page 280.
Optimize
Response
Score
Track
116
Unica Confidential
designs until you are completely satisfied. The following sections describes the tasks you can perform with processes:
Adding new processes to flowcharts Copying, cutting and pasting processes Pasting processes from the template library Moving processes Deleting processes Connecting processes Configuring and editing processes Running processes
For general information about processes, see Processes overview on page 109. For detailed information about each process, see the sections on the individual processes, in the section List of processes on page 127.
Within a campaign, open a flowchart for editing. (For more information about editing flowcharts, see Editing a flowchart on page 98.) You see the process palette and workspace.
Version 6.4
Unica Confidential
117
Chapter 6: Processes
In the process palette, click the process that you want to add to your flowchart. (For more information about individual processes, see Types of processes on page 111.) The process is highlighted.
Click in the workspace where you want to position the process. The process that you selected is added to the workspace. Newly added processes are gray until they are correctly configured, at which time they are displayed in color based on their type (data manipulation processes are blue, run processes are red, and optimization processes are green).
Right-click to view the list of actions you can perform on the process. For details about configuring processes, refer to Configuring and editing processes on page 124 and to the sections on individual processes under List of processes on page 127.
Within a campaign, open a flowchart for editing. (For more information about editing flowcharts, see Editing a flowchart on page 98.) You see the process palette and workspace.
From the processes that are already in the workspace, click the process that you want to copy.
118
Unica Confidential
Note
You can Shift+Click to select multiple processes, drag the mouse to select a group of processes, or press Ctrl+A to select all the processes in the flowchart. ) on the Flowchart toolbar.
You can also click Copy from the context menu, or press Ctrl+C.
4
You can also click Paste from the context menu, or press Ctrl+C. A copy of the process appears in the workspace.
5
Click on and drag the copied process to the desired area of your flowchart. To cut a process
Within a campaign, open a flowchart for editing. (For more information about editing flowcharts, see Editing a flowchart on page 98.) You see the process palette and workspace.
From the processes that are already in the workspace, click the process that you want to cut.
Note
You can Shift+Click to select multiple processes, drag the mouse to select a group of processes, or press Ctrl+A to select all the processes in the flowchart. ) on the Flowchart toolbar.
You can also click Cut from the context menu, or press Ctrl+X. The process is removed from the flowchart and saved on the clipboard. You can then paste this process back into the current flowchart or into another flowchart.
Version 6.4
Unica Confidential
119
Chapter 6: Processes
Within a campaign, open a flowchart for editing. (For more information about editing flowcharts, see Editing a flowchart on page 98.) You see the process palette and workspace.
Select Tools > Stored Templates from the Flowchart menu. You see the Stored Templates window, listing the available templates.
3 4
Select the template you want to paste into your flowchart from the Items List. Click Paste Template. The process or processes you selected are pasted into the flowchart.
120
Unica Confidential
Moving processes
You can move any process at any time in a flowchart you are editing by dragging it to a different location on the workspace. Affinium Campaign allows you to position processes on top of each another. However, we do not recommend this practice. If you have a large flowchart with many processes, try using the zoom functionality so that you can see all processes, instead of overlapping them. For more information, see Viewing a flowchart on page 97. To move a process
1
Within a campaign, open a flowchart for editing. (For more information about editing flowcharts, see Editing a flowchart on page 98.) You see the process palette and workspace.
In the workspace, click and drag the process that you want to move to its new location. When you release the mouse, the process is moved to the new position. Existing connections to and from the process you are moving remain, and are redrawn for the new location.
Deleting processes
As you design and build flowcharts you might need to remove processes that you have added.
Important!
If you have run a flowchart in production, it is important that you do not delete any contact-style processes (CSPs) Call List, eMessage, Mail List, or Recommend or flowcharts containing CSPs. Doing so will remove the underlying Offer Tracking Instances (OTIs) created by these CSPs, and cause responses or logging of contacts to be lost. Moving a flowchart from one campaign to another, or moving an offer from one folder to another will not break the linkages for the response tracking process. However, if you delete a CSP that
Version 6.4
Unica Confidential
121
Chapter 6: Processes
created OTIs, the Track process will not be able to find the removed OTIs, resulting in lost contact logging or response tracking. To delete a process
1
Within a campaign, open a flowchart for editing. (For more information about editing flowcharts, see Editing a flowchart on page 98.) You see the process palette and workspace.
In the workspace, right-click the process that you want to delete, and select Delete from the context menu.
Note
You can select more than one process at the same time by holding down the Shift key as you select using the mouse.
You see a confirmation message asking if you want to remove the selected items.
3 4
Click OK. The selected process(es) are removed from the workspace. Any connections to and from the processes are also deleted from the flowchart.
Connecting processes
You connect the processes in your flowchart to specify the direction of data flow and the order in which processes are run. If you move processes within the workspace, existing connections will remain, and will adjust to the moved processs new location. Connections can be easily added or deleted. To connect two processes
1
Within a campaign, open a flowchart for editing. (For more information about editing flowcharts, see Editing a flowchart on page 98.) You see the process palette and workspace.
122
Unica Confidential
Move your cursor over the connection box in the process from which you want to create a connection. The cursor changes to three downward arrows.
Click and drag a line to the process to which you want to make a connection. The source process is highlighted. As you drag your cursor, the connecting line is drawn from the source process.
Release the mouse anywhere over the destination process. The source and destination process are connected with an arrow showing the direction of data flow. The source process will run before the destination process, and data output from the source process can be available as input to the destination process. If the destination process receives data from the source process, the connection is shown as a solid line. If the destination process does not receive data from the source process but cannot run successfully until the source process has completed, the connection is shown as a dotted line. To delete a connection
Within a campaign, open a flowchart for editing. (For more information about editing flowcharts, see Editing a flowchart on page 98.) You see the process palette and workspace.
2 3
Click the connection that you want to delete. Do one of the following:
Right-click the connection, and select Delete from the context menu. Press the Delete key. Click the Cut icon ( Press Ctrl+X. ) on the Flowchart toolbar.
Version 6.4
Unica Confidential
123
Chapter 6: Processes
Example Flowchart
The following flowchart is scheduled to run automatically each night. The dotted line connections between the Schedule process and three Select processes indicate that the Select processes will not run until the Schedule process finishes running, but that no data is passed from the Schedule process to the Select processes.
124
Unica Confidential
The information required by each process is unique and depends on the function the process performs. For detailed configuration information about each process type, see each section under List of processes on page 127.
Important!
If you have run a flowchart in production, it is important that you do not delete any contact-style processes (CSPs) CallList, eMessage, MailList, or Recommend or edit them in such a way that the underlying Offer Tracking Instances (OTIs) created by these CSPs are lost. If you reconfigure a CSP that has already been run in production to use a different offer, you will deleting the associated OTIs, and cause responses or logging of contacts to be lost. Moving a flowchart from one campaign to another, or moving an offer from one folder to another will not break the linkages for the response tracking process. However, if you delete a CSP that created OTIs, the Track process will not be able to find the removed OTIs, resulting in lost contact logging or response tracking.
To configure a process
Note
We recommend that you configure the processes in your flowchart in the order in which they will be executed when the campaign is run. Some processes must be connected before they are configured because they require input from a source process. For more information and instructions, see Connecting processes on page 122.
Within a campaign, open a flowchart for editing. (For more information about editing flowcharts, see Editing a flowchart on page 98.) You see the process palette and workspace.
Double-click the process that you want to configure. You can also right-click the process and select Process Configuration from the context menu. You see the Process Configuration window for the process.
Enter information into the fields on each tab of the Process Configuration window. For assistance, click the Help button.
Version 6.4
Unica Confidential
125
Chapter 6: Processes
For detailed configuration information about each process type, see each section under List of processes on page 127.
4
When you have finished entering the configuration details, click OK. Correctly configured processes are displayed in color (the specific color reflects the type of process). A gray process with its name in italics has a configuration error. To find out more information about the error, hold your mouse over the process to display a descriptive error message.
Running processes
We recommend that you run each process as soon as you configure and connect it to make sure that your configuration is successful and that the results are what you expect.
Important!
When you run a process, any results from a previous run are lost.
To run a process
1
Within a campaign, open a flowchart for editing. (For more information about editing flowcharts, see Editing a flowchart on page 98.) You see the process palette and workspace with your configured process(es).
Click the process that you want to run. If the process requires data from a source process, be sure that the source process has already run successfully so that its data is available.
Select Run > Run Selected Process from the Flowchart menu. You can also rightclick the process and select Run > Run Selected Process from the context menu. When the process finishes running, click OK on the confirmation window. The process displays a blue checkmark when it has run successfully. If there are errors, the process displays a red X. For more information, see Troubleshooting runtime errors on page 107.
126
Unica Confidential
List of processes
List of processes
The following processes, listed alphabetically, are available in Affinium Campaign. For processes from previous versions of Affinium Campaign, refer to Legacy processes on page 292.
Audience Call List Create Seg Cube Decision eMessage Event In Event Out Extract Mail List Merge Model Optimize Recommend Response Sample Schedule Score Segment Select Snapshot Track
Version 6.4
Unica Confidential
127
Chapter 6: Processes
Audience
Audience levels define the target entity with which you want to work, such as account, customer, household, product, or business division and are defined during the table mapping process. For more information about audience levels, see the Affinium Campaign Administrators Guide. The Audience process allows you to switch between and work within different audience levels. Using this process, you can select all, some, or a single entity at one level in relationship to another level. You can use the Audience process to:
Select one customer per household based on some business rule (for example, oldest male or highest account balance) Select all accounts belonging to a particular set of customers Select all accounts with a negative balance belonging to a particular set of customers Select all households with individuals holding checking accounts Select customers with three or more purchases within a specified time-frame As the Audience process can select from any defined table(s), it can also be used as a top-level process to initially select data for a flowchart.
Note
One key is defined as the primary or default key for the table. (This default key represents the audience used most frequently for this data source.) The other keys are alternate keys that are available for switching audience levels.
Once you switch audience levels, Affinium Campaign displays only those tables whose default key is defined at the same audience level. If you work at different audience levels on a regular basis, you may also need to map the same table more
128
Unica Confidential
List of processes
than once within Campaign, each time with a different primary/default key. The default level associated with a table is specified during the table mapping process. For more information on table mappings, see Affinium Campaign Administrators Guide. If you are using multiple audience levels (for example, customer and household), you will want to understand how you can work with audience levels and the Audience process to accomplish your business objectives, and how you can define audience levels in the table mapping process. The options available in the Audience Process Configuration window depend on your selections:
Whether the input and output audience levels are the same or different Whether or not the audience level values are normalized in these tables Whether or not there are multiple audience levels defined for the selected tables
For this reason, not all of these options described in the following sections might be available for any particular pair of input and output table selections. The following sections contain instructions for using the features in the Audience process.
Audience Levels Householding Switching Levels Configuring the Audience process Selecting an input audience Selecting an output audience Assigning customers to an audience Using the same input and output audience levels
Audience Levels
The Audience process has an input audience level and an output audience level. The input audience level is the default audience level of the source cell or table
Version 6.4
Unica Confidential
129
Chapter 6: Processes
selected in the Input Cell drop-down list. The output audience level is specified in the Choose Level drop-down list. The input and output audience levels can be the same (for example, both Customer) or different (for example, Customer and HouseHold). These two options are described in the following sections. Audience levels must be created by an Affinium Campaign administrator, are global, and are attached to each mapped base table. Thus, when a flowchart is loaded the audience levels are loaded along with the table mappings within that flowchart. For information on how to select audience levels when mapping a table, see the Affinium Campaign Administrators Guide. When mapping a table, if you are not an administrator, you are only allowed to select from the predefined list of audience levels. The global list of audience levels is stored in unica_tbmgr.bin. If you want to add old audience levels to the global list, load an old flowchart and remap the tables containing the audience levels you want to add. Each global audience level has four system tables associated with them. When a new audience level is added to the global list, those tables are initially unmapped. They appear in the system tables list, and you can map them as you would map other system tables. Note that only the Mail List, Call List, and Response processes can use the associated system tables, and then only if you check the Log to Contact History or Log to Response History boxes. Audience levels are typically organized hierarchically. Here are some examples of audience levels that may be commonly found within customer marketing databases:
Household Company
Customer Division
An unlimited number of audience levels can be defined and used. Moving from one audience level to another requires both audience level keys to be defined within the same table. This provides an easy look up mechanism to switch from one level to another.
130
Unica Confidential
List of processes
Householding
Householding is used as a very general term here to describe reducing the current members in the current audience level by scoping via another audience level. One of the most common examples here is to identify a single individual to target within a household. The individual is selected according to a marketing business rule, for example:
Individual with maximum dollar value across all accounts Individual with the most purchases within a particular product category Individual with the greatest tenure Youngest male over 18 within the household
For more information on using Audience to perform householding, see Householding on page 131.
Switching Levels
Some complex campaigns require processing at different audience levels to select the final target entities. This can involve starting at one audience level, performing some computations, moving to another audience level, performing other computations, and so on. For example, you may want to support complex suppressions at different levels. As a result, in a data model where there is a one-to-many or many-to-many relationship between customers and accounts, a marketing analyst might want to build a campaign that does the following:
Eliminates all accounts of customers that satisfy certain criteria (for example, any account is in default) Eliminates particular accounts that satisfy certain criteria (for example, eliminate low-profitability accounts)
In this example, the campaign might start at the customer level, perform customer-level suppressions, switch to the account level, apply account-level suppressions, and then switch back to the customer level for the final contact. For more information on using Audience to switch levels, see Switching Levels on page 131.
Version 6.4
Unica Confidential
131
Chapter 6: Processes
Double-click the Audience process in the flowchart workspace. For more information and instructions on adding processes to your flowchart, see Editing a flowchart on page 98. The Audience Process Configuration window displays the Source tab, as shown in Figure 6-1.
Figure 6-1 Audience Process Configuration window Source tab
Choose the input audience. The input audience is automatically determined by the data source you select.
Select the output audience. What you see on the Source tab depends on whether you are using different audience levels for input and output, or the same audience level for both. For more information and instructions, see:
Using the same input and output audience levels on page 135 Using Different Input and Output Audience Levels on page 145
132
Unica Confidential
List of processes
[Audience] is used to represent the audience level in the following sections because the text will vary to reflect the audience level you have selected for that field. For example, [Audience] may be replaced by Customer, if you select the Customer audience level. (Review the figures for each Select option to see examples.)
4 5
Assign customers to the correct audience(s). If you want to set limitations on the size of the output cell (that is, to limit the number of IDs generated by the Select process which can be used as input by another process in the flowchart), click on the Cell Size Limit tab. Click the General Tab to assign a name and description to the process. The General Tab is found in the configuration window of every process, and is the area where you can optionally provide a descriptive name for the process and add descriptive text for future reference.
Click OK. The Audience process is configured and appears enabled in the flowchart. You can test run the process to verify that the selection it performs returns the results you expect.
Version 6.4
Unica Confidential
133
Chapter 6: Processes
Select the input data source (cell or table) from the Input drop-down list. All tables from the Table Catalog (that is, the tables that are currently defined within this flowchart) are available in the list. If one or more processes are connected to the Audience process, their output cells will appear as well. Each table or incoming cell has a default audience level. This audience level is defined when the table is mapped. (For more information on creating tables and defining audience levels, see Affinium Campaign Administrators Guide.) Once you select an input data source, the default audience level is shown to the right of the selection.
134
Unica Confidential
List of processes
The audience levels in a table are defined through the Table Catalog. If you do not see a desired output level, you will need to remap a table that contains the field representing the input audience level and a field representing the output audience level.
To change the default audience level or to add/remove audience levels, remap the table. See Affinium Campaign Administrators Guide. For instructions on configuring the input data source selection, see To select an input audience on page 133. If no match is found for an ID in the selected table, the ID (or translated level associated with the ID) will not appear in the output cell.
Important!
Select the output audience level from the Choose Audience drop-down list. All available audience levels that have a relationship to the input audience level appear in the list. The list shows the audience level and the table in which it is defined. The relationship of the input and output audience levels define the available options on the rest of the window, so that you will see different options if you are staying within the same level than if you are switching levels.
One [Input/Output Audience] Entry per [Different Audience] on page 137 Some [Input/Output Audience] Records per [Different Audience] on page 139 For Each [Audience] on page 140
Version 6.4
Unica Confidential
135
Chapter 6: Processes
Figure 6-2 shows the available Select options, where the input and output audience level are both Rel ID (Relationship ID).
Figure 6-2 Select Options with Relationship ID as Both Input & Output
The Select options are described in the following sections. This part of the window varies depending on the selected audience levels. The relationship of the input and output audience levels defines what Select options are available. Options that are not meaningful are grayed out. For example, if a particular audience level (for example, Customer) is normalized within a table, the option to select one level (for example, Customer) per other level (for example, Household) is not available. If there are multiple levels defined in the table, the Select option would be One Customer Entry per, with a drop-down list appearing with the available audience level options.
136
Unica Confidential
List of processes
The Select options include: Method One Per Some Per For Each Description
One member of the input/output audience level, scoped by another audience level Some members of the input/output audience level, scoped by another audience level Select members if the number of members at the selected audience level satisfies some condition
Example
One customer per household All customers with above average purchases within the household Number of accounts > 1, or number of purchases > 3
Version 6.4
Unica Confidential
137
Chapter 6: Processes
Select an input source for Input and the same audience level for the output audience in Audience. The Select options become available.
2 3
Enable the One <Input Audience Level> Entry Per option. Select an audience level from the drop-down list. All alternate defined audience levels (other than the input audience) appear in the list.
Any One eliminates the need to pick a Based On value MaxOf returns the maximum value of the selected field MedianOf returns the median value of the selected field MinOf returns the minimum value of the selected field
Each of these functions will return exactly one member from the input audience level. If more than one entry is tied at the maximum, minimum, or median value, the first encountered entry is returned.
5
Select a field from the field drop-down list. This drop-down list includes all the fields from the table selected in the Choose Audience field, and any mapped dimension tables. You can expand a table by clicking on the + sign. Created derived fields are listed at the bottom. (Optional) You can create and /or select derived field(s) by clicking on the Derived Fields button.
(Optional) To filter records before performing the Based On computation, click the Filter button. (If you dont want to use Filter, skip to step 7.)
138
Unica Confidential
List of processes
The Specify Selection Criteria window appears. Enter or build a valid query expression and click OK to save your entry and close the Specify Selection Criteria window. For more information on creating queries, see Creating Queries on page 249.
7
(When you have finished, click OK to close the Audience Process Configuration window, saving your changes.
Version 6.4
Unica Confidential
139
Chapter 6: Processes
Select an input source for Input and the same audience level for the output audience in Audience. The Select options become available.
2 3 4
Select an input data source. Click to select the Some <Input Audience Level> Entries Per option. Select an audience level from the drop-down list. All alternate defined audience levels (other than the input audience) appear in the list.
Click in the Based On field to enter a query. The Specify Selection Criteria window appears.
Enter or build a valid query expression, then click OK to save it and close the Specify Selection Criteria window. (For more information on creating queries, see Creating Queries on page 249.)
Click OK to close the Audience Process Configuration window, saving your configuration edits.
140
Unica Confidential
List of processes
Select an input source for Input and the same audience level for the output audience in Audience. The Select options become available.
Select For Each <Input Audience Level>. This option is available only if the input audience level is not normalized (that is, the record ID is not unique in the selected Choose Level table).
Choose a Based On selection. If the table you select under Choose Audience is not normalized, there may be duplication in your results. You can use a Based On method for Affinium Campaign to use when selecting records, to avoid duplication. (For example, if your results might include more than one individual in the same household, you can use Based On to select only one individual from that household, based on the criterion you configure in this feature.) You must select one of the Based On methods, either Count or Condition:
Version 6.4
Unica Confidential
141
Chapter 6: Processes
This option lets you select the <Input Audience Level> ID, where the number of occurrences of the <Input Audience Level> ID satisfies the specified condition. To toggle between different relationships (<,<=,>,>=,=), click the operator button repeatedly until the desired relation is displayed. (Figure 6-6 shows an example of this option, where an ID is selected if it occurs more than 10 times in the table.) OR
Click in the text box to the right of Condition. The Specify Selection Criteria window appears. Enter or build a valid query expression, then click OK to save your entry and close the Specify Selection Criteria window. (For more information on creating queries, see Creating Queries on page 249.) (See Figure 6-7 for an example of this option, where an ID is selected if it meets the criteria set in a query.)
Figure 6-6 Using a Based On Count
142
Unica Confidential
List of processes
(Optional) If you have selected a count to be based on, Filter becomes available. To filter records before performing the Based On computation, click Filter. The Specify Selection Criteria window appears. Enter or build a valid query expression and click OK to close the Specify Selection Criteria window, saving your query. (For more information on creating queries, see Creating Queries on page 249.)
Click OK to close the Audience Process Configuration window, saving your entries.
If you select One [Audience] Per [Audience] (for example, one customer per household), your selection may be based on the minimum, maximum, or median value of some other specified field (for example, INCOME or AGE) or any record.
Version 6.4
Unica Confidential
143
Chapter 6: Processes
If you select Some Entries Per [Audience], clicking in the Based On text box will display the Specify Selection Criteria window, where you can enter a query. (For more information on entering a query, see Creating Queries on page 249.)
Example
Figure 6-8 shows a configured Audience process.
The selected input audience level is Customer, since it is the default audience level of the DEMO_ACCOUNT table (this audience level is displayed to the right of the Input). The output audience level is the same: Customer as defined in the DEMO_ACCOUNT table. The DEMO_ACCOUNT table has two other audience levels defined: Branch and HouseHold. The process is configured to choose one Customer Entry per HouseHold based on the maximum of the field HIGHEST_ACC_IND.
144
Unica Confidential
List of processes
Filtering Records
When you configure an Audience process to select IDs based on a count, or a statistical function (MaxOf, MedianOf, MinOf) or Any One (as in Figure 6-8), the Filter feature becomes available. When you click Filter, the Specify Selection Criteria window appears, which allows you to enter a query expression to specify which records will be used in the Based On calculation. The filtering criteria is applied before performing the Based On calculation, thereby allowing you to remove records from consideration.
Example
You may want to constrain the date range over which an operation is performed. To use only purchase transactions over the last year, you can enter a filter query expression like: CURRENT_JULIAN() - DATE(PURCH_DATE) <= 365 Then if you are computing a Based On calculation that chooses the sum of the Amount field, only the amounts from transactions within the last year are summed together. For more information about working with audience levels, see Audience Levels on page 129.
All <Output Audience Level> Entries on page 146 Some <Different Output Audience Level> Entries on page 147 One <Output Audience Level> per <Different Input Audience Level> on page 149
(For options available when the input and output audience levels are the same, see Using the same input and output audience levels on page 135.)
Version 6.4
Unica Confidential
145
Chapter 6: Processes
Figure 6-9 shows an example of an Audience process using different input and output audience levels.
Figure 6-9 Using Different Audience Levels for Input and Output
The Select options include: Method All Some One Per Description
Select all members of the input audience level, scoped by another audience level Select some members of the output audience level, keeping only those IDs that satisfy a specified condition Select exactly one output audience record for each input audience record
Example
All customers per household All customers aged 18 or over within a household One customer per household
Unica Confidential
List of processes
Select an input source for Input and a different output audience for Choose Audience. The Select options become available.
Click OK to close the Audience Process Configuration window and save the configuration.
Version 6.4
Unica Confidential
147
Chapter 6: Processes
Select an input source for Input and a different output audience for Choose Audience. The Select options become available.
Click to select Some <Output Audience Level> Entries. The Based On field becomes available.
Click in the Based On field to enter a query. The Specify Selection Criteria window appears, as shown in Figure 6-11.
Figure 6-11 The Specify Selection Criteria window
Enter or build a valid query expression, then click OK to save the query and close the Specify Selection Criteria window. (For more information on creating queries, see Creating Queries on page 249.)
Click OK to close the Audience Process Configuration window, saving your entries. Figure 6-12 shows an example of selecting Some <Output Audience Level> Entries.
148
Unica Confidential
List of processes
Version 6.4
Unica Confidential
149
Chapter 6: Processes
Select an input source for Input and an output audience for Audience. The Select options become available.
2 3
Select One <Output Audience Level> per <Input Audience Level>. Select a value from the Based On drop-down list. (Note that field selection, using the drop-down list to the right, becomes grayed out when you select Any One. If this is your selection, skip to step 5.)
Select a field in the next drop-down list to which the Based On function relates:
a Click in the Based On text box.
The Select Field window appears. All fields from the table selected in the Choose Audience drop-down list appear, including any mapped dimension tables. You can expand a table by clicking on the + sign. Created derived fields are listed at the bottom.
b Select a field and click OK.
150
Unica Confidential
List of processes
(Optional) To filter records before performing the Based On computation, use Filter. See Filtering Records on page 145 for information about this option. For more information on creating queries, see Creating Queries on page 249. Click OK to close the Audience Process Configuration window, saving your entries. To create a custom macro from the Audience process
From the Source tab of the Audience process window, click on the Filter button, as shown in Figure 6-15.
Version 6.4
Unica Confidential
151
Chapter 6: Processes
In the Specify selection criteria window, click on the Custom Macros button. The Stored List window appears.
152
Unica Confidential
List of processes
Call List
The Call List process is a contact-style process (CSP). It generates a contact list for a telemarketing campaign, assigns specific offers to that contact list, and logs the contact history. You configure a Call List process the same way you configure a Mail List process. For more information and instructions, see Mail List on page 164.
Create Seg
The Create Seg process supports the creation of data segments from customer database tables which are then used as the basis for selects and for creating dimensions and cubes. The Create Seg process is designed to be used by the Campaign administrator, and should be created and defined in the Sessions area of the application, so that the segments are strategic and are available globally for use in all campaigns. For more information see Chapter 9, Sessions, on page 357.
Note
You can use this process in a campaign rather than a session flowchart, but we recommend that all global constructs be created in the Sessions area of the application.
Create a segment in the Sessions area of the application. Manage segments from the Segments area of the application. Add segments to and remove segments from campaigns from the Campaign section of the application.
In the Sessions area of the application, select Add a Flowchart. Select a Create Seg process box and drag and drop it onto the workspace. Connect the Creat Seg process to one or more data manipulation processes (like a Select process, for example).
Version 6.4
Unica Confidential
153
Chapter 6: Processes
Double click on the Creat Seg process box to bring up the configuration window. From the configuration window, do the following:
a Select one or more source cells from the Source Cell(s) pull-down menu.
the checkbox. In almost all cases you would want mutually exclusive segments, since dimensions and cubes require that segments be mutually exclusive.
c Highlight an input cell in the Result Segments area and click on the Edit
stored.
b Give the segment a name that describes its purpose, and then provide a brief
Click on the General tab. From the General tab do the following:
a Provide a descriptive name for the Create Seg process. This will appear on
154
Unica Confidential
The segment(s) are now configured. They can be managed from the Segments area of the application, and are available for use in all campaigns.
Cube
The Cube process supports the creation of data cubes from dimensions based on input cells or strategic segments that have been created from customer database tables. For more information on dimensions and strategic segments, see Chapter 9, Sessions, on page 357.
Note
The Cube process is intended to be used by the very technical user or a Unica consultant. We recommend that all global constructs (cubes and strategic segments, for example) be created in the Sessions area of the application.
Users can select a defined segment or a series of input cells, create a cube, and then drill into the data to select a target audience which can then be converted into the appropriate process boxes (the Select process, for example) for inclusion in a flowchart. Strategic segments, dimension hierarchies, and cubes are all interrelated. Whereas a cube can be created from any list of IDs, it is more powerful if it is based on a strategic segment, since cubes based on strategic segments are global and can be analyzed by the various segment reports.
Note
Only cubes that are built on strategic segments are available through the segment analysis reports; cubes that are built within a flowchart are only accessible through that flowchart.
To create a cube
1
Before you can create a cube, you must create a strategic segment or dimension hierarchy. In the Sessions area of the application, select Add a Flowchart.
Version 6.4
Unica Confidential
155
Chapter 6: Processes
3 4
Select a Cube process box and drag and drop it onto the workspace. Connect the Cube process to one or more data manipulation processes (like a Select process, for example) or use it separately without a connecting process. Double click on the Cube process box to bring up the configuration window. The Source window appears by default.
Figure 6-17 Cube Configuration window
Select a source for the cube. You can select either a segment or an input cell, and then choose the source from the corresponding pull-down menu. You can choose one or multiple sources. In almost all cases you will choose to create a cube from a strategic segment so that it can be available globally. If you create a cube from a cell, the cube is not available globally; its scope is restricted to the flowchart where it was created.
Important!
If selecting more than one source segment or cell, ensure that they have the same audience level.
To define the cube, click on the Cube Definitions tab. The Cube Definitions window appears, as shown in Figure 6-18.
156
Unica Confidential
List of processes
6-19.
Version 6.4
Unica Confidential
157
Chapter 6: Processes
b Enter a name and a description of the cube in the appropriate areas. c Select up to three dimensions from the corresponding pull-down menus.
The dimensions must be related to the strategic segments that the cube source is based on.
d When you are satisfied with your choices, click the OK button. The Edit Cube
window disappears and the new cube definition appear in the main Cube Definitions window.
9
If you wish to track additional fields, click on the Select Additional Fields to Track button. The Select Additional Fields window appears, as shown in Figure 6-20.
158
Unica Confidential
List of processes
From the Select Additional Fields window you can do the following:
Select fields for tracking Create derived fields to track For information on derived fields, see Derived fields on page 324. Profile fields For information on profiling, see Profiling a field on page 262.
10 To provide an intuitive name and a brief description of this instance of the Cube
Decision
The Decision process is available for licensed users of Affinium Campaign Interact. Adding a Decision process to an interaction flowchart allows you to segment customers by controlling which subsequent branches of the flowchart are executed. For more information and instructions, see the Affinium Campaign Interact Users Guide.
Version 6.4
Unica Confidential
159
Chapter 6: Processes
eMessage
The eMessage process is available for licensed users of Affinium Campaign eMessage. Adding an eMessage process to your flowchart allows you to attach emails and website offers to a campaign. For more information and instructions, see the Affinium Campaign eMessage Users Guide.
Event In
The Event In process is available for licensed users of Affinium Campaign Interact. Adding an Event In process to a interaction flowchart allows you to accept an event from a UDI queue and then passes the event on to other processes for manipulation. For more information and instructions, see the Affinium Campaign Interact Users Guide.
Event Out
The Event Out process is available for licensed users of Affinium Campaign Interact and Affinium Campaign eMessage. Adding an Event Out process to a flowchart allows you to write data to a UDI queue. For more information and instructions, see the Affinium Campaign Interact Users Guide or the Affinium Campaign eMessage Users Guide.
Extract
The Extract process allows you to to select fields from one table and write them out to another table for subsequent processing. It is designed to pare down your huge transaction history table to a manageable size for subsequent operations, resulting in vast improvements in performance. For example, suppose that you design a campaign to do selections/calculations based on the last three months of purchase transactions for all non-delinquent customers, approximately 90% of your customer base, and 4 Gb of data.
160
Unica Confidential
List of processes
Even if Affinium Campaign created a temp table for these customers, joining it back to the purchase transaction table would entail pulling over approximately 90% of the 4Gb rows (and discarding all transactions except for the last three months) to execute a GROUP BY macro, for example. The Extract process (placed at the purchase transaction level) could be configured to pull out all transactions within the last three months, put them into a table in the database, and then subsequently run multiple GROUP BYs and other calculations against it (for example, min/max and average). If you use several Extract processes in a series, only the fields in the final Extract process are written out. If you use several Extract processes in parallel (that is, in different branches in the same flowchart), they behave the same as persistent derived fields:
The extracted fields attach to the inbound cell The extracted fields are calculated before query execution in that process Multiple extracted fields are available in subsequent processes When extracted fields are sent to a contact process:
If an extracted field is not defined for a cell, its value = NULL If single ID is > 1 cell, 1 row is output for each cell
An extracted field is not available for segment by field when multiple input cells selected. An extracted field must exist in all selected input cells for use in segment by query
Data is extracted as either a binary file on the Affinium Campaign server or as a table in a datamart with a UAC_EX prefix. Unlike a temp table, an extracted table is not deleted at the end of a flowchart run. It needs to persist so that users can continue to access it in order to perform operations on it, like profiling its fields, for example. An extracted table is only deleted when you delete its associated Extract process, flowchart, campaign, or session.
Version 6.4
Unica Confidential
161
Chapter 6: Processes
In order to conserve space in the datamart, the administrator can periodically delete tables with a UAC_EX prefix. Note, however, that if these tables are removed, before rerunning their flowcharts or attempting to profile fields in the now-missing tables, users must first rerun their affected Extract processes. Otherwise, Affinium Campaign will generate Table Not Found errors. The Extract process takes input from a cell (if it is connected to a Select process, for example) or a single table or strategic segment. If you select a strategic segment as input, you must join it to a table before you can extract fields (For information, see XXX). To configure an Extract process
1
Double-click the Extract process in the flowchart workspace. For more information and instructions on adding processes to your flowchart, see Deleting a flowchart on page 107. The Extract Process Configuration window displays the Source tab, as shown in Figure 6-21.
Figure 6-21 Extract Process Configuration window Source tab
162
Unica Confidential
List of processes
Choose the data source that you are going to select from. You can select an input cell, a single table or a strategic segment from the Input pull-down menu. You choose the data source in the same way as you do for a Select process. For more information and instructions, see Choosing the data source on page 248.
Specify the data to select. You specify the data to select in the same way as you do for a Select process. For more information and instructions, see Creating a query with Point & Click on page 249.
If you selected a segment, associate it with a table. The Extract process exports fields from a table and not just IDs. As a result, before a strategic segment can be extracted, it must be associated or joined to a table. To join a segment to a table, select a table from the Select Based On pull-down menu; otherwise, no fields will display in the Extract tab.
Select an output location in your data source. For more information and instructions, see Selecting an output location on page 164.
If you want to set limitations on the size of the output cell (that is, to limit the number of IDs generated by the Select process which can be used as input by another process in the flowchart), click on the Cell Size Limit tab. You choose the data source in the same way as you do for a Select process. For more information and instructions, see Selecting the data source on page 167.
Click the General Tab to assign a name and description to the process. The General Tab is found in the configuration window of every process, and is the area where you can optionally provide a descriptive name for the process and add descriptive text for future reference.
Click OK. The Extract process is configured and appears enabled in the flowchart. You can test run the process to verify that the selection it performs returns the results you
Version 6.4
Unica Confidential
163
Chapter 6: Processes
expect. For more information on performing a test run, see Running a flowchart on page 102.
On the Extract tab, select the records to be extracted and the database that will hold the extracted records. Figure 6-22 shows the Extract tab.
Figure 6-22 Extract Tab
If you select to write the data to the Affinium Campaign Server, the data is stored in binary format; if you select a database, the data is stored in a uniquely-named table with the following namespace: UAC_EXcell_ID + operating system process ID
Mail List
The Mail List process generates a contact list for a direct mail campaign, assigns specific offers to that contact list, and logs the contact history.
164
Unica Confidential
List of processes
Double-click the Mail List process in the flowchart workspace. For more information and instructions on adding processes to your flowchart, see Deleting a flowchart on page 107. The Mail List Process Configuration window displays the Assignment tab. A completed Assignment tab is shown in Figure 6-23.
Figure 6-23 The Mail List Process Configuration windows Assignment tab
Select the input cells to use as the data source for the mailing list. For more information and instructions, see Selecting the data source on page 167.
Assign an offer or offers to each input cell. For more information and instructions, see Assigning offers to an input cell on page 168.
If your organization maintains a list of codes outside Affinium Campaign, or assigns multiple tracking codes to a cell, you may want to edit the tracking codes. For more information and instructions, see Editing tracking codes on page 170.
Version 6.4
Unica Confidential
165
Chapter 6: Processes
If you assigned multiple offers to a cell and want to specify which ID in the cell gets which offer, create assignment rules. For more information and instructions, see Assigning offers to IDs within a cell on page 174.
If you want to measure the offers performance against a control offer sent to a control group, link the offer to a control offer. For more information and instructions, see Linking a control to an offer on page 174.
If you want the cell codes for the mailing list to match cell codes used elsewhere in your organization, edit the cell codes. For more information and instructions, see Editing cell codes on page 177.
Define the mailing list. For more information and instructions, see Defining a mailing list on page 179.
Determine how you want to log information from the Mail List process. For more information and instructions, see Setting logging parameters on page 186.
10 Click the General tab to assign a name and write a note for the process.
The name appears on the process in the flowchart. The note appears when you mouse over the process in the flowchart.
11 Click OK.
The Mail List process is configured and appears enabled in the flowchart. You can run the process to verify that it returns the results you expect. For more information, see Running processes on page 126 and Running a flowchart on page 102.
166
Unica Confidential
List of processes
Double-click the Mail List process in the flowchart workspace. The Mail List Process Configuration window displays the Assignment tab. A completed Assignment tab is shown in Figure 6-23.
Select the cell you want to use from the Input drop-down list. To select multiple cells
Double-click the Mail List process in the flowchart workspace. The Mail List Process Configuration window displays the Assignment tab. A completed Assignment tab is shown in Figure 6-23.
Select Multiple Cells from the Input drop-down list. You can also click . The Select Cells to Use window displays all the cells available to the Mail List process, as shown in Figure 6-24.
Figure 6-24 Cells available as data sources for the mailing list
Click the checkbox next to the cells you want to use. You can click Select All to select all the cells in the window, and Clear All to uncheck all the cells.
Version 6.4
Unica Confidential
167
Chapter 6: Processes
Note 4
The selected cells must all have the same audience level.
Click OK. The cells you selected appear in the Assignment list on the Assignment tab of the Mail List Process Configuration window, as shown in Figure 6-23.
Double-click the Mail List process in the flowchart workspace. The Mail List Process Configuration window displays the Assignment tab. A completed Assignment tab is shown in Figure 6-23.
Click the cell name in the Assignment List. The Offer field for the cell becomes a drop-down list.
Click Assign Offers. The Assign Offer(s) window displays the list of offers available for assignment. A single assigned offer is shown in Figure 6-25.
168
Unica Confidential
List of processes
Select the offer to assign to the cell from the Available Offers list. Navigate through the list by clicking the + sign next to an offer folder or offer group to open it. If the offers relevant to the campaign are associated with the campaign, those offers appear at the top of the list. For more information, see Associating offers with a campaign on page 71.
Note
You can also select the offer to assign directly from the Offer drop-down list that appears in the Offer column of the Assignment list.
6 7
Repeat steps 4 and 5 for each offer you want to assign to the cell. Click OK. If you assigned a single offer, its name appears in the Offer column of the Assignment list. If you assigned multiple offers to the cell, Multiple Offers appears, followed by the number of offers assigned appears in the list. Both cases are shown in Figure 6-23.
Version 6.4
Unica Confidential
169
Chapter 6: Processes
Double-click the Mail List process in the flowchart workspace. The Mail List Process Configuration window displays the Assignment tab. A completed Assignment tab is shown in Figure 6-23.
2 3
Click the cell name in the Assignment list. Click Assignment Details. The Offer Assignment Details window displays offers assigned to the cell in the Tracking tab. Multiple assigned offers are shown in Figure 6-26.
170
Unica Confidential
List of processes
4 5
Click the offer whose tracking code you want to edit. Click in the Tracking Code field. The field opens for editing.
Enter the new tracking code. You can also select the tracking code for another offer in the list, click Copy Tracking Codes, select the tracking code you want to edit, and click Paste Tracking Codes. Ctrl+Click or Shift+Click to select multiple codes to copy and paste. The tracking code must be unique within the process.
Double-click the Mail List process in the flowchart workspace. The Mail List Process Configuration window displays the Assignment tab. A completed Assignment tab is shown in Figure 6-23.
Version 6.4
Unica Confidential
171
Chapter 6: Processes
Click Assignment Details. The Offer Assignment Details window displays offers assigned to the cell in the Tracking tab. Multiple assigned offers are shown in Figure 6-26.
Make sure the tracking codes you plan to copy are in the same order as the offers in the Selected Offers list. Copy the cells from the text file or from Excel onto the clipboard. Click Paste Tracking Codes. Each tracking code must be unique within the process.
5 6
Click OK. The trackings codes are applied to each offer assignment.
Double-click the Mail List process in the flowchart workspace. The Mail List Process Configuration window displays the Assignment tab. A completed Assignment tab is shown in Figure 6-23.
2 3
Click the cell name in the Assignment list. Click Assignment Details. The Offer Assignment Details window displays offers assigned to the cell in the Tracking tab. Multiple assigned offers are shown in Figure 6-26.
4 5
Click the offer for which you want to create multiple tracking codes. Click Multiple Tracking.
172
Unica Confidential
List of processes
6 7
If you want to copy multiple codes from a text of Excel file, copy them. Create the codes. Click:
Paste Tracking Codes from Windows Clipboard and click Paste to paste the cells you copied in step 6. Create Tracking Codes Based on Code Generator, enter the number of codes to create and click Create to generate multiple codes for the assignment from the Affinium Campaign code generator. For more information about designing a tracking code generator, see the Affinium Campaign Administrators Guide. Create Tracking Codes Based on Permutation to specify a group of tracking codes. Enter the formula for the codes in the field and click Create. Affinium Campaign generates a code for each permutation you specified. All codes can have the longest format of:
xx[expression]xx[expression]x
where x is any character or number, and expression specifies a list of characters or numbers which will create the permutation. The expression can either be of the form A,B,C or of the form 1-3. For example, if you entered TC[1-3], then Affinium Campaign would generate three tracking codes: TC1, TC2, and TC3. If you entered TC[a, b, c], the tracking codes would be TCa, TCb, TCc. If you entered a longer, more complicated formula, such as TC[1-3]RC[a,b]23, the tracking codes would be:
TC1RCa23 TC1RCb23 TC2RCa23 TC2RCb23 TC3RCa23 TC3RCb23
We recommend that you do not use spaces in an expression. Each tracking code must be unique within the process.
Version 6.4
Unica Confidential
173
Chapter 6: Processes
Click OK. The Tracking Code column for the selected offer displays Multiple Tracking and the number of tracking codes you created.
174
Unica Confidential
List of processes
The Sample process shown in Figure 6-27 creates a control group that consists of a random 5% of the medium value customers. The remaining customers comprise the test group.
Note
If you want to create a control group that will not be contacted, you must create a dummy offer and exclude the IDs with that offer assigned from the output of the Mail List process.
For more information about creating a control group, see Sample on page 209. For more information about reporting on control groups, see Chapter 10, Reports, on page 395. To link a control to an offer
1
Double-click the Mail List process in the flowchart workspace. The Mail List Process Configuration window displays the Assignment tab. A completed Assignment tab is shown in Figure 6-28.
Version 6.4
Unica Confidential
175
Chapter 6: Processes
Figure 6-28 Assignment of offers to test and control group input cells
Click the cell with the offer to which you want to link a control. For example, in Figure 6-28, you would click the Medium Value Test Group cell.
Click Assignment Details. The Offer Assignment Details window displays the tracking codes for the use of the selected offer, as shown in Figure 6-26.
Click the Link to Control tab. The Link to Control tab displays the selected offer. A single offer already linked to a control offer is shown in Figure 6-29.
176
Unica Confidential
List of processes
Figure 6-29 Link to Control tab of the Offer Assignment Details window
Click the offer to which you want to link a control offer. The Linked Control (Tracking Code) column displays a drop-down list.
Select the tracking code of the control offer you want to link from the Linked Control (Tracking Code) drop-down list. Navigate through the list by clicking the plus sign next to each offer folder, offer group, and offer name to display the tracking code.
Click OK. The control offer is linked to the offer. Once the configuration is saved and the flowchart is run, information about the control offer is available in the campaign reports to help you determine the effectiveness of your offer by comparing its response rate to that of the control offer.
Version 6.4
Unica Confidential
177
Chapter 6: Processes
You can edit each individual cell code or you can paste cell codes from a file. To edit the cell code for an input cell
1
Double-click the Mail List process in the flowchart workspace. The Mail List Process Configuration window displays the Assignment tab. A completed Assignment tab is shown in Figure 6-23.
Click the Cell Codes tab. The Cell Codes tab displays the cell codes automatically assigned by Affinium Campaign, as shown in Figure 6-30.
Figure 6-30 Cell Codes tab of the Mail List Process Configuration window
3 4 5 6
Click the code you want to edit in the Selected Input Cells list. Enter the new cell code in the Cell Code field. Repeat steps 3 and 4 for each input cell. Click OK.
178
Unica Confidential
List of processes
The cell codes are applied to the input cells and are available in Affinium Campaign reports. To paste cell codes from a text or Excel file
1
Double-click the Mail List process in the flowchart workspace. The Mail List Process Configuration window displays the Assignment tab. A completed Assignment tab is shown in Figure 6-23.
Click the Cell Codes tab. The Cell Codes tab displays the cell codes automatically assigned by Affinium Campaign, as shown in Figure 6-30.
Make sure the cell codes in the Selected Input Cells list appear in the same order as the copied cells by selecting a cell name and clicking Up1 or Down1 to reorder the list. Copy the cells from the text file or from Excel onto the clipboard. Click Paste. Click OK. The cell codes are applied to the input cells and are available in Affinium Campaign reports.
4 5 6
Version 6.4
Unica Confidential
179
Chapter 6: Processes
so that is how you export the contact information. Once configured, when the Mail List process runs, it exports the information you specified into the required file format. To export a contact list
1
Double-click the Mail List process in the flowchart workspace. The Mail List Process Configuration window displays the Assignment tab. A completed Assignment tab is shown in Figure 6-23.
Click the Contact List tab. The Contact List tab appears. A defined contact list is shown in Figure 6-31.
Figure 6-31 Contact List window
Check the Export Contact List checkbox. If you want to test the Mail List process configuration without creating an output file or modifying a database table, uncheck the Export Contact List checkbox and run the process. For a more thorough test, we recommend exporting to a temporary file and reviewing the results.
Select the table or file where you want to export the contact list from the Export To drop-down list.
180
Unica Confidential
List of processes
If the table you want to use does not appear in the list, or if you want to create a new table, select New Table and follow the instructions in the Affinium Campaign Administrators Guide. If you want to export the contact list to a file, see Exporting a contact list to a file on page 184 for more information.
5
Determine how you want to handle existing data in the database table or file. Select:
Append to Existing Data to append the contact information to the end of the file or table. Labels will not be exported as the first row if you select this option for a delimited file. We recommend this method for database tables. Replace All Records to remove the information currently in the file or table, and replace it with the new contact information. Create New File to create a new file with the contact information. A new file with a unique name will be created each time the Mail List process runs. For example, if the file name is MailList.dat, the first time the Mail List process runs MailList.dat will be created. The second time it runs, MailList2.dat is created.
If you want to create a summary file, enter the complete path and name of the file in the Summary File field. You can also click file. to navigate to a directory and select an existing summary
A summary file contains information about the export that may be required by a mail house to facilitate mailings. An example summary file appears in Figure 6-32.
Version 6.4
Unica Confidential
181
Chapter 6: Processes
If you want to send a trigger when the process finishes running, click the Send Trigger(s) checkbox and select the trigger you want to send from the drop-down list. Navigate through the list by clicking the + sign next to a trigger folder to open it. To send multiple triggers, select each trigger you want to add. The selected triggers will appear in the Send Trigger(s) field, separated by commas.
The fields in the list are divided into Affinium-generated fields, the fields from the tables mapped in the table catalog, and existing derived fields. Offer, offer version, campaign, cell, and tracking codes are all Affiniumgenerated fields. If the field you want to export is not available in the list, click Derived Fields. For more information, see Derived fields on page 324.
b If you want to learn more about the field you selected, click Profile.
182
Unica Confidential
List of processes
If you want to reorder the fields, select a field in the Export Fields list, and click Up 1 or Down 1 to change where it appears in the list.
10 Click More.
The Advanced Settings window appears. The advanced settings in Figure 6-33 are configured to use the ID with the highest score if there are duplicate IDs in the list, and groups the exported rows of data by zip code.
Figure 6-33 Advanced Settings window
11 If an input cell to the Mail List process contains non-normalized data, you may
This option only removes duplicates within the same input cell. Your mailing list can still contain duplicate IDs if the same ID appears in multiple input cells. If you want to remove all duplicate IDs from the mailing list, you must use a Merge or Segment process upstream of the Mail List process to purge duplicate IDs or create mutually-exclusive segments.
b Select one of the following from the first Based On drop-down list:
Version 6.4
Unica Confidential
183
Chapter 6: Processes
MaxOf to select the ID with the maximum value in the specified field. MinOf to select the ID with the minimum value in the specified field.
c Select a field from the second Based On drop-down list.
If the field you want to use is not available in the list, click Derived Fields. For more information, see Derived fields on page 324.
12 If you want to order the rows in the contact list, proceed as follows: a Click the Order By checkbox. b Select a field from the Order By drop-down list.
If the field you want to use is not available in the list, click Derived Fields. For more information, see Derived fields on page 324.
c Click Ascending or Descending to order the rows in the contact list by
The duplicate ID and ordering information appears below the Export Fields list on the Contact List tab.
Double-click the Mail List process in the flowchart workspace. The Mail List Process Configuration window displays the Assignment tab. A completed Assignment tab is shown in Figure 6-23.
Click the Contact List tab. The Contact List tab appears. A defined contact list is shown in Figure 6-31.
184
Unica Confidential
List of processes
3 4
Check the Export Contact List checkbox. Select File from the Export To drop-down list. The Specify Output File window appears. A flat file with dictionary is specified in Figure 6-34.
Figure 6-34 Specify Output File window
Select:
Flat file with data dictionary to create a new fixed-width file and new data dictionary file. Flat file based on existing data dictionary to create a new fixed-width file and select an existing data dictionary file. Delimited file to create a new file in which field values are delimited by a tab, comma, or other character.
Click the Tab, Comma, or Other radio buttons. If you clicked Other, you can enter another character to use as the delimiter in the Other field. Check Include Labels in Top Row if you want the first row of the file to contain labels for each column of data.
Enter the complete path and name of the file in the File Name Prefix field. You can also click Browse to navigate to a directory and select an existing file.
Version 6.4
Unica Confidential
185
Chapter 6: Processes
Affinium Campaign automatically fills in the Data Dictionary field with a .dct file with the same name and in the same location as the file you entered.
8
If you want to use a different data dictionary, or rename the data dictionary, enter the complete path and name of the data dictionary file in the Data Dictionary field. Click OK. The Export To drop-down list on the Contact List tab displays the path and file name you entered.
Log to the system tables We recommend that you log to the system tables to make the contact information available for tracking and reporting throughout Affinium Campaign. For instructions, see To log to the Contact History and Tracking system tables on page 187. We recommend that you do not log to system tables if you plan to send your mailing list to a mailing house that performs processing (such as validating addresses or householding). Use a Track process to log the information returned from the mailing house instead to capture only the list of customers that were actually mailed an offer.
Log to any other table or file You may want to store the contact information in another table or file if your organization requires further processing of the information in another format. You may also want to log the information outside the system tables if you want to test the information output by the Mail List process before saving it to the system tables. For instructions, see To log to any table or file on page 189.
186
Unica Confidential
List of processes
Double-click the Mail List process in the flowchart workspace. The Mail List Process Configuration window displays the Assignment tab. A completed Assignment tab is shown in Figure 6-23.
Click the Log tab. The Log tab appears. Configured logging information is shown in Figure 6-35.
Figure 6-35 Mail List Configuration window Log tab
Check the Log to Contact History and Tracking Tables checkbox. We recommend that you do not log to system tables if you plan to send your mailing list to a mailing house that performs processing (such as validating addresses or householding). Use a Track process to log the information returned from the mailing house instead to capture only the list of customers that were actually mailed an offer.
If you want to remove all the rows containing information from running this Mail List process from the Contact History system table, click Clear History Now. If you want to review the fields that will be added to the Contact History system table or add new fields to be logged, click More Options. 187
Version 6.4
Unica Confidential
Chapter 6: Processes
The Contact History Logging Options window appears. Figure 6-36 shows a completed window.
Figure 6-36 Contact History Logging Options window
Select the appropriate audience level from the Tracking Audience Level dropdown list. Enter the date on which the people in the mailing list will be contacted in the Contact Date field. You can also click to select the date from a calendar.
If you want to log additional information to the Contact History table, specify the fields to use as follows:
a Select the field in the current Contact History table to which you want to
log. The fields in the current Contact History table are displayed in the Table Field column of the Fields to Log list.
b Select the field from the Candidate Fields list that you want to log into the selected field in the Contact History table.
188
Unica Confidential
List of processes
The fields in the list are divided into Affinium-generated fields, the fields from the tables mapped in the table catalog, and existing derived fields. Offer, offer version, campaign, cell, and tracking codes are all Affiniumgenerated fields. If the field you want to export is not available in the list, click Derived Fields. For more information, see Derived fields on page 324. If you want to learn more about the field you selected, click Profile. For more information, see Profiling a field on page 262.
c Click Add. Note
You can click Match to automatically assign all fields whose names match the field names in the Contact History table.
d Repeat steps 8a through c above for each additional field you want to log. 9
Double-click the Mail List process in the flowchart workspace. The Mail List Process Configuration window displays the Assignment tab. A completed Assignment tab is shown in Figure 6-23.
Click the Log tab. The Log tab appears. Configured logging information is shown in Figure 6-35.
3 4
Check the Log into Other Destination checkbox. Determine how you want to handle existing data in the database table or file. Select:
Append to Existing Data to append the logging information to the end of the file or table. Labels will not be exported as the first row if you select this option for a delimited file. We recommend this method for database tables.
Version 6.4
Unica Confidential
189
Chapter 6: Processes
Replace All Records to remove the information currently in the file or table, and replace it with the new logging information. Create New File to create a new file with the logging information. A new file with a unique name will be created each time the Mail List process runs. For example, if the file name is MailListLog.dat, the first time the Mail List process runs MailListLog.dat will be created. The second time it runs, MailListLog2.dat is created.
If you want to log additional information to the table or file, specify the fields to use as follows:
a Select the field from the Candidate Fields list that you want to log into the
selected field in the table or file. The fields in the list are divided into Affinium-generated fields, the fields from the tables mapped in the table catalog, and existing derived fields. Offer, offer version, campaign, cell, and tracking codes are all Affiniumgenerated fields. If the field you want to export is not available in the list, click Derived Fields. For more information, see Derived fields on page 324. If you want to learn more about the field you selected, click Profile. For more information, see Profiling a field on page 262.
b Click Add.
If you want to reorder the fields, select a field in the Export Fields list, and click Up 1 or Down 1 to change where it appears in the list.
6
If you want to specify how to handle duplicate IDs, or order the rows in the output table or file, click More. The Advanced Settings window appears. The advanced settings in Figure 6-33 are configured to use the ID with the highest score if there are duplicate IDs in the list, and groups the exported rows of data by zip code.
If an input cell to the Mail List process contains non-normalized data, you may want to eliminate duplicate IDs from the mailing list, as follows:
a Click the Skip Records with Duplicate IDs checkbox.
190
Unica Confidential
List of processes
This option only removes duplicates within the same input cell. Your mailing list can still contain duplicate IDs if the same ID appears in multiple input cells. If you want to remove all duplicate IDs from the mailing list, you must use a Merge or Segment process upstream of the Mail List process to purge duplicate IDs or create mutually-exclusive segments.
b Select one of the following from the first Based On drop-down list:
AnyOne to select one of the duplicate IDs. MaxOf to select the ID with the maximum value in the specified field. MinOf to select the ID with the minimum value in the specified field.
c Select a field from the second Based On drop-down list.
If the field you want to export is not available in the list, click Derived Fields. For more information, see Derived fields on page 324.
8
If you want to order the rows in the contact list, proceed as follows:
a Click the Order By checkbox. b Select a field from the Order By drop-down list.
If the field you want to use is not available in the list, click Derived Fields. For more information, see Derived fields on page 324.
c Click Ascending or Descending to order the rows in the contact list by
The duplicate ID and ordering information appears below the Fields to Output list on the Log tab.
Merge
The Merge process accepts input from any number of cells, and lets you specify which input cells are included, and which are excluded. For example, you can use
Version 6.4
Unica Confidential
191
Chapter 6: Processes
the Merge process to suppress customers that have requested that they not receive any marketing materials. To configure a Merge process
1
Double-click the Merge process in the flowchart workspace. For more information and instructions on adding processes to your flowchart, see Deleting a flowchart on page 107. The Merge Process Configuration window displays the Method tab, as shown in Figure 6-37.
Figure 6-37 The Merge Process Configuration window Method tab
All the input cells must have the same audience level.
b Click Add next to the Records to Include or Records to Exclude list.
The IDs in the cells in the Records to Include list will be combined into one list of unique IDs. IDs in the Records to Exclude list will not appear in the output of the Merge process.
192
Unica Confidential
List of processes
Specify how you want to handle duplicate IDs in the input cells in the Records to Include list. Click:
Merge/Purge On Include to remove duplicate IDs. For example, if you wanted a list of unique customer IDs if customer ID C123 appeared in both the Gold.out cell and in the Platinum.out cell in Figure 6-37, the resulting merged list would contain only one instance of C123.
Match (AND) On Include to include only those IDs that appear across all input cells. For example, if you wanted a list only of customers that were both Gold and Platinum members, you would click Match (AND) On Include. Then, if customer ID C123 did not appear in both the Gold.out cell and in the Platinum.out cell in Figure 6-37, the resulting merged list would not contain C123.
If you want to limit the number of IDs generated for output by the Merge process, click the Cell Size Limit tab. You limit the output of the Merge process the same way that you limit the output of the Select process. For more information and instructions, see Limiting the size of the output cell on page 272.
Click the General tab to assign a name and write a note for the process. The name appears on the process in the flowchart. The note appears when you mouse over the process in the flowchart.
Click OK. The Merge process is configured and appears enabled in the flowchart. You can run the process to verify that it returns the results you expect. For more information, see Running processes on page 126 and Running a flowchart on page 102.
Version 6.4
Unica Confidential
193
Chapter 6: Processes
Model
The Model process lets you create a run-time model file, which you can use for real-time or batch scoring. It automates the creation of a response model that can be used to score customers or prospects to determine the candidates most likely to respond. To configure a Model process
1
Double-click the Model process in your flowchart workspace. For more information and instructions on adding processes to your flowchart, see Deleting a flowchart on page 107. The Model Process Configuration window displays the Method tab, as shown in Figure 6-38.
Figure 6-38 The Model Process Configuration window Source tab
2 3 4
Select the variables to be used for modeling. Select the modeling output, length, and algorithms you want to use. Click the General Tab to assign a name and description to the process.
194
Unica Confidential
List of processes
The General Tab is found in the configuration window of every process, and is the area where you can provide a descriptive name for the process and add descriptive text for future reference.
5
Click OK. The Model process is configured and appears enabled in the flowchart. You can test run the process to verify that the selection it performs returns the results you expect. For more information on performing a test run, see Running a flowchart on page 102.
Select responder and non-responder input cells from the appropriate pull-down menus. You cannot select multiple cells for the Responder or Non-Responder cells.
Important!
From the list of variables that appear in the Variables to be Used for Modeling list, select the appropriate variables that will be used by the Model process during model generation. You can select all variables (using the Use All button) and let the Model process decide which set of inputs are most effective for modeling. However, by eliminating variables that do not add value to the model (for example, variables containing the same value for all records or different values for all records), you can speed up the automatic variable selection process.
Note
If in doubt as to the predictive value of a variable, include it and let the Model process decide whether it should be used in models.
You can use derived fields in the configuration of a model. For more information about derived fields, see Derived fields on page 324.
Version 6.4
Unica Confidential
195
Chapter 6: Processes
Click on the Method Tab to bring up the Method window, as shown in Figure 6-39.
Figure 6-39 Method tab in the Model process
The Method window allows you to specify the name of the output model file, control how long modeling will run, and select one or more algorithms to use.
2
Best Model In (Default) Allows you to specify a time limit for modeling. The Model process retains the best models built in the time period that you specify. The default is three hours. Best Models Among Allows you to specify the number of models to build. The Model process will retain the best of these models. The default is 20.
196
Unica Confidential
List of processes
algorithm from the list of algorithms in the Algorithm Use pull-down menu, as shown in Figure 6-40. You can select one, several, or all.
Note
Selecting All Algorithms (the default) will result in a more accurate model, but it may take longer.
c Set the maximum number of models to keep by entering any positive integer
in the Max. # of Models to Keep field. The default is five. Each of the top models are saved by appending a pound sign (#) to the end of the specified filename. If more than one model is kept, an index is appended to the base filename, indicating the rank of the model.
Note
The more models you elect to keep, the more disk space is required to save the corresponding information.
d Specify a the absolute pathname for the model file that is to be created in the
Model File Name field, or click the Browse button to evoke a Windows file selection window. Once you run the process it will generate a NAME.rtm model file, which you can use for scoring with the Score process.
Optimize
The Optimize process is available for licensed users of Affinium Campaign Optimize. Adding an Optimize process to your flowchart allows your organization to determine the optimal interaction strategy for each customer over time by looking across multiple marketing campaigns offers and channels. For more information and instructions, see the Affinium Campaign Optimize Users Guide.
Version 6.4
Unica Confidential
197
Chapter 6: Processes
Recommend
The Recommend process is available for licensed users of Affinium Campaign Interact. Adding a Recommend process to an interaction flowchart allows you to generate a list of recommended offers for a customer. For more information and instructions, see the Affinium Campaign Interact Users Guide.
Response
The Response process supports multiple levels of tracking, multiple response types, and the logging of additional user attributes for responders. Essentially, the Response process tracks the responses of customers who were contacted in a Mail List or Call List process. Based on rules that you define during process configuration, the Response process writes that responder/offer information to several response system tables where it is formatted by the server into a variety of performance and profitability reports. For more information on these reports, see Performance/profitability reports on page 438. For more information on the response system tables, see the Affinium Campaign Administrators Guide. In its simplest form, the Response process would appear on a separate flowchart connected to a Select process and perhaps a Segment process, as shown in Figure 6-41. In the flowchart, the Select process selects IDs from a mapped system table that contains the IDs of responders for a particular offer. These IDs are then further segmented into meaningful groups and passed on to a Response process.
198
Unica Confidential
List of processes
A Response process is tightly aligned with a corresponding Mail List or Call List process . Thus, before you can configure a Response process, you must do or know the following:
For each audience level you create, Affinium Campaign creates a corresponding Contact History and Response History system table. You must map these system tables to the appropriate table or tables in your datamart. Affinium Campaign determines responders based on the Contact History table for each audience level. If you have multiple audience levels, you need to track each of them in a separate Response process. You must know the audience level of your contact list. You must know the name of each offer that you used in your Mail List or Call List process. You must know the field where the response date information for each offer you are tracking is stored. You must know the field where the product id for each offer is stored. The same offer instance cannot be tracked in multiple Response processes. If, for example, you want to track some responses within three months of an offer and also want to track other response types (click throughs, for example) for at least six months you need to put the date criteria into a Select process that creates
Important!
Version 6.4
Unica Confidential
199
Chapter 6: Processes
the cell to be matched in the Response process and then do not enable the date scope option in the response tracking rules. To configure a Response process
1
Double-click the Response process in your flowchart workspace. For more information and instructions on adding processes to your flowchart, see Deleting a flowchart on page 107. The Response Process Configuration window displays the Source tab, as shown in Figure 6-42.
Figure 6-42 The Source tab on the Response Process Configuration window
Select the appropriate source cell or multiple cells from the Input pull-down menu. The source cells will originate from the mapped table in your data mart that holds your customer response information. Select the audience level that corresponds to the audience level in the contact process being tracked from the Tracking pull-down menu.
200
Unica Confidential
List of processes
If an audience level has sub-levels these are displayed in the pull-down menu and can be selected. Select the offer date field from the Response Date Field pull-down menu or create a derived field by clicking on the Derived Fields button. For more information on derived fields, see Derived fields on page 324. The date field is the name of the field where you have stored the response date information for your offers in your datamart. This field is used by the Response process if you enable the Within Date Scope tracking rule and/or if you enable Log to Response History and Tracking Tables.
Note
If the response date entry is of type date, then Affinium Campaign converts that date to output format when it writes to the Response History system table. However, if the date entry is not of type date and is just a text string, then Affinium Campaign cannot parse the string and passes it on to the database. If the database does not recognize the format, it returns an error. To avoid errors, you should use the Affinium macro, DATE_FORMAT,which converts strings to date types. For more information on the DATE_FORMAT macro, see the Affinium Macros Guide.
4 5 6 7
Select the offers whose responses you want to track. Assign offers to input cells. Define the rules you want to use for response tracking. Click the Log tab to configure where the response tracking information is logged. The steps for configuring response logging are the same as the steps for configuring Mail List logging (see Recommend on page 198). Note that the Response process reads from the Contact History tables and writes to the Response Tracking tables. Click the General Tab to assign a name and description to the process. The General Tab is found in the configuration window of every process, and is the area where you can provide a descriptive name for the process and add descriptive text for future reference.
Version 6.4
Unica Confidential
201
Chapter 6: Processes
Click OK. The Model process is configured and appears enabled in the flowchart. You can test run the process to verify that the selection it performs returns the results you expect. For more information on performing a test run, see Running a flowchart on page 102.
To specify offers to operate on, click on the Offer tab. The Offer Tracking window appears, as shown in Figure 6-43.
Figure 6-43 Offer Tracking window
You have two choices you can either add offers manually using the Add . . . button, or you can select Track All Incoming Responses.
To add an offer to track manually, click on the Add . . . button. The Add Offer To Track window appears, as shown in Figure 6-44.
202
Unica Confidential
List of processes
Select an offer to track from the Offer to Use pull-down menu. In most cases, this will be an offer from a contact process created in a campaign flowchart. Provide a name for the response type that you are tracking and a description in the corresponding areas of the window. In most cases you would want the response name to mirror the response type. Select a response type from the list in the Response Types area of the application. Note that the response types are defined in the User Response Type system table by the Affinium Campaign administrator or the Unica Consulting Team, usually during the initial installation and configuration. The All response type is selected by default. If you also decide to track sub-level response types, when you assign offers to source cells (step 1), ensure that you assign All to a cell that is a superset of the various individual response types. Otherwise, when you generate reports based on this process configuration, the counts may not be accurate.
Important!
Enter the revenue you expect per response and the gross profit percent in the appropriate dialog boxes.
Version 6.4
Unica Confidential
203
Chapter 6: Processes
When you are satisfied with your choices, click the OK button to confirm your choices. The new offer appears in the Offers Used window.
To track all incoming responses, check the Track All Incoming Responses check box and then click on the Add . . . button. The Select Response Types window appears, as shown in Figure 6-44.
Replace the default response name. Add a brief description of the responses you are tracking. Select a response type and a response channel. All is selected by default, and the choices in the Response Channel pull-down menu are based on the fields in the Response Channel system table. Replace the default Revenue per Response figure. Replace the default Gross Profit Percent figure. Click the OK button to confirm your choices.
204
Unica Confidential
List of processes
To assign the offers you are tracking to a source cell, click on the Assignment tab. The Assignment window appears, as shown in Figure 6-46.
Figure 6-46 Assignment window
source cell, highlight an offer and click on the Assign Cells button. The Assign Cells window appears, as shown in Figure 6-47.
Version 6.4
Unica Confidential
205
Chapter 6: Processes
b Select the appropriate source cell and click the OK button. The Assignment
window reappears, showing the offer and its assigned source cell, as shown in Figure 6-46.
Important!
For configurations with multiple cells or multiple response types, make sure that you assign the correct cell or cells to the appropriate offer/response type.
To set up the response tracking rules for offers, click on the Tracking Rules tab. The Tracking Rules window appears, as shown in Figure 6-48.
206
Unica Confidential
List of processes
From the Tracking Rules window do the following to configure how response tracking is to be done. Note that selections are not mutually exclusive.
a If you want to track responses by offer codes, select the Offer Code Field
Tell the process what field holds the offer codes by selecting the offer code field from the Offer Code Field pull-down menu or by creating a derived field. For more information on derived fields, see Derived fields on page 324. Tell the process what format is used in the offer code by selecting the appropriate radio button.
If the contact-style process (MailList, CallList, eMessage) linked a control offer to this offer, the control offers responses will also be tracked.
b If you want to track responses by campaign, cell, channel, or product ID,
select the checkbox next to each one and select the field containing that information from the drop-down list.
Version 6.4
Unica Confidential
207
Chapter 6: Processes
c If you want to limit tracking to responders who fall within the effective and
expiration dates of an offer, select the Within Date Scope checkbox. How the date scope is defined in the contact process determines how Affinium Campaign tracks the response rates. A few things to note:
If the contact date is determined at run time AND the expiration date is fixed, Affinium Campaign ignores the start date when it computes the responses. If the contact date is determined at run time AND the expiration date is set to the duration of the campaign, Affinium Campaign determines the responses by querying the Contact History system table, since customers could be contacted at different times. If you want to count anyone who may have learned of the offer and responded (as in a viral marketing campaign, for example), leave this option unchecked and filter the IDs in a Select process connected to a Response process.
If you change the way the contact date is determined in the contact process and do not zero out the Contact History system table, Affinium Campaign includes responders that for both contact dates. Affinium Campaign always uses the contact date for the most current instance of the offer.
d If you want to limit tracking only to those responders who received the
specified offer(s), select the Count Only Those Contacted checkbox. Otherwise all responders whether they received the offer or not are counted. If enabled, the process reads from the Contact List system table.
Note
Every time an offer or offer version is used in a flowchart and the flowchart is run, an offer tracking instance is created. If an offer or offer version is used multiple times, the most recently-run offer tracking instance will be used. If this option is enabled, Affinium Campaign runs a query on the Contact History table.
Note
e If you want to track responders who responded more than once, select the
Unica Confidential
List of processes
Click OK.
Sample
The Sample process lets you create one or more cells for different treatments, control groups, or a subset of data for modeling. A wide variety of configurations is available for sampling. To configure a Sample process
1
Double-click the Sample process in your flowchart workspace. For more information and instructions on adding processes to your flowchart, see Deleting a flowchart on page 107. The Sample Process Configuration window displays the Sample tab, as shown in Figure 6-49.
Figure 6-49 The Sample tab on the Sample Process Configuration window
2 3 4
Select the source cell(s) you want to sample. Determine the number of samples and sample size. the name and size of the output cell.
Version 6.4
Unica Confidential
209
Chapter 6: Processes
5 6
Select a sampling method. Click the General Tab to assign a name and description to the process. The General Tab is found in the configuration window of every process, and is the area where you can provide a descriptive name for the process and add descriptive text for future reference.
Click OK. The Sample process is configured and appears enabled in the flowchart. You can test run the process to verify that the selection it performs returns the results you expect. For more information on performing a test run, see Running a flowchart on page 102.
This feature makes it easy to create many samples using a single Sample process. For example, using a Segment process to split customers into high, medium, and low value customers (3 output segments) followed by a Sample process to divide customers into a control group and a contact group (2 segments), produces a total of (3x2=) 6 output segments.
210
Unica Confidential
List of processes
Note
The Multiple Cells option appears only if there is more than one input source cell available.
The Sample tab includes these elements: Element Source Cell Browse () # of Samples/ Output Cells Sample Size Calculator Cell Name %/All Remaining Max. # Records Random Sample Seed/Pick Every Other X Sequential Portions Ordered By Derived Fields Use this to
Select the source cell(s) for this Sample process Specify multiple source cells for this Sample Specify how many samples to create, and their size by either percent (%) or number (#) Calculate sample sizes or error bounds Configure a name for the Sample output cell Set the sample size to a percentage, or to all, of the remaining records Set a maximum number of records for the output cell size Select random sampling as the sampling method Enter (or generate) a (random) seed value for randomizing Use every other X records as the sampling method Select sequential portions as the sampling method Set the sample output records order Manage your derived fields
You use the Sample tab to select a source cell and configure the sample output. This is described in the following sections.
Version 6.4
Unica Confidential
211
Chapter 6: Processes
To specify the sample size You can specify the size of each sample to create.
1
Select Specify By % or Specify By # Records. You can specify the sample size either as a percentage of the records in the input (source) cell(s), or as a fixed number of records. The default is:
Specify Size By % # of Samples/Output Cells is set at 3 Samples are created with default names of Sample1, Sample2, etc.
212
Unica Confidential
List of processes
Click Sample Size Calculator. The Sample Size Calculator window appears, as shown in Figure 6-51.
Figure 6-51 Using the Sample Size Calculator
For the Response Rate Estimate, enter your estimates of the minimum and maximum response rates expected from your marketing campaign. These two values must be percentages between 0100. The lower the expected response rate, the larger the sample size must be to achieve the same level of accuracy.
Version 6.4
Unica Confidential
213
Chapter 6: Processes
If you are not using a model, select No Model. (This is the default.) If you are using a model, select Model Performance, then enter the appropriate model performance percentage. This represents the area under the lift curve and is reported in the Model Performance report.
The minimum sample size required to achieve the specified error bound is displayed in the Min. Sample Size text box.
5
When you are finished, click Done. The Sample Size Calculator window closes.
Note
You may want to copy and paste the calculated sample size to use in the Sample Configuration window.
To change a sample name on page 215 To change the size of a sample on page 215
214
Unica Confidential
List of processes
Select the sample output name you want to change. The output cell name appears in the Cell Name field.
Type the new name the Cell Name field. You can use any combination of letters, numbers, and spaces. Do not use any periods (.) or slashes (/ or \).
Important!
If you change the name of a sample, you must update all subsequent processes that used this sample as an input cell. Changing a sample name may unconfigure subsequent connected processes. In general, try to edit the names of samples before connecting subsequent processes.
To change the size of a sample The selected information appears in the Edit Output Cell area.
1 2
Select the Sample you want to work with. Enter the desired percentage or count for that output sample. To get all remaining records, enable the All Remaining option.
Note
The All Remaining option can be enabled for a maximum of one sample.
Version 6.4
Unica Confidential
215
Chapter 6: Processes
Note
If the Specify Size by the # of Records option is selected and the desired count for the current output sample is greater than the input size, the size of the current sample will be the input size. Any other samples will be filled on an as available basis.
(Optional) Specify a maximum cell size in the Max. Cell Size field. To limit the size of the sample, enter the maximum number of records in the Max. Cell Size text box. The default is Unlimited.
Random Sample This option randomly places records into the sample groups using a random number generator based on the specified seed. To create statistically valid control groups or test sets, you should use the Random Sample option. Every Other X This option puts the first record into the first sample, the second record into the second sample, up to the number of samples specified (x). The (x+1)-th record goes into the first sample, the (x+2)-th record goes into the second sample, and so on. To use the Every Other X option, you must specify a field for ordering records. Sequential Portions This option creates sample groups by putting the first N records into the first sample, the next set of records in the second sample and so on. This option is useful for creating groups based on the top decile (or some other size) based on some sorted field (for example, cumulative purchases, model scores, etc.). To use the Sequential Portions option, you must specify a field for ordering records.
216
Unica Confidential
List of processes
(Optional) Specify a random seed. You can enter a numeric value directly into the Seed text box or you can click the Pick button to randomly select a new seed value.
If you have exactly the same number of records in the same sequence and you use the same seed value, records are created into the same samples each time. To get another set of randomly divided samples, change the seed value. You may want to do this if you find that the random sample is very unlucky and produces highly skewed results (for example, all males fall into one group and all females in another).
To Select Every Other X-th Record You can select every x-th record in each sample.
1
Version 6.4
Unica Confidential
217
Chapter 6: Processes
Field window. All available tables and fields are listed. Derived fields are listed at the bottom.
Note
If you choose Ascending, numeric fields are sorted in increasing order and alphabetic fields are sorted in alphabetical order. If you choose Descending, the sort order is reversed.
To Select Sequential Portions You can choose sequential portions of data for each sample.
1
Select a field for Order By. This process is the same as for selecting an order by field for the Every Other X option.
218
Unica Confidential
List of processes
Schedule
The Schedule process lets you initiate a process, series of processes, or an entire flowchart. A Schedule process is active for a defined period of time. During that time, specified events may occur that cause subsequent connected processes to begin execution. The most common use of the Schedule process is to control timing of the entire flowchart. In general, a process runs only when all of its inputs have run successfully (i.e., all processes connected to the current process, even if only a temporal dependency). However, when multiple schedules inputs exist within a branch, the process will run whenever any one of its inputs complete (an or rather than an and of its inputs). A contact process with tracking enabled contains an inherent schedule. Using a Schedule process in the middle of a flowchart is an advanced feature. Make sure you are getting the desired behavior and correct results. The Schedule tab can be used to define the total scheduling period by setting up a time limit in days, hours, and minutes starting from when the process begins executing. Scheduling options are both fine-grained and flexible:
You can schedule a process to run in a wide variety of ways, including repetitively, by trigger, by calendar, and so on. You can combine multiple scheduling options, such as scheduling the process to run every Monday at 9:00 a.m., but also to run whenever triggered by a specified event (such as a hit on the Web site, for example). You can schedule a batch process, for example, to run late at night when it will not cause interfere with daytime jobs.
There are no predetermined limits on the number of options you can use simultaneously in scheduling the flowchart, providing that the selections do not actively conflict. (For example, you cannot schedule a flowchart to run both Once Only and Every Monday.)
Note
If the Schedule process in your flowchart tells the flowchart to run before a previous run is complete, Affinium Campaign holds the request until the previous run is finished. Only one run can be held in this manner. In
Version 6.4
Unica Confidential
219
Chapter 6: Processes
certain cases, this may mean that the flowchart does not run as many times as you expect. For example, if your flowchart takes two hours to run, and you have a Schedule process that tries to trigger three runs that are only 10 minutes apart, Affinium Campaign will start the first run. When the Schedule process attempts to start the second run, Affinium Campaign will queue it. When the Schedule process attempts to start the third run, Affinium Campaign will ignore it. When the first run is finished, Affinium Campaign will start the second run. The third run will never start. To configure a Schedule process
1
Double-click the Schedule process in your flowchart workspace. For more information and instructions on adding processes to your flowchart, see Deleting a flowchart on page 107. The Schedule Process Configuration window displays the Sample tab, as shown in Figure 6-56.
Figure 6-56 The Schedule tab on the Schedule Process Configuration window
Specify a value for Total Schedule Period. Enter the days, hours, and minutes in the Total Schedule Period fields.
220
Unica Confidential
List of processes
Select the run frequency from the Schedule to Run drop-down list. The Schedule to Run drop-down list lets you schedule for a single run, custom run, or for multiple, periodic runs.
4 5 6 7
Enter the hours and minutes in the Hours and Minutes fields, if applicable. Set delay and authorization. Set post-run triggers. Click the General Tab to assign a name and description to the process. The General Tab is found in the configuration window of every process, and is the area where you can provide a descriptive name for the process and add descriptive text for future reference.
Click OK. The Schedule process is configured and appears enabled in the flowchart. You can test run the process to verify that the selection it performs returns the results you expect.
To configure a Schedule process to run either on time or based on a trigger, you must first select Custom Run from the Schedule to Run drop-down list. This activates the Custom Run options.
Run On Time
Version 6.4
Unica Confidential
221
Chapter 6: Processes
When you select Custom Run, the Run On Time option is automatically enabled. You can specify a date and time by entering it directly in the Run On Time field, or you can use the Calendar feature by clicking the Calendar button. You can use the Calendar to configure a Custom Run. (It is also a convenient reference, for example, if you need to check what day of the week a date falls on.) Multiple entries must be separated by commas. To Use Calendar to Schedule a Run On Time
1
Click the Calendar button to access the Calendar window. The Calendar window appears, as shown in Figure 6-57.
Figure 6-57 The Calendar window
Specify the scheduled date and time. You can use the Calendar to select the date you want flowchart to run or start by clicking on the desired date, and you can optionally indicate the time. You can change the month, year, and time as follows:
To change the calendar month, use the Month drop-down list and the Year up and down arrows. To change the time, enter the desired time in the Run Time field. Enter a time (using the format hh:mm), followed by an a.m. or p.m. designation.
222
Unica Confidential
List of processes
Click the Apply button to enter the specified date and time, leaving the Calendar window open. Or click the OK button to enter the specified date and time and close the Calendar window. Leaving the calendar window open allows you to easily enter multiple date and time selections. Multiple entries are automatically separated by commas.
You can enter multiple times, separated by commas, in which case the scheduled process will run at each indicated time.
Version 6.4
Unica Confidential
223
Chapter 6: Processes
If you enable Run on Trigger(s), you must specify one or more triggers. The named trigger(s) must be defined using Tools > Stored Triggers for the Schedule process to be fully configured. An inbound trigger is an external event that will automatically set a flowchart or a campaign in motion. A trigger can be anything that you define; for example, clicking on a Web site link, receiving an email message, a telemarketers response indicator, completion of a database upload, or any other defined event. The Run On Trigger(s) option uses an Affinium application, unica_actrg, to run (included with your Affinium Campaign installation). To understand how Run On Trigger works behind the scenes, it is helpful to look at an example.
Example
Run On Trigger One online retailer has a cross-sell campaign that runs on a trigger, so that when a customer makes a purchase, it triggers cross-sell offers (see Figure 6-59).
Figure 6-59 The Trigger-Activated Cross-Sell Campaign
The Web site runs the unica_actrg executable, passing the campaign code and the trigger name (web_purchase).
224
Unica Confidential
List of processes
The Affinium listener checks if the campaign is active and the trigger name exists, then runs the Schedule process, Web Purchase, and the Campaign flowchart is triggered.
The Schedule process, Web Purchase (shown in Figure 6-60), is configured to run on a trigger (web_purchase) when a purchase is made on the Web site.
Figure 6-60 The Schedule Tab for the Trigger-Activated Campaign
For more information regarding running on triggers, see Affinium Campaign Administrators Guide.
To Run On Trigger
Version 6.4
Unica Confidential
225
Chapter 6: Processes
To configure a Schedule process to run on a trigger, you must first select Custom Run from the Schedule to Run drop-down list. This activates the Custom Run features. In the Run On Trigger(s) field, enter the name of each trigger that can activate this Schedule process. Separate multiple triggers with commas.
The trigger name can contain any characters except commas. A trigger name does not have to be unique. You can use the same trigger in multiple campaigns or flowcharts and activate them all at the same time.
For more information about working with triggers, see the following sections.
Wait for user authorization before each run Delay period before each run
For more information about authorizing scheduled events, see the Affinium Campaign Administrators Guide.
226
Unica Confidential
List of processes
If you specify this option, it will take precedence over any other schedule indicators; the flowchart or process will not start unless authorization is given. The prompt for user authorization will appear each time other schedule conditions are satisfied.
Important!
When a flowchart is running with a client attached, user authorization can only occur through that client. If no client is attached, any user with read/write privileges for the campaign can authorize it to continue.
For example, if a Schedule process is configured to run at 9:00 a.m. on Monday morning with a delay of one hour, subsequent processes will begin to run at 10:00 a.m.
Version 6.4
Unica Confidential
227
Chapter 6: Processes
228
Unica Confidential
List of processes
Use this to
Set the duration for the Schedule. The value you enter for Total Schedule Period is the duration, or the total time over which Schedule is to be active. Enter that time in the Days, Hours, and Minutes fields. Set the frequency of the run, or create a custom run
The Schedule to Run drop-down list lets you specify exactly when the Schedule process will activate subsequent connected processes.
If you select the Once Only option, the flowchart will run exactly once, regardless of what other schedule options have been added. If any other value is selected, then the scheduling options are connected as OR statements and the Schedule process kicks off any process to which it is connected when any option is satisfied. The first option that is satisfied will begin the Schedule run. If Schedule To Run is the only option enabled and the setting is Once Only, the process runs immediately (unless a delay or user authorization has been enabled). The Hours and Minutes fields enable you to specify the time at which you want the schedule to run. The time entry form is based on a 24 hour clock (also referred to as military time, so that 9 hours 30 minutes is 9:30 a.m., and 22 hours 45 minutes is 10:45 p.m. Because the time base is 24 hours, there is no need to designate a.m. or p.m.
Schedule to Run
These fields are not always applicable for the selected option.
Create a time-based custom run Configure Run On Time Create a trigger-based custom run
Version 6.4
Unica Confidential
229
Chapter 6: Processes
Element Wait for User Authorization Before Each Run Delay Period Before Each Run Send Trigger(s) After Each Run
Use this to
Score
The Score process lets you rate the likelihood of each customer making a purchase or responding to an offer and identifies the best customers or prospects for the campaign that you plan to run. Scoring is based on modeling results imported from a runtime model file (.rtm file) created by Affinium Model, the Model process, or any third-party data mining tool. Figure 6-63 shows how the Score process might be used in a flowchart.
Figure 6-63 The Score Process in the Flow Chart
The flowchart begins with a Schedule process which runs the flowchart every month. It is connected to a Select process which generates a list of customer IDs
230
Unica Confidential
List of processes
from data in the datamart. The IDs are then sent to a Score process for scoring against a data model. Finally, the results of the Score process are sent to a Snapshot process to be written out to a spreadsheet. To configure a Score process
1
Double-click the Score process in your flowchart workspace. For more information and instructions on adding processes to your flowchart, see Deleting a flowchart on page 107. The Score Process Configuration window displays the Score tab, as shown in Figure 6-64.
Figure 6-64 The Score tab on the Score Process Configuration window
Select a source cell from the Source Cell drop-down list which contains the customer IDs you want to score.
Important!
Specify the number of models you want to create by entering an integer or selecting one from the scroll list in the Number of Models field. The default is two.
Version 6.4
Unica Confidential
231
Chapter 6: Processes
The Parameters For drop-down list will contain as many models as you specified in the Number of Models field, named Model 1, Model 2, Model 3, and so on. If you change the number of models, the models listed in the Parameters For drop-down list automatically change.
4 5
Configure each model in the Parameters For drop-down list. Click the General Tab to assign a name and description to the process. The General Tab is found in the configuration window of every process, and is the area where you can provide a descriptive name for the process and add descriptive text for future reference.
Click OK. The Sample process is configured and appears enabled in the flowchart. You can test run the process to verify that the selection it performs returns the results you expect. For more information on performing a test run, see Running a flowchart on page 102.
(Optional) Click on the General Tab to bring up the General window, where you can specify a name and a brief description of the process for future reference. Click OK. The Score process is configured and appears enabled in the flowchart. You can test run the process to verify that the selection it performs returns the results you expect.
In the Score Fields Name field, type the name of the field where you want the scoring results stored for that model. The default name is scoreN_1. If you type MYSCORE in the field and there is a single output field defined in the specified model, the score field name will be MYSCORE. If there are multiple outputs, the score field names will be MYSCORE_1, MYSCORE_2, MYSCORE_3, and so on. When Affinium Campaign displays the list of available fields, the score fields will appear as if they belong to a table.
232
Unica Confidential
List of processes
In the Model File field, enter the full path and filename of the model file that you will be using to score the customer IDs. You can enter the full path and filename of the model you want to use, or click the Browse button to evoke a standard Windows file selection window.
Click on the Match Variables Names button to match variable names with fields from the table in the input source. The Match Variable Names window appears, as show in Figure 6-65.
For customers to be scored properly, you must ensure that you can match the variables used by the model with corresponding fields in the dataset to be scored. For example, if the model uses an average_balance variable, you must match that variable with a field containing average balance in the dataset to be scored. Match the fields in the left field with the variables in the right field by using the appropriate buttons. You can also create derived fields by clicking on the Derived Fields button. For more information on derived fields, see Derived fields on page 324.
Version 6.4
Unica Confidential
233
Chapter 6: Processes
Important!
You must match all the variables in the Matched Variables List to configure the Score process. Variable names need not match the field names, but the data types (numeric or string) must match.
Note
You can match identical field names automatically by clicking the Match button. This will override any manual matching.
Segment
The Segment process lets you divide data into distinct groups (segments), which can then be operated on individually. Segments can be created based on distinct values in a field or by specifying a query for each segment. There is no limit to the number of segments you can create. The Segment process is commonly used to create multiple groups to receive different treatments or offers. For example, you may want to divide your customers into high-value, medium-value, and low-value segments based on their prior purchase history. Each of these segments then may receive a different offer when connected to contact process. Or you could use one Segment process to split customers into high, medium, and low value customers (three output segments), then connect that process to another Segment process which divides customers by their indicated channel preference of direct mail, telemarketing, fax, or email (four segments). In this way, by using just two Segment processes, you could produce a total of (3x4=)12 output segments. The Segment process lets you:
Specify one or more source cells as input Specify the number of segments Create segments by query or by a field Create mutually exclusive, prioritized segments Specify the maximum size of each segment Name each segment The segments created by the Segment process are not the same as the globally persistent strategic segments created by the Create Seg
Important!
234
Unica Confidential
List of processes
process, which can be used in any session or campaign. For more information, see Create Seg on page 153. To configure a Segment process
1
Double-click the Segment process in the flowchart workspace. For more information and instructions on adding processes to your flowchart, see Deleting a flowchart on page 107. The Segment Process Configuration window displays the Segment tab, as shown in Figure 6-66.
Figure 6-66 The Segment tab on the Segment Process Source window
Select one or more input cells from the Source Cell pull-down menu. If more than one source cell is selected, the same segmentation is performed on each source cell.
Important!
3 4
Version 6.4
Unica Confidential
235
Chapter 6: Processes
If you want to set limitations on the size of the output cell (that is, to limit the number of IDs generated by the Select process which can be used as input by another process in the flowchart), click on the Cell Size Limit tab. Click the General Tab to assign a name and description to the process. The General Tab is found in the configuration window of every process, and is the area where you can optionally provide a descriptive name for the process and add descriptive text for future reference.
Click OK. The Segment process is configured and appears enabled in the flowchart. You can test run the process to verify that the selection it performs returns the results you expect. Segments with no IDs in them will still be output from the process as empty cells.
236
Unica Confidential
List of processes
Important! Note
You must let the profile complete to guarantee that all the segments are properly created.
Some users may find use of Profile restricted by administration preference. Ask your Affinium administrator if you have questions about your access to this feature.
Segmenting by query
The Segment by Query option allows you to control how the data is divided into one or more groups. It also allows you to automatically create prioritized segments that are mutually exclusive (using the Mutually Exclusive Segments option). This means that if a customer satisfies more than one query, they will appear only in the topmost ranking segment for which they qualify. Once you enable this option, you highlight a segment in the Segment Name window, then click the Edit button. The Edit Segment window appears, which is the same as the Select Source window. Queries are created the same as they are in the Select process. For more information, see Select on page 245.
Version 6.4
Unica Confidential
237
Chapter 6: Processes
Note
If segmenting by query, you can create a new segment by clicking on the New Segment button. The New Segment window appears and is the same as the Select Source window.
238
Unica Confidential
List of processes
To edit a segment, click the Edit button. Different Edit Segment windows appear depending upon how you are segmenting. The following Edit Segment window appears, as shown in Figure 6-68.
Figure 6-68 The Edit Segment window Segment by Field
You can change only the name and the maximum number of records in a segment. For the name, you can use any combination of letters, numbers, and spaces. Do not use any periods (.) or slashes (/ or \).
Important!
If you change the name of a segment, you must update all subsequent processes that used this segment as an input cell. Changing a segment name may unconfigure subsequent connected processes. In general, try to edit the names of segments before connecting subsequent processes.
The default size for the number of records is Unlimited. To restrict the size of the created segment (if testing, for example), enter any positive integer. If the number you choose is less than the total number of records generated, records are randomly selected.
Segmenting by Query
When you click on the Edit button the Edit Segment window that appears is the same as the Select process Source window. For information on how to use this window, see Segmenting by query on page 237. (Optional) If desired, you can change the processing order of the segments using the Up1 and Down1 buttons. You may want to adjust the order if you have enableb Mutually Exclusive Segments. (Optional) If desired, you can remove one or more segments by highlighting the segments and clicking the Remove button.
Version 6.4
Unica Confidential
239
Chapter 6: Processes
Note
To select multiple consecutive segments, click the first one and hold down the Shift key while selecting the last one. To select multiple nonconsecutive segments, hold down the Ctrl key while selecting segments.
The number in the Max. # of Segments field will automatically adjust downward when you delete one or more segments. To create a custom macro from the Segment process
1
From the Segment tab of the Segment process window with the Segment by Query radio button selected, click on the New Segment button, as shown in Figure 6-69.
Figure 6-69 Segment Process Segment tab
240
Unica Confidential
List of processes
In the New Segment window, click on the Custom Macros button. The Stored List window appears.
From the Segment tab of a Segment process, click to select a segment to edit, as shown in Figure 6-71.
Version 6.4
Unica Confidential
241
Chapter 6: Processes
Click Edit. The Edit Segment window appears, as shown in Figure 6-72.
Figure 6-72 The Edit Segment window
Click Advanced.
242
Unica Confidential
List of processes
Use Raw SQL Use Query Scope from Source Cell (This feature is available if a source cell to this Segment uses a query.
Version 6.4
Unica Confidential
243
Chapter 6: Processes
When we compare the results in Figure 6-74 to those in Figure 6-75, we see the following differences:
In the unrestricted profile, the entire range of values for Behavior.CreditScore (1-10) is turned into 10 segments.
244
Unica Confidential
List of processes
In the profile where the input values are restricted to the Select1.out results, we see that only four segments are created, each corresponding to one of the allowed values for Credit Score (Credit Score = 1-4). To be sure that segments are created correctly, you must let the profile complete (100% done). Otherwise, one or more segments may be missing. When you profile by field, you cannot remove or add any segments, however you can change the name and the maximum size of each segment. The results from a profile may differ, depending on whether previous processes have been run. If previous processes have not all been run, the profile will accumulate results from the estimated counts (all records).
Select
The Select process lets you specify which customer data you want to use in your campaign flowchart. It is the most frequently used process in Affinium Campaign. Most flowcharts begin with one or more Select processes. To configure a Select process
1
Double-click the Select process in the flowchart workspace. For more information and instructions on adding processes to your flowchart, see Deleting a flowchart on page 107. The Select Process Configuration window displays the Source tab. A configured Source tab is shown in Figure 6-76.
Version 6.4
Unica Confidential
245
Chapter 6: Processes
Choose the data source. For more information and instructions, see Choosing the data source on page 248.
Determine whether you want to select all rows from the data source or whether you want to filter the rows based on specified criteria. Click:
Select All Individual IDs to include all the rows of data from the data source in the Input drop-down list. Select Individual IDs With to create a query to select only certain IDs based on criteria you define.
If you want to select only certain IDs based on specified criteria, create a query. You can create a query using:
246
Unica Confidential
List of processes
Use this tool to select from a list of fields or dimension elements, operators, and values to add them to your query. This tool provides the simplest and easiest way to create a query, and helps you avoid syntax errors. For more information, see Creating a query with Point & Click on page 249.
Text Builder Use this tool to write raw SQL or use Affinium macros. For more information, see Creating a query with Text Builder on page 252.
Macros Use the Query Helper within Text Builder to access Affinium macros and create custom macros. For more information, see Creating a query using macros on page 255.
Raw SQL Use the r to create a query using raw SQL. For more information, see Creating a query using SQL on page 257.
If you want to limit the number of IDs generated for output by the Merge process, click the Cell Size Limit tab. For more information and instructions, see Limiting the size of the output cell on page 272.
Click the General tab to assign a name and write a note for the process. The name appears on the process in the flowchart. The note appears when you mouse over the process in the flowchart.
Click OK. The Select process is configured and appears enabled in the flowchart. You can run the process to verify that it returns the results you expect. For more information, see Running processes on page 126 and Running a flowchart on page 102.
Version 6.4
Unica Confidential
247
Chapter 6: Processes
Select Tables > Multiple Tables from the Input drop-down list. You can also click the button. The Select Tables to Use window displays all the base tables in the campaigns table catalog, as shown in Figure 6-77.
Figure 6-77 Select Tables to Use window
For more information about table catalogs, see the Affinium Campaign Administrators Guide.
2
Check the box next to each table you want to select from. The tables must have the same audience level. To map a new table Select Tables > New Table from the Input drop-down list. The New Table Definition window pre-selects the Base Record Table type. You map a new base table in the Select process the same way you map a table from
248
Unica Confidential
List of processes
the Admin menu. For more information, see the Affinium Campaign Administrators Guide.
Creating Queries
You can create queries in several ways in Affinium Camapaign:
Creating a query with Point & Click Creating a query with Text Builder Creating a query using macros Creating a query using SQL
Double-click the Select process in the flowchart workspace. For more information and instructions on adding processes to your flowchart, see Deleting a flowchart on page 107. The Select Process Configuration window displays the Source tab. A configured Source tab is shown in Figure 6-76.
Choose the data source. For more information and instructions, see Choosing the data source on page 248.
Version 6.4
Unica Confidential
249
Chapter 6: Processes
The Point & Click query builder is selected by default. A sample query is shown in Figure 6-78. If the window does not appear as shown in Figure 6-78, click the Point & Click button under the query text box.
Figure 6-78 Building a query with Point & Click
If you selected an incoming cell or segment, select the data you want to query from the Select Based On drop-down list. You choose a data source to query from the Select Based On drop-down list the same way you chose a data source for the Select process from the Input drop-down list. For more information and instructions, see Choosing the data source on page 248.
Select the field or table name from the Available Fields list. You can click Profile to review the values of the selected field. For more information and instructions, see Profiling a field on page 262.
Click Use. You can double-click the table or field to add it directly.
250
Unica Confidential
List of processes
The selected field appears in the Field Name column of the query, the Operator column of the query appears active, and the Operators list replaces the Available Fields list.
7
Select the operator from the Operators list. The selected field appears in the Field Name column of the query, the Operator column of the query appears active, and the Operators list replaces the Available Fields list.
Click Use. The selected operator appears in the Operator column of the query, the Value column of the query appears active, and the Values list replaces the Operators list.
Click Profile. You can also double-click (Profile...) in the Values list. The Profile Selected Field window displays the values for the field, as shown in Figure 6-79.
Figure 6-79 Profiling a field to select a value for inclusion in a query
For more information and instructions, see Profiling a field on page 262.
11 Click OK.
Version 6.4
Unica Confidential
251
Chapter 6: Processes
The selected value or category of values appears in the Value column of the query, the And/Or column of the query appears active, and a shortened Operators list replaces the Values list.
12 To create multiple select statements, click AND or OR in the Operators list and
Affinium Campaign displays a confirmation window that displays any found errors. Click OK. Checking the syntax of your query does not put any load on the database server.
14 If you want to see the results of running the query, click Test Query.
A progress bar is displayed while the query is being tested. Click Cancel to stop the testing. When testing is complete, Affinium Campaign displays a confirmation window that displays the number of rows the query returned. (This number may be different when the campaign is run.) Click OK.
Double-click the Select process in the flowchart workspace. For more information and instructions on adding processes to your flowchart, see Editing a flowchart on page 98. The Select Process Configuration window displays the Source tab. A configured Source tab is shown in Figure 6-76.
252
Unica Confidential
List of processes
For more information and instructions, see Choosing the data source on page 248.
3 4
Click Select Individual IDs With. Click Text Builder. A sample query created with Text Builder is shown in Figure 6-80.
Figure 6-80 Building a query with Text Builder
If you selected an incoming cell or segment, select the data you want to query from the Select Based On drop-down list. You choose a data source to query from the Select Based On drop-down list the same way you chose a data source for the Select process from the Input drop-down list. For more information and instructions, see Choosing the data source on page 248.
Select the field or table name from the Available Fields list. Although you can enter field and table names directly in the query text box, we recommend selecting them to avoid syntax errors.
Version 6.4
Unica Confidential
253
Chapter 6: Processes
You can click Profile to review the values of the selected field. For more information and instructions, see Profiling a field on page 262.
7
Click Use. You can double-click the field or table name to add it directly to the query text box.
8 9
Enter an operator in the query text box. Click Profile. The Profile Selected Field window displays the values for the field, as shown in Figure 6-79.
Although you can enter field and table names directly in the query text box, we recommend selecting them to avoid syntax errors. You can click Profile to review the values of the selected field. For more information and instructions, see Profiling a field on page 262.
11 Click OK.
You can double-click the value to add it directly to the query text box. You can use the Query Helper to paste Affinium or custom macros into the text window. For more information and instructions, see Creating a query using macros on page 255. You can also write queries using SQL. For more information and instructions, see Creating a query using SQL on page 257.
12 If you want to check the syntax of the query, click Check Syntax.
Affinium Campaign displays a confirmation window that displays any found errors. Click OK. Checking the syntax of your query does not put any load on the database server.
13 If you want to see the results of running the query, click Test Query.
A progress bar is displayed while the query is being tested. Click Cancel to stop the testing.
254
Unica Confidential
List of processes
When testing is complete, Affinium Campaign displays a confirmation window that displays the number of rows the query returned. (This number may be different when the campaign is run.) Click OK.
Double-click the Select process in the flowchart workspace. For more information and instructions on adding processes to your flowchart, see Editing a flowchart on page 98. The Select Process Configuration window displays the Source tab. A configured Source tab is shown in Figure 6-76.
Choose the data source. For more information and instructions, see Choosing the data source on page 248.
3 4
Click Select Individual IDs With. Click Text Builder. A sample query created with Text Builder is shown in Figure 6-80.
If you selected an incoming cell or segment, select the data you want to query from the Select Based On drop-down list. You choose a data source to query from the Select Based On drop-down list the same way you chose a data source for the Select process from the Input drop-down list. For more information and instructions, see Choosing the data source on page 248.
Version 6.4
Unica Confidential
255
Chapter 6: Processes
Click Query Helper. The Query Helper contains a set of icons that insert commonly-used operators, and a complete list of macros. A sample query created using the IN macro from the Query Helper is shown in Figure 6-81.
Figure 6-81 Building a query with the Query Helper
Select the macro you want to use from the list of macros in the Query Helper. The Query Helper displays a brief description and the syntax of the selected macro. For more information about Affinium Macros, see the Affinium Macros Users Guide.
256
Unica Confidential
List of processes
If you select a custom macro, the description and syntax were created by the person who wrote the macro. For more information about creating custom macros, see Creating a custom macro on page 339. You can also click one of the operator icons to insert that operator into your query. If you prefer to click instead of type, you can click: Spce to insert a space in the SQL text entry pane Retrn to insert a line break Clear to delete the entry to the left of the cursor
8 9
Double-click the macro to insert it into your query. Continue creating your query using the Text Builder. For instructions, see Creating a query with Text Builder on page 252.
The query requests the database to perform the sorting and de-duping. If you omit either the DISTINCT or ORDERBY clause, Affinium Campaign will still sort and de-dupe the data on the application server, so you will still receive the correct results, but the performance may be slower. You can build raw SQL statements in Affinium Campaign using several methods. (Optional) You can access the Advanced Settings features by clicking on the Advanced button. Use Advanced Settings to do the following:
Version 6.4
Unica Confidential
257
Chapter 6: Processes
If you have chosen to Select All Customer IDs, you can write raw SQL commands to be run against records in a specified database before or after the Select process is executed. If you have chosen to apply select criteria to the customer IDs, in addition to the above, you can also enable the use of raw SQL in the Query Builder when creating your select criteria. Otherwise, you can only use Affinium Expressions and Custom Macros.
You can use the Advanced button in the Select process to create a query using raw SQL or to execute pre- and/or post-processing SQL commands. When you click the Advanced button, the Advanced Settings window appears, as shown in Figure 6-82.
Figure 6-82 The Advanced Settings Window in Select
Pre-Processing Post-Processing
Using these panes, you can enter raw SQL to be processed either before or after the main query is run. This feature allows you to incorporate SQL procedures as part of the process run, and is useful in employing Affinium Campaign in efforts including ETL, routine mart updates, in-line performance tuning, and security functions. You can use pre- and post-processing SQL statements in Advanced Settings to:
258
Unica Confidential
List of processes
Create, drop, and recreate tables and indexes Grant or change privileges to other users or groups Organize multi-step database commands Run complex database routines, without having to use external scripts to connect to the database
The SQL statements are run in the order in which they appear.
Pre-Processing SQL statements are run before the query executes. Post-Processing SQL statements are run after the query executes.
They can be used with either raw SQL or standard processing in the Select process query. To create a Raw SQL Query in the SQL Text Entry Area
1
Click to select Select records with. The SQL text entry area becomes available.
3 4 5 6 7
Enable Use Raw SQL for Query Selection. Select the data source to query from the Database drop-down list. Select the audience to target from the Audience Level drop-down list. Click OK to close the Advanced Settings window. Click in the SQL text entry area (as shown in Figure 6-83).
Version 6.4
Unica Confidential
259
Chapter 6: Processes
Entering raw SQL in the SQL text entry pane Using the Query Helper Using Point & Click If you click Point & Click, you will return to building a non-SQL query expression.
Note
8 9
(Optional) Click Test Query. When you are done, click OK to close the window and save your configuration. To pass multiple commands You can pass multiple commands in a raw SQL statement. If your database allows multiple commands to be passed, you may enter as many valid SQL commands as you need with the following rules:
Your last command must be a select command. This select command must select all the relevant fields required in defining your audience level in the same order the audience level is defined. No other select statements are used.
1 2
Enable the Select records with: option in the Source tab of the Select process. Click Advanced.
260
Unica Confidential
List of processes
Click to enable Use Raw SQL. This activates raw SQL, a feature that passes your exact query syntax to the database.
Select the database to use and the desired audience level. Click OK.
Enter your SQL commands in the Select records with text box. Click OK.
From the Source tab of a Select process, click the Advanced button. The Advanced Settings window appears, as shown in Figure 6-82.
To enter a pre-processing raw SQL statement, double-click in the SQL field and enter the SQL statement you want to run before the process runs. Next, click in the Database field on that line, and select the name of the database on which you want to run this statement.
Note
The Database drop-down list displays all of the available databases (those that are preconfigured in the dbconfig.lis file on the Affinium Campaign server). If your database does not appear in this drop-down list, contact your Affinium Campaign system administrator.
Click to select the SQL checkbox if you want to view only SQL functions in the list pane. Click again to deselect, to see the full list of available functions and operators.
Note
If you already enabled the Use Raw SQL option on the Advanced Settings window, the SQL option in the Query Helper is enabled. This will hide
Version 6.4
Unica Confidential
261
Chapter 6: Processes
Affinium Campaign macro functions, so that only SQL operators and functions are displayed.
Profiling a field
Profiling lets you preview a list of distinct values and their frequency of occurrence for a selected field. Only records in the current cell are included in the count, unless the counts have been pre-computed. You can profile any field that is available in any process where the Profile button appears. Affinium Campaign automatically profiles a field when you select it in the Select Field window. You can profile any field in an available data source. When you click Profile:
The system automatically profiles the field and provides statistics including the number (count) of records found, any errors encountered (such as finding text in a numerical field, or text in a date field, etc.), number of categories, minimum and maximum values, and so on. Mean, Stdev., Min., and Max. are not available for ASCII text fields. When you profile text fields, these values will appear as all zeroes.
Note
Affinium Campaign automatically bins values up to a maximum number of categories. The default maximum number of bins is 25 (this value can be changed through the Options button, as described in Using Profile on page 264). Affinium Campaign groups values by attempting to create approximately equal sized segments. You can view the profile for a field in the Profile Selected Field window (Figure 6-84).
262
Unica Confidential
List of processes
The Profile Selected Field window includes these elements: Element Field Input Cell Recompute Statistics OK Cancel Options Export Print Use this to
Select the field to be profiled Restrict the profile to this input cell Refresh the profile by recomputing values View statistical information about this profile Close the Profile Selected Field window, and (if Segment) apply the displayed values Cancel profile generation Set profiling options Export the profile data Print the profile results
Version 6.4
Unica Confidential
263
Chapter 6: Processes
Using Profile
To view the profile for a field, you use the Profile button, available from several Process Configuration windows and windows in Affinium Campaign (for example, the Source tab of a Select process or the Snapshot tab of a Snapshot process). Figure 6-85 shows an example of a Profile button in Snapshot.
Figure 6-85 Profile Button in the Snapshot Process Configuration window
To profile a field
1
In the configuration window of a process displaying the Available Fields list box, click to select a field name from the Available Fields drop-down list. (You can also profile derived fields.) That field becomes highlighted in the Candidate Fields pane.
Click Profile. The Profile Selected Field window appears, as shown in Figure 6-86.
264
Unica Confidential
List of processes
Affinium Campaign profiles the data in the selected field, then displays the information in this window:
The list pane on the left displays a list of values in the selected field, along with a count of the number of times the value occurs in the current cell. The Statistics pane on the right displays a total count and other details about the data for that field, including: The number of Nulls found The total number of categories, or values, for that field Statistical values for the data including the mean, standard deviation, minimum, and maximum values A message at the bottom of the window indicates the source of the profile data (in this example, that the data were precomputed by Affinium server and last updated on October 30, 2001 at 2:55 p.m.).
Refreshing a Profile count Canceling a Profile calculation Resizing the Profile window
Version 6.4
Unica Confidential
265
Chapter 6: Processes
Printing Profile results Exporting Profile results Reprofiling by a new field If you are using Profile with a Segment process, see additional information in Using Profile with Segment on page 243.
Note
Position the cursor over the corner of the window you want to resize. The cursor changes to an arrow.
Click the corner of the window and, while holding down the left mouse button, drag the window boundary to resize the window.
266
Unica Confidential
List of processes
Disallowing Profiling
Real-time profiling allows you to view and use characteristics of a selected field. It can affect performance, however, when working with large databases. For this reason, Affinium Campaign allows this option to be disabled. When real-time profiling is disabled, and you click Profile, the Profile Selected Field window appears, but a message is displayed at the bottom of the window to indicate that real-time profiling is disallowed. Figure 6-87 shows an example of the Profile Selected Field window when profiling is disabled, but the field is not configured to be pre-computed.
Version 6.4
Unica Confidential
267
Chapter 6: Processes
Figure 6-88 shows an example where pre-computed values are available for that field. These values are displayed in place of the disallowed live values, and the data source is noted at the bottom of the window (in this example, data computed by Affinium server on October 30, 2001 at 2:55 p.m.).
Figure 6-88 Profiling Disabled Stored Values Displayed
268
Unica Confidential
List of processes
For more information about disallowing real-time profiling, see the Affinium Campaign Administrators Guide.
Frequency counts
During the table mapping process, if you defined one or more fields to precompute a list of distinct values, when you profile those fields, all of the values will be displayed immediately with a zero count. The frequency counts will be dynamically populated as the query results are tabulated. Fields that you did not specify in the list of distinct values only appear when the query returns that specific value. This means the entire list of values may not be displayed until the profile is 100% complete (for example, if the last record retrieved has a unique value). For more details on list of fields with distinct values, see Affinium Campaign Administrators Guide.
Note
While building a query expression, you can double-click on a category to insert the value at the current cursor location in the query text box. Since multiple values may be binned together, if you do not see the value you want, use the Options button to change the maximum number of bins to a larger value. If you set this to a number greater than the number of categories (reported in the Profile Selected Field window), each category will be listed independently. This makes it easy to access all of the existing categories.
Profiling options
Profiling Options include:
Specifying the maximum number of bins for profiling Profiling by meta type
Version 6.4
Unica Confidential
Chapter 6: Processes
specified is fewer than the number of distinct values, the values will be binned together to create equal population bins. To set a maximum number of bins
1
Click the Options button on the Profile Selected Field window. The Profile Options window appears:
Figure 6-89 The Profile Options window
Enter the maximum number of bins into which you want the field values grouped. Click OK. The profile is recomputed using the new maximum number of bins setting.
270
Unica Confidential
List of processes
binned using the meta data information, rather than sorting purely based on ASCII text. For example, the following table shows a date field sorted using meta type information and without: Profiled With Meta Data
25-DEC-1999 20-FEB-2000 20-MAR-2000
Click the Export button. (The Export button is available only when profiling is finished.) The Export Report Data window appears:
Figure 6-90 The Export Report Data window
(Optional) Enable column labels. If Enable Column Labels is selected, the column labels will be exported as well.
Select a delimiter. Select the delimiter type from the Delimiter drop-down menu. You can choose from the following options:
TAB COMMA
Version 6.4
Unica Confidential
271
Chapter 6: Processes
SPACE
Click the Export to File button. The Export Report Data browse window appears, as shown in Figure 6-91:
Figure 6-91 The Export Report Data Browse window
Specify the location and the name you want for the export file, then click OK. The data are exported to the file you specified.
If the Select process takes input from a table or strategic segment, the following Cell Size Limit window appears, as shown in Figure 6-92.
272
Unica Confidential
List of processes
Figure 6-92 The Cell Size Limit Window For Tables and Strategic Segments
Unlimited. If you do not specify a value, all records that match the select criteria on the Source tab will be output. If you wish to limit the number of records that the process outputs (for testing purposes, for example), enter any whole number greater than zero (0).
b (Optional) Choose how you want to process the records fetched by the Select
Process Only the First N Records Affinium Campaign limits the output cell size by retrieving only the first N records from the database. This reduces data fetch and temp space usage, but in non-normalized tables this may also result in fewer than N unique IDs if duplicate IDs exist in the first N records.
Process N Records a Random Affinium Campaign returns randomly selected records up the specified maximum (N) without first de-duping IDs (removing duplicate IDs). This reduces temp space usage, but may also result in fewer than N unique IDs returned if the data is non-normalized
Version 6.4
Unica Confidential
273
Chapter 6: Processes
Limit Cell Size by Selecting IDs at Random Affinium Campaign returns randomly selected records up the specified maximum (N) but first de-dupes IDs (removes duplicate IDs). This option is requires larger temporary files and more compute time, so it should only be used when the data is not normalized on the ID field and exactly N records need to be selected for subsequent processing.
Note
The key differences between these methods is their impact on resources and the end number of records selected when your data source is nonnormalized.
If you want to reduce the time and resources used in selecting the end records, and the exact number of records selected is not critical, choose either Process Only The First N Records (which uses less data fetch and temp space) or Process N Records At Random (which uses less temp space). You may end up with fewer than N records, however, due to duplicate IDs in your non-normalized data or to your query criteria. If it is important to have exactly N number of records selected, choose Limit Cell Size By Selecting IDs At Random. This method uses more time and resources because all records are selected to begin with, then deduped, and only then are N records selected.
Important!
If the Select process has multiple input sources, selecting either Process Only The First N Records or Process N Records At Random provides N records from each input source.
c (Optional) If you are fetching random records, you can change the starting
point for random seed by entering a numeric value directly into the Random Seed text box or by clicking the Pick button to have Affinium Campaign randomly select a new seed value for you. You would change the random seed for the following reasons:
If you have exactly the same number of records in the same sequence and you use the same seed value, records are created into the same samples each time. To get another set of randomly divided samples, change the seed value. You may want to do this if you find that the random sample is very unlucky and produces highly skewed results (for example, all males fall into one group and all females in another).
274
Unica Confidential
List of processes
If the Select process takes input from a cell, the following Cell Size Limit window appears, as shown in Figure 6-92.
Figure 6-93 The Cell Size Limit Window For Input Cells
certain criteria by selecting Output Cells Less Than or Equal To. When you enable this option you are then able to select one or more cells from the drop-down list and apply one of the following rules to them:
Largest Checked Cell Sets the maximum number of records to the largest of all selected input cells. Maximum Size (Above) Minus Sum of All Checked Cells Sets the maximum number of records to the value specified in the Maximum Size For Output Cell text box minus the sum of all checked cells. If the sum of all checked cells exceeds the size of the maximum specified value, the result will be zero (0). Size of Any Checked Cells Sets the maximum number of records to the smallest of all selected cells.
Version 6.4
Unica Confidential
275
Chapter 6: Processes
Sum of All Checked Cells Sets the maximum number of records to the total number of records in all selected cells when added together.
c (Optional) Set the random seed. For more information, see step c.
Snapshot
The Snapshot process lets you capture a list of IDs and associated data and export this information to a table or a file. If you want to associate or track offers with the list, use a Mail List or Call List process. If you want to make sure that duplicate rows are not exported, use an Extract process, then snapshot the results. To configure a Snapshot process
1
Double-click the Snapshot process in the flowchart workspace. For more information and instructions on adding processes to your flowchart, see Editing a flowchart on page 98. The Snapshot Process Configuration window displays the Snapshot tab. A completed Snapshot tab is shown in Figure 6-94.
276
Unica Confidential
List of processes
Select the input cells to use as the data source for the snapshot. You select the input cells the same way you select them for a mailing list. For more information and instructions, see Selecting the data source on page 167. The fields available for capturing in a data snapshot appear in the Candidate Fields list.
Select the table or file where you want to export the snapshot from the Export To drop-down list. If the table you want to use does not appear in the list, or if you want to create a new table, select New Table and follow the instructions in the Affinium Campaign Administrators Guide. You export a snapshot the same way you export a mailing list. For more information and instructions, see Exporting a contact list to a file on page 184.
Select one of the following depending on how you want to handle existing data in the database table or file:
Version 6.4
Unica Confidential
277
Chapter 6: Processes
Append to Existing Data to append the contact information to the end of the file or table. Labels will not be exported as the first row if you select this option for a delimited file. We recommend this method for database tables. Replace All Records to permanently remove the information currently in the file or table, and replace it with the new contact information. Create New File to create a new file with the contact information. A new file with a unique name will be created each time the Mail List process runs. For example, if the file name is MailList.dat, the first time the Mail List process runs MailList.dat will be created. The second time it runs, MailList2.dat is created.
Select the field from the Candidate Fields list that you want to log into the selected field in the table or file. The fields in the list are divided into Affinium-generated fields, the fields from the tables mapped in the table catalog with the same audience level, and existing derived fields. Offer, offer version, campaign, cell, and tracking codes are all Affiniumgenerated fields. If the field you want to export is not available in the list, click Derived Fields. For more information, see Derived fields on page 324. If you want to learn more about the field you selected, click Profile. For more information about profiling, see Profiling a field on page 262. The data format of the field in the data snapshot must match the format of the table field where it is stored.
Click Add. If you want to reorder the fields, select a field in the Export Fields list, and click Up 1 or Down 1 to change where it appears in the list.
Ifyou want to remove duplicate IDs within input cells or order the data snapshot, click More.
278
Unica Confidential
List of processes
The Advanced Settings window appears. The advanced settings in Figure 6-33 are configured to use the ID with the highest score if there are duplicate IDs in the list, and groups the exported rows of data by zip code.
Figure 6-95 Advanced Settings window
If an input cell to the Mail List process contains non-normalized data, you may want to eliminate duplicate IDs from the mailing list, as follows:
a Click the Skip Records with Duplicate IDs checkbox.
This option only removes duplicates within the same input cell. Your mailing list can still contain duplicate IDs if the same ID appears in multiple input cells. If you want to remove all duplicate IDs from the mailing list, you must use a Merge or Segment process upstream of the Mail List process to purge duplicate IDs or create mutually-exclusive segments.
b Select one of the following from the first Based On drop-down list:
AnyOne to select one of the duplicate IDs. MaxOf to select the ID with the maximum value in the specified field. MinOf to select the ID with the minimum value in the specified field.
c Select a field from the second Based On drop-down list.
If the field you want to use is not available in the list, click Derived Fields. For more information, see Derived fields on page 324.
9
If you want to order the rows in the contact list, proceed as follows:
Version 6.4
Unica Confidential
279
Chapter 6: Processes a Click the Order By checkbox. b Select a field from the Order By drop-down list.
If the field you want to use is not available in the list, click Derived Fields. For more information, see Derived fields on page 324.
c Click Ascending or Descending to order the rows in the contact list by
The duplicate ID and ordering information appears below the Export Fields list on the Contact List tab.
10 If you want the cell codes for the list to match cell codes used elsewhere in your
organization, edit the cell codes. You edit the cell codes the same way you edit them in a mailing list. For more information and instructions, see Editing cell codes on page 177.
11 Click the General tab to assign a name and write a note for the process.
The name appears on the process in the flowchart. The note appears when you mouse over the process in the flowchart.
12 Click OK.
The Snapshot process is configured and appears enabled in the flowchart. You can run the process to verify that it returns the results you expect. For more information, see Running processes on page 126 and Running a flowchart on page 102.
Track
The Track process is used to delay the recording of a contact into the appropriate Affinium Campaign Contact History table (and the related ContactTrack table that is used for reporting) based on the audience level you specify. For example, if you deliver a contact list to a mail house, they may perform post-processing on the list, removing invalid addresses and performing householding to remove
280
Unica Confidential
List of processes
duplicates from your original contact list. Then the mail house sends offers to a smaller list than your original one. In this case, you can use the Track process to capture the actual list of contacts, by selecting from the data returned to you from the mail house. You may also want to use the Track process to record contacts after the contact list is initially generated - for example, to exclude contacts when direct mail pieces are marked Return to Sender by the post office. The Track process can also be used to record contact information in real-time. For example, you can use it to record the offers that were made over the telephone during a call. Using Affinium Campaign Interact, when a call center phone representative makes an offer to a customer over the phone, they might click a button to indicate that offer was made. That information can be immediately sent to the Track process, where it is recorded, or it can be accumulated and periodically processed in batch mode. For more information on the use of the Track process in Affinium Campaign Interact, see the Affinium Campaign Interact Users Guide. Figure 6-96 shows a flowchart that outputs a contact list to be sent to a mail house using a Mail List process. This Mail List process only outputs a list to a file. It does not log any information into the Affinium Campaign Contact History table, because the list will undergo post-processing by the mail house.
Version 6.4
Unica Confidential
281
Chapter 6: Processes
Figure 6-97 shows a flowchart that selects the list of customers that were actually contacted by the mail house and tracks the contact information by recording it to the Contact History table. If your mail house returns, instead, the list of undeliverables, you can select the original contact list, suppress the undeliverables using a Merge process, and then pass the remaining contacts to the Track process.
282
Unica Confidential
List of processes
Double-click the Track process in your flowchart workspace. To configure a Track process, it must be connected to at least one process that provides one or more output cells. For more information and instructions on adding processes to your flowchart, see Editing a flowchart on page 98. The Track Process Configuration window displays the Assignment tab, as shown in Figure 6-98.
Version 6.4
Unica Confidential
283
Chapter 6: Processes
Select the appropriate source cell or cells from the Input pull-down menu. The source cells will originate from the table in your data source that holds the final customer contact information. For example, this might be a flat file returned from a mail house that contains the customer IDs and cell codes for all the customers that were actually sent a direct mail. For more information and instructions, see Selecting the input to track on page 285.
Assign an offer or offers to each input cell. Affinium Campaign can only automatically determine the appropriate offer if the list returned from the mail house contains the enough information to uniquely identify the offer. Otherwise, you must assign the correct offer or offers stored in Affinium Campaign to each cell from the data source. For more information and instructions, see Assigning offers to input cells on page 288.
Click the Tracking Rules tab to select the fields containing tracking code information.
284
Unica Confidential
List of processes
If you are tracking all offers, you must designate the field containing the offer code. Any additional code fields you designate will allow you to specify exactly which information is tracked. For more information and instructions, see Designating tracking code fields on page 289.
5
Click the Log tab to choose where you want to record the contact information and to select which information you want to record. For more information and instructions, see Recording the contacts on page 292.
Click the General Tab to assign a name and description to the process. The name appears on the process in the flowchart. The description appears when you mouse over the process in the flowchart.
Click OK. The Track process is configured and appears enabled in the flowchart. You can test run the process to verify that the selection it performs returns the results you expect. For more information on performing a test run, see Running a flowchart on page 102. Performing a test run of the Track process will not populate the Contact History or Contact Track system tables.
Version 6.4
Unica Confidential
285
Chapter 6: Processes
will be able to uniquely identify and track each offer or offer version used and its target audience. In this case, the flowchart containing the Track process will look quite simple, as shown in Figure 6-97. However, if the information you have from the mail house does not include that information, you can still process the list as you would in any other flowchart to separate the contacts out into cells, which can then each be assigned offers. This case might require a flowchart that looks more like the one shown in Figure 6-99.
Figure 6-99 Flowchart that results in multiple inputs to the Track process
Depending on how you need to process the data returned from the flowchart, you will select a single cell or multiple cells of input into the Track process.
286
Unica Confidential
List of processes
To select a single cell On the Assignment tab of the Track Process Configuration window, select the input cell from the Input drop-down list. A single selection is shown in Figure 6-98. To select multiple cells
1
If the Track process is connected to multiple processes, or to a process with multiple output cells, the Assignment tab of the Track Process Configuration window appears as shown in Figure 6-100.
Figure 6-100 Assignment tab with multiple cells
Click the button next to the Input drop-down list. The Select Cells to Use window appears.
Version 6.4
Unica Confidential
287
Chapter 6: Processes
Click the checkbox next to each cell name to select or de-select it. You can click Select All to select all the cells or click Clear All to de-select all the cells. Click OK.
On the Assignment tab of the Track Process Configuration window (as shown in Figure 6-98), click the Track All Offers checkbox. Designate the appropriate offer code field on the Tracking Rules tab. For more information and instructions, see Designating tracking code fields on page 289. To assign an offer or offer version to an input cell
On the Assignment tab of the Track Process Configuration window (as shown in Figure 6-98), select the cell to which you want to assign an offer or offer version. Selecting multiple cells at once will assign the same set of offers/versions to all selected cells.
288
Unica Confidential
List of processes
Select the offer from the Available Offers list. Shift+click or Ctrl+click to select multiple offers.
5 6
Repeat steps 3 and 4 for each offer you want added to the cell. Click OK. The offer you assigned appear in the Offer Name column of the Assignment table on the Assignment tab. Multiple Offers (n) appears if you assigned multiple offers to the cell.
Version 6.4
Unica Confidential
289
Chapter 6: Processes
the mail house returned the file, you would want to filter out the results of the other campaigns and track only your own results. To designate tracking code fields
1
Click the Tracking Rules tab on the Track Process Configuration window to display the tracking fields, as shown in Figure 6-103.
Figure 6-103 Tracking Rules tab on the Track Process Configuration window
Click the Offer Code Field checkbox. If you are tracking all offers, you must designate the field containing the offer code.
Select the field containing the offer code information. You can select this information from any of the tables in your table catalog. You may need to create a derived field to combine several fields to correctly record the offers delivered by your campaign. For example, Figure 6-104 shows the derived OfferVersionCode field created by concatenating the offer code and version code. For more information about derived fields, see Derived fields on page 324.
290
Unica Confidential
List of processes
Figure 6-104 Derived field created to hold offer and version codes
Indicate whether the field contains just the offer code, or a combination of codes separated by a delimiter. An offer code and a version code together uniquely identify each offer, if there is more than one version of an offer. Tracking codes are the code given to identify an offer when it is assigned to a cell. All three codes will usually uniquely identify an offers usage in your campaign. For example, you might want to include the tracking code if you used the same offer for multiple channels. Then the tracking code could identify which offer was used for which channel.
Note
Every time an offer or offer version is used in a flowchart and the flowchart is run, an offer tracking instance is created. If an offer or offer version is used multiple times, the most recently-run offer tracking instance will be used.
Click the checkbox next to each code that you want to use to select the information that will be recorded. Click:
Campaign Code Field to select only those contacts with the same code as this campaign. Cell Code Field to select only those contacts with the same cell code as assigned to by a contact-style process Cell Codes tab. Channel Code Field to select only those contacts with the same channel as the selected offer or offers.
Version 6.4
Unica Confidential
291
Chapter 6: Processes
Product ID Field to select only those contacts with the same product ID as the selected offer or offers.
Select the field containing the code information from the drop-down list, or create a derived field.
Legacy processes
The Contact and Evaluate processes are legacy processes from Affinium Campaign 4 and are no longer available. Their functions have been expanded and incorporated into the Affinium Campaign 5 contact processes and reporting. The Select Opt and Test Opt processes are legacy processes from Affinium Campaign 4 and are no longer available. Their functions have been expanded and incorporated into Affinium Campaign Optimize. For more information, see the Affinium Campaign Optimize Users Guide.
292
Unica Confidential
7 OFFERS
This chapter describes how to create, view, edit, organize, and delete offers in Affinium Campaign. This chapter includes the following topics: Overview Creating a new offer Printing an offer Editing offers and offer versions Duplicating an offer or offer version Deleting offers, offer versions, and offer groups Moving single offers and offer groups Viewing offer reports from a Summary page Searching for an offer or offer version
Unica Confidential
293
Chapter 7: Offers
Overview
Before you begin to work with offers, you should read the general information about offers as implemented in Affinium Campaign, in Offers on page 29. Working with offers in Affinium Campaign requires that you perform the following tasks:
Create a Affinium Campaign offer or offer version in the Offers area of the application. See the remainder of this section for details and instructions. Associate an offer with a particular campaign in the Campaigns area of the application (not required, but recommended). See Associating offers with a campaign on page 71 for details. In a flowchart, link an offer to a contact process (Mail List, Call List, Recommend, or eMessage). See Mail List on page 164 for details on how to use an offer in a contact process. In a flowchart, track the response rate of an offer using the Response process. See Response on page 198 for details. View the offer response rate by generating a variety of reports that capture data relating to offers, as follows:
You can generate reports for any combination of offers, groups, and offer versions in the Analysis area of the application. See Chapter 10, Reports, on page 395 for details on offer reports. You can generate reports for any offer or offer version from its Summary page. See Viewing offer reports from a Summary page on page 318 for instructions.
294
Unica Confidential
Overview
Each time you create an offer version, Affinium Campaign automatically duplicates all of the information from the parent version, except for the version name and version code. You can leave this information unchanged, or edit it. Affinium Campaign automatically synchronizes offer versions within a group in the following ways:
If you change the offer name or offer code in one offer version, Affinium Campaign updates all other offer versions in its offer group; you cannot override this behavior. See Offer codes on page 296 for important details about offer codes. When you move any offer version, its whole offer group, with all of its offer versions, moves to the new location.
Offer groups and single offers are represented by different icons on the offer pages, as follows:
Pages that list offers and groups show some details (the description, offer code, channel, and effective and expiration dates) for single offers, but not for offer groups. You can click an offer groups name to see a list of its offer versions, with some details (the description, version code, channel, and effective and expiration dates) for each offer version. An offer or offer versions Summary page lists all of that items attributes. You can access the Summary page by clicking the offer or offer versions name on the page where it is listed.
Version codes
Version codes in Affinium Campaign have the following features:
The format of version codes is configurable, as described in the Affinium Campaign Administrators Guide. Version codes must be unique within their offer group. Affinium Campaign enforces this, and you cannot override this behavior. Version codes can be created in any of the following ways:
Version 6.4
Unica Confidential
295
Chapter 7: Offers
By default, Affinium Campaign generates unique version codes automatically. You can manually enter a unique code to replace the generated code while you are creating or editing an offer. You can configure Affinium Campaign to use a custom code generator. See the Affinium Campaign Administrators Guide for details.
Offer codes
Offer codes are a valuable tool for tracking and analyzing the results of your campaigns. As a best practice, your organization should establish enterprisewide standards for their use, and use them consistently across channels. Also, remember that in some cases, your customers may see the offer codes you use (for example, if you choose to output the offer code and use it on a coupon).
Note
Many organizations use treatments code, which typically represent the application of an offer version to a cell with a particular tracking code within a campaign. Affinium Campaign automatically generates several codes (offer, version, campaign, cell, and tracking) that are available for output as Affinium-generated fields when you configure a contact process. You can associate these codes with specific offers, using a variety of techniques, and use them when you generate Campaign Performance Over Time and Offer Performance Over Time reports. For more details about tracking codes, see Mail List on page 164.
Offer codes can have up to five parts; a minimum of one is required. The format of offer codes is configurable, as described in the Affinium Campaign Administrators Guide. The entire offer code (all parts taken together), must be globally unique within the Affinium Campaign system. Affinium Campaign enforces this, and you cannot override this behavior. The offer code is used to indicate membership of offer versions within an offer group. Within an offer group, the offer code (all parts taken together) is the same among all versions. If you change the offer code in one version
296
Unica Confidential
within a group, Affinium Campaign updates the offer code for all versions in the group. Use caution when changing the offer code of an existing offer or offer version, for two reasons:
If an offer or offer version is used in a campaign that refers to it by its old offer code in an offer assignment rule, the campaign will not be able to use that offer or offer version. Response tracking of previous campaign executions that used the old code(s) will be incorrect (they will no longer match by offer code in response tracking rules).
By default, Affinium Campaign generates unique offer codes automatically. You can manually enter a unique code to replace the generated code while you are creating or editing an offer. You can configure Affinium Campaign to use a custom code generator. See the Affinium Campaign Administrators Guide for details.
Click Offers in the left frame. The All Offers page appears, as shown in Figure 7-1.
Version 6.4
Unica Confidential
297
Chapter 7: Offers
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
As shown here, offers may be organized in folders in the same way that Campaigns are. See Organizing campaigns on page 80 for details.
2
Navigate to the folder in which you want to create the new offer. You may also create a new folder anywhere in the folder hierarchy. Click Add an Offer in the Offer toolbar, as shown in Figure 7-2.
298
Unica Confidential
The Add an Offer window appears, as shown in two parts in Figure 7-3 and Figure 7-4.
Figure 7-3 Add an Offer window part 1
Version 6.4
Unica Confidential
299
Chapter 7: Offers
The Offer Name field contains a default name for the offer, based on the generated offer code. You can edit the offer name by entering any alphanumeric string in the field. Although the offer name is not required to be unique, a best practice is to use unique offer names so that you can easily distinguish one from another without having to refer to the offer code(s). This is a required field. Avoid using the percent (%), asterisk (*), ampersand (&), less-than (<), greater-than (>), comma(,), colon (:), question mark (?), double quote (), pipe (|), forward slash(/), and backslash (\) characters. In the Version Name field, enter any alphanumeric string. This field may be left blank. However, the version name must be unique within its offer group, so only one of the versions in the group may have a blank version name.
300
Unica Confidential
Avoid using the percent (%), asterisk (*), ampersand (&), less-than (<), greater-than (>), comma(,), colon (:), question mark (?), double quote (), pipe (|), forward slash(/), and backslash (\) characters.
In the Description field, you can add a brief description of the offer, which will be displayed on the offers Summary page. This field is optional. The Offer Code field contains a unique, generated offer code. You can do any of the following:
Leave the code unchanged. Manually change this code to another unique code. The text in parentheses above the field shows the required code format, which is configurable. The letters and numbers in this text have specific meanings: for details, see the Affinium Campaign Administrators Guide. Click Regenerate Code(s) to have Affinium Campaign generate a different unique code. If you have a custom offer code generator that uses the offer name as an input parameter, you need to click this link after filling in the offer name to generate the correct offer code(s).
This is a required field. For more information on offer codes, see Offer codes on page 296.
The Effective/Expiration Dates fields are set, by default, to the current date and the current date plus 30 days, respectively. To change the default dates, do one of the following:
Click the calendar icons and select the appropriate dates on the dropdown calendars. Enter a date directly in the field, using the date format specified by your locale.
The Version Code field contains a generated version code. You can do any of the following: Leave the code unchanged. Manually change this code to another code that is unique within the current offer group. The text in parentheses above the field shows the required code format, which is configurable. The letters and numbers in this text have specific meanings: for details, see the Affinium Campaign Administrators Guide.
Version 6.4
Unica Confidential
301
Chapter 7: Offers
For more information on version codes, see Version codes on page 295.
In the Contact Channel drop-down menu, select a contact channel for the offer. This is a required field. Note that the menu is populated by reading the Channel system table, which must be set up before you create an offer. If the channel you want is not available, see your Affinium Campaign system administrator. The Relevant Products area allows you to create and test a query that selects one or more products to associate with the offer. You can track offers that are associated with products in a Response process (using the ProductID field), and view results in the Offer Product Listings report. For details on associating an offer with products, see To create a relevant products query on page 303. In the Content/Creative URL(s) area, you can list URLs that point to the digital assets that make up the offer. For details, see To add a Asset or a Creative URL on page 305. In the Redemption URL area, you can list static or dynamic clickthrough URLs for valid or expired responses. This is for use with the eMessage or Recommend process. For details, see To add static or dynamic response URLs on page 307. In the Offer Adornment Text area, you can enter the text that will be displayed as a hyperlink in an HTML document (for example, a web page or an email with HTML content). This is for use with the eMessage or Recommend process. The Additional Attribute(s) area contains one default field, Cost per Contact. It may also contain additional fields for other information you would like to track. The information you enter in these fields is written to system tables, is used in response tracking, and appears in a variety of reports. The additional fields are configured by your Affinium Campaign system administrator adding fields to the UA_OfferExtAttr system table.
Click Save Changes to save the offer and go to its Summary page. Click Cancel to exit this page without saving your changes.
302
Unica Confidential
To create a relevant products query Use this procedure while you are creating or editing a new offer or offer version, to associate one or more products with the current offer.
1
On the Add Offer, Add Version, or Edit Summary page, click Edit Query in the Relevant Product(s) area. The Select Products window opens, as shown in Figure 7-5.
Figure 7-5 Select Products window
The Add a Condition fields are created dynamically from the Product system table, as mapped by your Affinium Campaign system administrator. In this example, the table contains ProductID, service, service_type, service_plan, and contract_length fields.
2
Add one or more conditions to your query by entering text in any combination of fields in the Add a Condition area, and clicking >> to add the condition to the Select Products Where area. The parts of each condition are combined in AND statements, and multiple conditions entered in this area are combined in OR statements to select the set of
Version 6.4
Unica Confidential
303
Chapter 7: Offers
associated products. The text you enter must exactly match the value of the field you want to select. Partial matches will not return any records. To remove a condition, select it and click <<. To change the order in which a condition will be evaluated, click to select it and then click Up or Down.
3
To close this window without saving your changes, click Cancel. To save the query and return to the Add Offers window, click Save Changes. To save the query and view the list of products selected by the query, click Save and Test Query. The View Selected Products window opens, as shown in Figure 7-6, and displays a list of product records selected by your query.
Figure 7-6 View Selected Products window
Click Edit Query to return to the Select Products window, or Finish to close this window and return to the Add Offers window.
4
When you have finished adding conditions, they are displayed in the Relevant Product(s) area of the Add Offers window, as shown in Figure 7-7. Each condition of the query is listed on a separate line, and Affinium Campaign treats each line as an OR condition.
304
Unica Confidential
You can continue working with your query, as follows: To view the list of products selected by the query, click Test Query. To remove a condition, select it and click Remove. To continue to add conditions, click Edit Query.
When you have finished work on the Add Offer, Add Version, or Edit Summary page, do one of the following:
Click Save Changes to save the offer and go to its Summary page. Click Cancel to exit this page without saving your changes.
To add a Asset or a Creative URL While creating or editing a new or existing offer or offer version, you can use the following procedure to list URLs that point to the digital assets that make up the offer or to browse to assets in the Affinium Plan asset library. If you want to browse to an asset in the Affinium Plan asset library, you must first purchase and install Affinium Plan and you must have permission to log in to Affinium Plan and to view assets. You also must specify the URL to Affinium Plan in the affinium_config.xml file when you install Affinium Campaign. If you do not specify the URL, the Add from Asset Lib button appears disabled. For more information on modifying the affinium_config.xml file, see the Affinium Campaign Installation Guide. To add an asset
1
On the Add Offer, Add Version, or Edit Summary page, click Add from Asset Lib in the Add Content/Creative URL(s) area. The Choose an Asset Library window opens, as shown in Figure 7-8.
Version 6.4
Unica Confidential
305
Chapter 7: Offers
Click the Asset Library that contains the asset you want to add, use the tree on the right to browse to the asset and select it, and click Accept Asset. The asset appears in the Creative/Content URL(s) field.
Click Save Changes to save your changes or click Cancel to exit this page without saving your changes when you finish your work on the Add Offer, Add Version, or Edit Summary page. Affinium Campaign saves your entries and the asset appears as a link on the Summary tab of the offer. To add a creative URL
On the Add Offer, Add Version, or Edit Summary page, click Add Other Link in the Add Content/Creative URL(s) area. The Add Other Link window opens, as shown in Figure 7-9.
306
Unica Confidential
In the Creative URL(s) field, enter the full URL of the digital asset, which must reside on a publicly-accessible server. In the Alternate Text field, optionally enter the descriptive text that you want to appear in plain text versions of the offer, and as the alt text for the image in HTML versions. Do one of the following:
Click Save Changes. Your entries are saved and the window closes. Click Cancel to close the window without saving your changes.
When you have finished work on the Add Offer, Add Version, or Edit Summary page, do one of the following:
Click Save Changes to save the offer and go to its Summary page. Click Cancel to exit this page without saving your changes.
To add static or dynamic response URLs If you are planning to use an offer or offer version with the eMessage or Recommend process, you may want to add a URL with static or dynamic
Version 6.4
Unica Confidential
307
Chapter 7: Offers
parameters in the Valid response URL and Expired Response URL fields. The web page can be set up to handle the data these parameters contain. If you use static parameters, the URL is included in the email exactly as you enter it. If you use dynamic parameters, they will appear in the eMessage process box, available for mapping to Affinium- or eMessage-generated fields, or to any fields in your list of email recipients. Use the following procedure to add static or dynamic URLs to one of the response fields.
1
On the Add Offer, Add Version, or Edit Summary page, in the Redemption URL area, in the Valid response URL or Expired Response URL field, do any combination of the following:
ing example:
http://myResponseURL.com?Name=Value iii Separate multiple parameters by an ampersand (&), as shown in the fol-
lowing example:
http://myResponseURL.com?Name_1=Value_1&Name_2=Value_ 2
To add one or more dynamic parameters to a URL, use the same syntax, but enclose the dynamic parameters value in angle brackets, as shown in the following example:
http://myResponseURL.com?Name_1=<Value_1>&Name_2=<Value_2>
The text you enter within the angle brackets (i.e., Value_1, Value_2) acts as a placeholder. In the eMessage process, on the Offer Parameters sub-tab of Personalization tab, the dynamic value placeholder appears in the list of fields available to be mapped. When the email is sent, the dynamic value placeholder is replaced by the value of the field you mapped to it. For details on working with the eMessage process, see the Affinium Campaign eMessage Users Guide.
308
Unica Confidential
Printing an offer
When you have finished work on the Add Offer, Add Version, or Edit Summary page, do one of the following:
Click Save Changes to save the offer and go to its Summary page. Click Cancel to exit this page without saving your changes.
Printing an offer
You can print any page in an offer using the printer icon in the Campaign toolbar. To print an offer you created
1
Click Offers in the left frame. The All Offers page appears.
2 3 4
Click the name of the offer you want to print to open it. Select the offer tab you want to print. Click the printer icon in the Campaign toolbar. A new window opens containing a printer-friendly version of the current page.
5 6
Click Print to print the page. Click Print in the Print dialog box. The page prints.
Version 6.4
Unica Confidential
309
Chapter 7: Offers
In the Offers area of the application, click the name of the offer or offer version from which you want to create a new version. The appropriate Summary page appears, as shown in Figure 7-10. In this example, we have selected an offer version to be the parent of the new version.
Click Add Version. The Add Version page appears, as shown in two parts in Figure 7-11 and Figure 7-12, with all of the information from the parent offer or offer version displayed in editable fields, except: A new version code is automatically generated and displayed in the Version Code field. The Version Name field is blank. You must enter a value that is unique within the current offer group. Avoid using the percent (%), asterisk (*), ampersand (&), less-than (<), greater-than (>), comma(,), colon (:), question mark (?), double quote (), pipe (|), forward slash(/), and backslash (\) characters.
Complete or change the fields as decribed in Creating a new offer on page 297. We recommend that you do not change the offer code, as this will change the offer code for all offer versions within this offer group. See Offer codes on page 296 for details. Also, if you change the offer name, all offer names within the group will change. Do one of the following:
Click Save to save the offer version and go to its Summary page. Click Cancel to exit this page without saving your changes.
310
Unica Confidential
Version 6.4
Unica Confidential
311
Chapter 7: Offers
312
Unica Confidential
In the Offers area of the application, navigate to the Summary page of the offer or offer version you want to edit. Click Edit. The Edit Summary page appears, with all of the information displayed in editable fields. The Edit Summary page is identical to the Add Version page, shown in
Version 6.4
Unica Confidential
313
Chapter 7: Offers
two parts in Figure 7-11 and Figure 7-12, except the information in the Version Code and Version Name fields is preserved.
3
Edit the fields as decribed in Creating a new offer on page 297. Remember that changing the offer name or offer code of an offer version changes the name or code for all versions in that group.
Click Save Changes. Your changes are saved and the offer or offer versions Summary page appears, with information displayed in read-only fields.
In the Offers area of the application, navigate to the page where the offer(s) you want to delete are listed. Select one or more offers by clicking the checkbox(es) next to their names.
314
Unica Confidential
Click Delete Selected. A dialog box appears with the message: You are about to delete all the selected items. Click OK to continue.
Click OK. The dialog box closes and the offer(s) are deleted. Click Cancel to close the dialog box without deleting.
To delete offer versions Use this procedure to delete one or more offer versions in an offer group. You can delete multiple versions within the same group.
1
In the Offers area of the application, navigate to the group that contains the offer version(s) you want to delete, and click its name. The page refreshes and the groups versions are listed.
Select one or more offer versions by clicking the checkbox(es) next to their names.
Important!
If you delete all versions in the group, the group will be deleted.
Click Delete Selected. A dialog box appears with the message: You are about to delete all the selected items. Click OK to continue.
Click OK. The dialog box closes and the offer version(s) are deleted. Click Cancel to close the dialog box without deleting.
Version 6.4
Unica Confidential
315
Chapter 7: Offers
To delete offer groups Use this procedure to delete one or more offer groups. You can delete multiple groups within the same folder.
Important!
If you delete an offer group, you delete all versions within that group.
In the Offers area of the application, navigate to the page where the offer group(s) you want to delete are listed. Select one or more groups by clicking the checkbox(es) next to their names. Click Delete Selected. A dialog box appears with the message: You are about to delete all the selected items. Click OK to continue.
2 3
Click OK. The dialog box closes and the offer group(s), including all offer versions within the group(s), are deleted.
In the Offers area of the application, navigate to the page where the offer(s) you want to move are listed. Select one or more offers by clicking the checkbox(es) next to their names.
316
Unica Confidential
Click Move. The Move Items To window appears, as shown in Figure 7-13.
Figure 7-13 Move Items To window
Navigate to the folder where you want to move the offer(s). Click the plus signs next to folder icons to open the folders.
Click the desired folder to select it. The selected folder is highlighted in blue.
Click Accept this Location. The window closes and the offer(s) are moved to the folder you selected. Click Cancel to close the window without moving the offer(s).
Version 6.4
Unica Confidential
317
Chapter 7: Offers
In the Offers area of the application, navigate to the page where the offer group(s) you want to move are listed. Select one or more groups by clicking the checkbox(es) next to their names. Click Move. The Move Items To window appears, as shown in Figure 7-13.
2 3
Navigate to the folder where you want to move the offer group(s). Click the plus signs next to folder icons to open the folders.
Click the desired folder to select it. The selected folder is highlighted in blue.
Click Accept this location. The window closes and the offer groups(s), including all of their offer versions, are moved to the folder you selected.
Click Cancel to close the window without moving the offer group(s).
In the Offers area of the application, navigate to the Summary page of the desired offer or offer version. Click Analysis, as shown in Figure 7-14.
318
Unica Confidential
Select a report from the Report Type drop-down list. The options are: Offer Performance Over Time (the default selection) Offer Detailed Response Summary Offer Financial Summary
Version 6.4
Unica Confidential
319
Chapter 7: Offers
See Chapter 10, Reports, on page 395 for details on offer reports.
Click Offers in the left frame. The All Offers page appears, as shown in Figure 7-1.
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Enter all or part of an offer or offer versions description, offer name, or offer code in the Find an Offer by Name, Description or Code field. The search is not case-sensitive.
Click Search. The offers Search Results page appears, as shown in Figure 7-16.
320
Unica Confidential
You can do any of the following with the offers and offer versions displayed on the Search Results page:
Click the name to go to the items Summary page Delete offers and offer versions, as described in Deleting offers, offer versions, and offer groups on page 314 and Deleting offers, offer versions, and offer groups on page 314. Move offers and offer versions (along with the groups they belong to), as described in Moving single offers and offer groups on page 316.
Version 6.4
Unica Confidential
321
Chapter 7: Offers
322
Unica Confidential
8 STORED OBJECTS
This chapter describes how to work with derived fields, user variables, macros and other objects that can be stored and re-used for all campaigns. This chapter includes the following topics: Derived fields User variables Custom macros Templates Stored table catalogs
Unica Confidential
323
Derived fields User variables Custom macros Templates Stored Table Catalogs
Derived fields
Derived fields are new variables that do not exist in a data source and are created from one or more existing fields, even across different data sources. In many processes, the configuration dialog includes a Derived Fields button that you can use to create a new variable for querying, segmenting, sorting, calculating, or providing output to a table. You can make derived fields that you create explicitly available to a subsequent process by enabling the Make Persistent option when you create it. In general, derived fields available to a process are listed in the Derived Fields folder. Derived fields are available only for the process in which they were created. If you have not created any derived fields in a process, no Derived Fields folder appears in the list. To use a derived field in another non-subsequent process, store the derived field expression in the Stored Derived Fields list. Then use the stored derived field in the desired process. For more information on the Stored Derived Fields list, see Storing derived fields on page 328 You can store your derived fields in a derived field list to make it available for all processes and all flowcharts. This option lets you create, edit, and remove derived fields. 324
Unica Confidential
Derived fields
Managing stored derived fields works the same way as managing stored queries. To create, edit, move, or remove a derived field, follow the instructions for performing the same task with queries. You can perform the following tasks with derived fields:
To create a derived field To create a new derived field from an existing one To use a custom macro to create a derived field
From the configuration dialog of a process that supports derived fields, click the Derived Fields button The Create Derived Field window appears, as shown in Figure 8-1.
Version 6.4
Unica Confidential
325
Enter a name for the new derived field in the Field Name field. All derived fields previously created in this process appear in the drop-down list. To create a new derived field, enter a different name.
Important!
You cannot use the words Yes or No as names for derived fields; doing so results in database disconnects when these derived fields are called.
Select the Make Persistent checkbox if you want to store and pass on the calculated values for this field. (See Using persistent derived fields on page 330 for details.) Enter an expression for the derived field directly in the Expressions text box or click Formula Helper to use the Query Helper. You can also use the fields listed in the Fields available for expression list box by clicking a field name and then clicking the <-- Use button to insert the field name into the Expression text box. You can define a derived field to be a null value. Use NULL to return a null value for a snapshot or NULL_STRING to return a null value with a string datatype if you want the derived field to be used with an Affinium Campaign macro. You can enter a string in a derived field as a constant. If you use a string, it must be surrounded by double quotation marks. For example, my string. No quotation marks are required for numeric strings.
326
Unica Confidential
Derived fields
(Optional) Click the Check Syntax button to verify the syntax of the derived field expression you have entered. This will display either an error message (if there is a problem) or else indicate Syntax check OK if the syntax is correct.
Click the Apply button to save the new derived field and continue working in the Create Derived Field window, or the OK button to save and exit. Clicking the Apply button creates the derived field and keeps the Create Derived Field window open. To create a new derived field from an existing one
From the configuration dialog of a process that supports derived fields, click the Derived Fields button. The Create Derived Field window appears (as shown in Figure 8-1).
From the Field Name drop-down list, select the existing derived field from which you want to create a new one. The expression for the selected derived field appears in the Expression area.
Change the name of the existing derived field to the name you want for the new derived field.
Important!
You cannot use the words Yes or No as names for derived fields; doing so results in database disconnects when these derived fields are called.
4 5
Edit the derived field expression as required. Click the Apply button to save the new derived field and continue working with the Create Derived Field window, or the OK button to save and exit. Clicking the Apply button creates the derived field and keeps the Create Derived Field window open.
Version 6.4
Unica Confidential
327
From a process that supports derived fields, click on the Derived Fields button. The Create Derived Field window appears, as shown in Figure 8-1.
In the Create Derived Field window, click the Formula Helper button. A list of custom macros appears in the Formula Helper.
Select a macro from the list by double-clicking it. The macros declaration and description are displayed, and the macro itself is inserted in the Formula Helper window.
Select the appropriate fields from the Available Fields dialog box to complete your expression. Click the Apply button to save the new derived field and continue working in the Create Derived Field window, or the OK button to save and exit. Clicking the Apply button creates the derived field and keeps the Create Derived Field window open.
in a process, Pct_Usage will not be available in any other process (except an immediately following process if Make Persistent is enabled). However, you can also save the derived field definition in the same way that you would save any other query. You can store the derived field definition in the Stored Derived Fields list and give it a name (e.g., Pct_of_limit_used). Later, if you want to use the same derived field in another process in the same or a different flowchart, you can select Pct_of_limit_used from the Stored Derived
328
Unica Confidential
Derived fields
Fields list and insert the stored derived expression, rather than reconstructing it from scratch. To store a derived field
1
In a process that supports derived fields, create the derived field that you want to store. (For more information on creating derived fields, see To create a derived field on page 325.)
Click the Stored Expressions button. The Stored Derived Field Expressions window appears. The procedure for storing derived fields is identical to storing queries.
Note
If you want to store an already created derived field, select the derived field name from the Field Name drop-down list. The derived field expression appears in the Expression area. Then click the Stored Expressions button.
In a process that supports derived fields, or from Tools > Derived Fields, access the Derived Fields window. Click the Stored Expressions button. The Stored Derived Field Expressions window appears. The procedure of using derived fields is identical to using queries.
Through Tools > Stored Derived Fields Through the Derived Fields button in a Process Configuration window
Version 6.4
Unica Confidential
329
Wherever the instructions indicate to display the Stored Derived Field Expressions window, you can use either method to do so.
Click to select the Make Persistent checkbox, to make this derived field persistent.
Example
You might have a Select process configured to choose IDs based on a constraint on a derived field, and then Snapshot the selected records that include that derived field. If you mark that derived field to be persistent, that calculated value is passed on from the Select to the Snapshot. Another use of persistent derived fields is with any aggregate-type derived field (for example, AVG or GROUPBY). These aggregated fields are calculated based on the multiple rows of data within the current cell, and so the value of these aggregated fields changes as the contents of the cell change. With persistent derived fields, you can choose to keep the original calculated value, then carry 330
Unica Confidential
Derived fields
that to other processes. If you choose to recalculate the derived field instead, you will get a calculated value based on the remaining records in the current cell. When a process takes multiple inputs, such as a Snapshot process working with the input from two Select processes, all persistent derived fields are available to the downstream process. If a persistent derived field is not available across all incoming Select processes, and it is included in the output for a Snapshot, then the Snapshot process displays a NULL value for that persistent derived field in all the output rows from the Select processes that did not have that persistent derived field. If a persistent derived field is not available across all incoming Select processes, and you use it to define a Segment process, then the Segment process has empty segments for the Select processes that did not have that persistent derived field. The Segment process will remain unconfigured if you try to define a segment with an expression using more than one persistent derived fields not available across all the Select processes.The following guidelines apply to persistent derived fields (PDFs):
PDFs attach to an inbound cell (vector) PDFs are calculated before query execution Multiple PDFs are available in the following processes:
Snapshot
* *
If a PDF is not defined for a cell, its value = NULL If a single ID is greater than one cell, one row is output for each cell
Segment
* *
PDFs are not available for segmentation by field when multiple input cells are selected PDFs must exist in all selected input cells for use in a segment by query
PDFs keep only a single value (selected at random) per ID value, regardless of the number of times an ID value occurs in the data. Thus, when the output includes no table fields (and includes an Affinium ID), there will be only one record per ID value.
Version 6.4
Unica Confidential
331
However, when you use a derived field based on a table field, the output includes a table field indirectly. Thus, there will be a record for each instance of an ID value (in other words, if the ID value occurs seven times in the data, there will be seven records output). Persistent derived fields only store a single value for each audience ID, which is randomly selected from the available values. This means that when working with unnormalized data, you must use a GROUPBY macro function to achieve the desired behavior. For example, say you want to find from the purchase transaction table, the highest dollar amount in a single transaction a customer has made and save this as a persistent derived field for downstream processing. You could write a derived field (and then persist it as a persistent derived field) as follows:
Highest_purchase_amount = groupby(CID, maxof, Purch_Amt)
Against unnormalized purchase transaction data such as the following, this would compute as follows:
CID A A A DATE 1/1/2004 PURCH_AMT $200 HIGHEST_PURCHASE_AMOUNT $300 $300 $300
When the derived field is persisted, it choose (randomly) any value (which are all $300) and persists the value $300 for customer A. A second less obvious example might be to select a predictive model score from a scoring table for a specific model X. Here the derived field might look like this:
ModelX_score = groupby(CID, maxof, if(Model = 'X', 1, 0), Score)
Persisting the derived field, ModelX_Score, gives the desired result of the score value of 80. It is incorrect to create a derived field:
332
Unica Confidential
Derived fields
Then when you persist the derived field Bad_ModelX_score, the persisted value could be NULL or 80. If you are working with unnormalized data and the the derived field values are not all the same, persisting that derived field could result in any of the value being returned. For example, defining Derived_field_Score = SCORE and persisting it could result in the value 57, 72, or 80 for customer A. To ensure desired behavior, you must use the GROUPBY macro over the customer ID and guarantee the derived field value is the same for all data for that customer. To create a custom macro from the Select process
1
From the Source tab of the Select process window with the Select records with radio button selected, click on the Custom Macros button, as shown in Figure 8-3.
Version 6.4
Unica Confidential
333
The Stored List window provides you with the following choices:
You can elect to retrieve a custom macro from the list of already-created custom macros. For more information, see To use a custom macro to create a derived field on page 328. You can save the current expression from the Select process to the Custom Macros window and use it as a basis for creating a new custom macro.
334
Unica Confidential
User variables
If you select this option and click OK, the Custom Macros window appears with the current expression from the Select process is pasted into the Expression window, which you can use as a basis for creating a custom macro.
You can elect to do housekeeping and organize the stored custom macros. This option also allows you to create a new custom macro without using an expression from the Select process. If you select this option and click OK, the Custom Macros window appears. This is the same window that appears when you select Custom Macros from the Tools menu.
User variables
Using user variables
Affinium Campaign supports user variables which can be used during process configuration when creating queries and expressions. The following guidelines apply to user variables:
User variables are local to the flowchart in which they are defined and used, but have global scope within that flowchart. User variables use the following syntax: UserVar.UserVarName User variables have Default Values, which is the value assigned when a user variable is initially defined in the Tools->User Variables window. The Default Value is only used to set the Current Value just prior to executing a flowchart Run. It is the Current Value that Affinium Campaign uses during a flowchart Run. If the Current Value for a user variable is not set and you execute a process run or a Branch Run, Affinium Campaign will not be able to resolve the user variable. Affinium Campaign only sets the Default Value of a user variable to the Current Value prior to a flowchart Run.
Important!
You can change the Current Value of a user variable in the Derived Field window of a Select process.
Version 6.4
Unica Confidential
335
User variables can be set to constants or to expressions, such as UserVar.myVar = Avg(UserTable.Age). However, if you use an expression that returns multiple values (such as UserTable.Age + 3, which will return one value for each record in the table) the user variable will be set to the first value returned. The values of user variables can be passed in on process execution (queue for Affinium Campaign Interact users, and command-line). User variables are supported in outbound triggers.
To define a user variable, select Tools > User Variables, the User Variables window appears, as shown in Figure 8-5.
Figure 8-5 The User Variables window
You can also create or a user variable from the Derived Fields dialog box.
2
In the Variable Name section, enter a name for the user variable by clicking on the <Click here to add new item> hotspot. In the Data Type section, select a data type from the pull-down menu. The choices are none, text, or numeric. If you do not select a data type, the application selects none when you click the OK button. The none datatype may produce unpredictable results, so we recommend that you specify the correct datatype.
336
Unica Confidential
User variables
In the Default Value section, enter a default value for the user variable. You can also profile fields for available values by clicking on the button, as shown in Figure 8-6.
Figure 8-6 Profiling window
In the Current Value section, enter a current value for the user variable. You can also profile fields for available values by clicking on the button, as shown in Figure 8-6. When you have completed defining user variables, click the OK button. The application stores the user variable, which you can access later when configuring processes. After a flowchart Run executes, the Current Value of each user variable is displayed in the Current Value section for each user variable. If the current value is different from the default value, you can restore the default value by clicking on the Restore Defaults button.
Version 6.4
Unica Confidential
337
Note, however, that if the Current Value of a user variable is redefined in a Select process, resetting the Current Value to the Default Value manually will have no effect on the value of the user variable during a Flowchart, Branch, or Process Run.
Custom macros
A custom macro is a query that you create using either an Affinium Expression, raw SQL, or raw SQL that includes a value. Custom macros also support variables, which makes them far more powerful than the stored queries they are designed to replace. You can save a custom macro and use it in configuring other processes in the same flowchart, in building other flowcharts, and in defining derived fields. Support for raw SQL improves performance, allowing complex transactions to be carried out in the database rather than having the raw data filtered and manipulated in the application server. From within the various custom macros windows you can do the following:
View the list of custom macros Create a new custom macro Edit an existing custom macro Create a new folder and organize your custom macros Move an existing custom macro to a different folder Remove a custom macro from the list of custom macros
338
Unica Confidential
Custom macros
Custom macros that use an Affinium Expression Custom macros that use raw SQL Custom macros that use raw SQL and include a specified value Since non-technical users are able to use custom macros, when you create a custom macro you should describe how it works very carefully, place similar kinds of macros in special folders, and so on, to reduce the possibility that someone might use a custom macro incorrectly and retrieve data that they were not expecting.
Important!
The following sections explain how to access and create a custom macro from the Tools menu, as well as the Select, Segment, and Audience processes.
Note
There are many processes from which you can create a custom macro. For the sake of brevity, we have limited our discussion to the Select, Segment, and Audience processes.
Select Tools->Custom Macros. The Custom Macros window appears, as shown in Figure 8-7.
Version 6.4
Unica Confidential
339
Select the type of custom macro you want to create from the Expression Type drop-down list.
a If you select Raw SQL Selecting ID List, you must also select a database from
b If you select Raw SQL Selecting ID + Value, you must do the following, as
340
Unica Confidential
Custom macros
Select the value type (Text or Numeric) from the drop-down list in the Value Type field. You must ensure that the value type you select here is correct. Otherwise, later, when you attempt to profile this query, you will get a mismatched type error.
Important!
Note
If you selected Text as the value type, specify the width of the value type in bytes in the Width field. You must get width in bytes information from the database. If you do not have access to the database or are unable to obtain the information, enter 256, the maximum width.
Click in the Expression field. The Specify Selection Criteria window opens, as shown in Figure 8-10.
Figure 8-10 Specify Selection Criteria window
You can use as many variables as you like. Variable syntax is alphanumeric, and the variable must be enclosed in open and closed angle brackets (<>). Operands (values and strings) and operators may be variables.
Version 6.4
Unica Confidential
341
Important!
Do not use flowchart user variables in custom macro definitions, since custom macros are global and flowchart user variables are not.
For detailed information on queries, see Creating a query with Point & Click on page 249. Figure 8-11 shows a definition of an custom macro that uses raw SQL selecting an ID and a value.
Figure 8-11 Fully Defined custom macro
In the Note field, provide a clear explanation of what the custom macro is designed to do and what each variable represents. Although this is optional, we strongly recommend that you perform this task. In the Name field, you must enter a name and declaration for the custom macro so that it can be referenced, using the following syntax:
MacroName(var1,var2,...)
Only the name of the custom macro which must be unique and the list of variables need to be expressed.
342
Unica Confidential
Custom macros
The MacroName must be alphanumeric. You cannot use spaces in the MacroName string, but you can use underscores (_).
Important!
The variable names must match the variable names in the custom macro definition in the Expression dialog box, and they must be expressed as a comma-separated list within parenthesis.
Click Save to save the custom macro. The custom macro is then stored, and can be accessed by its name. Note that you can edit any of the current values to change the name of the custom macro, edit the macro, or change the folder/location where the macro is stored.
The name of a custom macro must be alphanumeric. You cannot use spaces in the name string, but you can use underscores (_). If a data source in the database configuration file dbconfig.lis has ENABLE_SELECT_SORT_BY = TRUE, then you must write raw SQL custom macros with an ORDER BY clause in order to sort the returned records by the audience key fields of the audience level under which you are working. Otherwise, if the sort order is not as expected, an error will be generated when the custom macro is used in a derived field in a Snapshot process. If you do not compare a returned value from a custom macro, if the value is numeric, non-zero values are treated as TRUE (and therefore IDs associated with them are selected) and zero values are treated as FALSE. String values are always treated as FALSE. When creating a custom macro that uses raw SQL, using a temp table can greatly speed up the performance of the raw SQL by scoping the amount of data it needs to work with. When a custom macro uses temp tables in its underlying logic, a temp table will be forced up to the database so that the logic does not fail.
Version 6.4
Unica Confidential
343
However, if a custom macro is used in a top level SELECT, then there is no history for Affinium Campaign to use to force a temp table up to the database, and the logic fails. Thus, when creating a custom macro that uses raw SQL, you may need to create two versions of the same custom macro one that uses temp table tokens and one that does not. The custom macro without temp table tokens can be used at the top of a tree (for example, in the first SELECT). The one with temp table tokens can be used anywhere else in the tree when there might be a temp table to take advantage of.
Self-joins may occur when combining values returned from custom macros when querying against unnormalized data, which is not likely to be the desired behavior. For example, if you a use a custom macro based on raw SQL that returns a value and (in a Snapshot process, for example) you output the custom macro and another field from the table that the custom macro is based on, Affinium Campaign performs a self join on that table. If the table is non-normalized, you will end up with a Cartesian product (that is, the number of records displayed is more than you would expect).
Custom macros are now automatically by reference, because the definition of the custom macro is not copied into the current process. At execution time, a custom macro is resolved by looking up its definition in the UA_CustomMacros system table (where definitions are stored) and then used/executed.
Unlike stored queries, custom macro names must be unique, independent of the folder path. In releases prior to 5.0, you could have a stored query named A, for example, in both folder F1 and F2. Since everything is fully backwards compatible Affinium Campaign 5.0 supports stored queries from earlier releases. However, references to nonunique stored queries must use the old syntax:
storedquery(<query name>)
Because of their support for variables and encapsulation, custom macros are very powerful tools, even when using the Affinium Macro Language rather than raw SQL.
344
Unica Confidential
Custom macros
For example, if you wanted to compute the average X of the top Y% of customers that live in geography Z, you could write a custom macro (good only at the customer level) like the following:
Compute_stratified_average_per_region(field_to_average, top_percentage_to_use, region)
The implementation of this macro might be in the Affinium Macro Language, and might look like this:
;Compute top percentage threshold value global_sort = 1 Sort_by_field = groupby_where(global_sort, indexof, <field_to_average>, Demographic.region = <region>) Threshold = groupby(global_sort, maxof, if(sort_by_field = round(<top_percentage_to_use>*count(sort_by_field)), sort_by_field, 0))) ;Now average only over values that exceed the threshold and match the specified region Result = groupby_where(CustID, AvgOf, <field_to_average>, <field_to_average> >= Threshold AND Demographic.region = <region>)
To use this code, you simply call the macro, supplying values for the necessary arguments, as follows; the (perhaps lengthy and complex) implementation is transparent:
When resolving user variables in custom macros, Affinium Campaign uses the current value of the user variable when checking syntax. If the current value is left blank, Affinium Campaign generates an error.
Version 6.4
Unica Confidential
345
The temp table token is provided as a performance optimization advanced feature that scopes the amount of data pulled down from the database by the set of audience IDs in the temp table available for use by the current process. This temp table list of IDs may be a superset of the IDs in the current cell. Therefore, aggregate functions performed over the temp table (for example, average or sum) are not supported and may generate incorrect results. If you intend to use the custom macro across several different databases, you may want to use an Affinium expression rather than raw SQL, since raw SQL may be specific to a particular database. If a custom macro contains raw SQL and another custom macro, the custom macro is resolved, executed and its value returned and then the raw SQL is executed. Affinium Campaign treats a comma as a parameter separator. If you are using commas as literal characters in a parameter, enclose the text in open and close brackets ({}), as in the following example:
TestCM( {STRING_CONCAT(UserVar.Test1, UserVar.Test2) } )
Table 8-1 explains how Affinium Campaign treats custom macros in queries and derived fields.
Type of Custom Macro Where a Custom Macro is Used Raw SQL: IDs Raw SQL: IDs + Value Affinium Expression
346
Unica Confidential
Custom macros
In Affinium Queries and Derived Fields (Select, Segment, and Audience Processes)
Runs as a separate query. The ID list is merged with other results. If a custom macro contains other custom macros plus raw SQL, the custom macros are resolved and executed and then the raw SQL is executed.
Expects that the returned value will be used in an expression or as a comparison. If the value is not used this way, Affinium Campaign treats a nonzero value as TRUE for ID selection and a zero value and string as FALSE.
The expression is resolved and a syntax check is performed. One query per table is supported, and the IDs are match/merged.
Not supported.
The expression is resolved, but no syntax check is performed. If the expression is incorrect, it is detected by the database server when executed.
Select Tools > Custom Macros. The Custom Macros window appears, as shown in Figure 8-17.
Version 6.4
Unica Confidential
347
Navigate through the Items List to find the macro you want to edit, and click on it to select it. The Info area shows the detailed information for the selected template.
Click Edit/Move to edit or move the selected template. The Edit/Move Custom Macros window opens, as shown in Figure 8-13.
Figure 8-13 Edit/Move Custom Macros window
348
Unica Confidential
Templates
You can change the name of the macro, edit the note, change the folder/location where the macro is stored, or click Edit to edit the expression. Click Save to save your changes. Click Close to exit the Custom Macros window.
5 6
Templates
A template is a group of selected and saved processes. Templates allow you to design and configure one or more processes only once, and save them in the Template Library. Templates save process configurations and table mappings, and are available for any session or campaign.
Select the process(es) you want to save as a template. (You can use Shift+click and Ctrl+click to select multiple processes.)
Select Edit > Copy to Template Library. If no processes are selected, this option is grayed out and unavailable. The Save Template window appears.
Version 6.4
Unica Confidential
349
Enter the name of the template in the Name field. You cannot use space in the name string. Stored templates are identified by names, which must be unique in the folder in which it is stored.
(Optional) Enter a free-form text description in the Note field. Use this field to describe the saved template.
(Optional) Select a folder. Templates can be organized in folders. Select an existing folder from the list, or select New Folder to create a new one. The currently selected folder is shown after the Save Under field above the Item List. To create a new folder, click the New Folder button. You can create an unlimited number of folders (including nesting folders in a hierarchy) to organize and store your templates.
Click Save.
350
Unica Confidential
Templates
Select Edit > Paste from Template Library. The Stored Templates window appears.
Figure 8-15 Stored Templates window
Select a template from the Items list. The information of the selected template appears in the Info area.
Click the Paste Template button. The selected template is pasted on the palette.
Note
You can paste templates even if you are not viewing the flow chart. The application will paste the selected template to the palette. When you click the Flow Chart tab, you can replace it anywhere. The inserted processes may appear on top of other process already in the Flow Chart. All inserted processes are initially selected to make them easy to move as a group.
Note
Templates can be accessed by any other session or campaign through the Template Library. If a template is pasted into a flowchart that has different table mappings, the subsequent mapping is augmented but not replaced by the new mapping, unless the table name(s) are the same.
Version 6.4
Unica Confidential
351
Managing templates
The Stored Templates command lets you manage templates already stored in the template library. You can create new folders, edit, move, and remove stored templates through this command. This command is similar to Edit > Paste from Template Library.
Note
You cannot create a new template here. To create a new template, see Copying templates to the Template Library on page 349.
To manage a template
1
Select Tools > Stored Templates. The Stored Templates window appears. Figure 8-16 shows the window with a template selected.
Figure 8-16 Stored Templates window with a template selected
Select the desired template in the Items List. The Info area shows the detailed information for the selected template.
Click Edit/Move. The Edit/Move Stored Templates window opens, as shown in Figure 8-17.
352
Unica Confidential
You can change the name of the stored template, edit the note, or change the folder/location where the template is stored. Click Save to save your changes. Click Close to exit the Stored Templates window.
5 6
You do not create new table catalogs here. For more information on creating table catalogs, see the Affinium Campaign Administrators Guide.
Version 6.4
Unica Confidential
353
The Stored Table Catalogs window appears. Figure 8-18 shows the window with a catalog selected.
Figure 8-18 Stored Table Catalogs window with a catalog selected
Select the desired table catalog in the Items List. The Info area shows the detailed information for the selected table catalog, including the table catalog name and file path.
Click Edit/Move. The Edit/Move Stored Table Catalogs window opens, as shown in Figure 8-19.
You can change the name of the stored table catalog, edit the table catalog description, or change the folder/location where the table catalog is stored. Click Save. Click Close.
5 6
354
Unica Confidential
Version 6.4
Unica Confidential
355
356
Unica Confidential
9 SESSIONS
This chapter describes how to create and manage sessions, strategic segments, dimension hierarchies, and cubes. This chapter includes the following topics: Sessions Strategic segments Dimension hierarchies Cubes
Unica Confidential
357
Chapter 9: Sessions
Sessions
Like campaigns, sessions are comprised of individual flowcharts. However, sessions also allow you to create persistent data constructs (such as strategic segments, stored dimension hierarchies, and cubes) that are available globally to all campaigns. You can use sessions to create flowcharts that: Transform data required across campaigns; Produce Affinium Model input files; Contain strategic segments.
Note
When you are designing flowcharts, be careful not to create cyclical dependencies among your processes. For example, your flowchart has a Select process that provides input to a CreateSeg process. If you choose as input in your Select process a segment that will be created by the same CreateSeg process that the Select process provides output to, you will have created a cyclical dependency. This situation will result in an error when you try to run the process.
Creating a session
Use the following procedure to create a session. To create a session
1
Click Sessions in the left frame. The All Sessions page displays the folder structure used to organize your companys sessions, as shown in Figure 9-2. If you have previously opened a subfolder within the All Sessions page, that subfolder will be displayed instead. For more information on using a folder structure to organize your sessions, see Organizing sessions on page 365.
358
Unica Confidential
Sessions
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Figure 9-1 Folders on the All Sessions page are used to organize sessions
Navigate through the folder structure until you are displaying the contents of the folder where you want to add your session. Navigate through the folder structure by clicking a folder name to open it, clicking All Sessions to return to the All Sessions page, or clicking Parent Folder to open the folder that contains the currently open folder.
Click Add a Session. The New Session page appears, as shown in Figure 9-2.
Version 6.4
Unica Confidential
359
Chapter 9: Sessions
Enter session information into the fields on the page, as described in Table 9-1.
Table 9-1 Elements on the New Session page
Element
Description
Enter a name for the session. We recommend creating a unique name for each session to help avoid confusion. Avoid using the percent (%), asterisk (*), ampersand (&), less-than (<), greater-than (>), comma(,), colon (:), question mark (?), double quote (), pipe (|), forward slash(/), and backslash (\) characters. Enter a description of the session. This description is displayed on the Home page and All Sessions pages.
Name
Description
Click Save Changes. You can also click Save and Add Flowchart to immediately start creating your sessions flowcharts.
Viewing a session
You can use several methods to view a session. You can see all the sessions you created on your Home page, you can navigate through the folder structure of all
360
Unica Confidential
Sessions
sessions stored in Affinium Campaign, or you can search for a session from either the Home page or Campaigns page. To view a session you created
1
Click Home in the left frame. The Home page appears, as shown in Figure 9-3.
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Version 6.4
Unica Confidential
361
Chapter 9: Sessions
If the session you want to view does not appear in the My Sessions section of your Home page, click View all n Sessions. Click the View a tab icon ( ) next to the name of the session you want to view.
You can also click the name of the session to immediately display the sessions Summary tab.
The session appears, open to the tab you selected. To view any session
1
Click Sessions in the left frame. The All Sessions page appears, as shown in Figure 9-1.
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Navigate through the subfolders until you find the one that contains the session you want to view. Click the View a tab icon ( ) next to the name of the session you want to view.
You can also click the name of the session to immediately display the sessions Summary tab.
The session appears, open to the tab you selected. To view a session from search results
1
From either the Home page or the All Sessions page, search for the session you want to view.
362
Unica Confidential
Sessions
The Search Results page appears. For information and instructions, see Searching for objects in Affinium Campaign on page 59.
2
You can also click the name of the session to immediately display the sessions Summary tab.
Editing a session
You can use several methods to open a session for editing. You can see all the sessions you created on your Home page, you can navigate through the folder structure of all sessions stored in Affinium Campaign, or you can search for a session from either the Home page or All Sessions page. To edit a session you created
1
Click Home in the left frame. The Home page appears, as shown in Figure 9-3.
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
If the session you want to view does not appear in the My Sessions section of your Home page, click View all n Sessions. Click the Edit a tab icon ( ) next to the name of the session you want to edit.
Select the session tab you want to edit. The session appears, with the tab you selected opened for editing.
Version 6.4
Unica Confidential
363
Chapter 9: Sessions
Click Sessions in the left frame. The All Sessions page appears, as shown in Figure 9-1.
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Navigate through the subfolders until you find the one that contains the session you want to view. Click the Edit a tab icon ( ) next to the name of the session you want to edit.
Select the session tab you want to edit. The session appears, with the tab you selected opened for editing. To edit a session from search results
From either the Home page or the All Sessions page, search for the session you want to view. For information and instructions, see Searching for objects in Affinium Campaign on page 59.
On the Search Results page, click the Edit a tab icon ( session you want to edit.
Select the session tab you want to edit. The session appears, with the tab you selected opened for editing.
Running a session
To run a session, you need to run each of its flowcharts. For more information, see Running a flowchart on page 102.
364
Unica Confidential
Sessions
Organizing sessions
You can create a folder structure to organize your sessions. You can then move sessions from one folder to another within this structure.
Click Sessions in the left frame. The All Sessions page appears, as shown in Figure 9-1.
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Click the folder where you want to add the subfolder. Navigate through the folder structure by clicking a folder name to open it, clicking All Sessions to return to the All Sessions page, or clicking Parent Folder to open the folder that contains the currently open folder. An example subfolder is shown in Figure 9-4.
Version 6.4
Unica Confidential
365
Chapter 9: Sessions
Click Add a Subfolder. The New Folder page appears. A completed page is shown in Figure 9-5.
366
Unica Confidential
Sessions
Enter a name and description for the folder in the Folder Name and Description fields. Click Save Changes. The new subfolder appears in its parent folder. To edit a folders name and description
Click Sessions in the left frame. The All Sessions page appears, as shown in Figure 9-1.
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Click the folder you want to rename. Navigate through the folder structure by clicking a folder name to open it, clicking All Sessions to return to the Campaigns page, or clicking Parent Folder to open the folder that contains the currently open folder. An example subfolder is shown in Figure 9-4.
Version 6.4
Unica Confidential
367
Chapter 9: Sessions
Click Rename. The Folder window appears. This window is similar to the New Folder window shown in Figure 9-5.
Edit the name and description of the folder in the Folder Name and Description fields. Click Save Changes. The name of the folder is changed in its parent folder. To move a folder
Important!
If someone is editing a flowchart in the session you plan to move, that entire flowchart may be lost when you move the session. Please be sure that none of the flowcharts in the session are open for editing when you move the session.
Click Sessions in the left frame. The All Sessions page appears, as shown in Figure 9-1.
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Open the folder that contains the subfolder you want to move. Navigate through the folder structure by clicking a folder name to open it, clicking All Campaigns to return to the All Campaigns page, or clicking Parent Folder to open the folder that contains the currently open folder. An example subfolder is shown in Figure 9-4.
Click the checkbox next to the folder you want to move. Click multiple checkboxes to move multiple folders at once.
Click Move. The Move Items To window appears, as shown in Figure 9-6.
368
Unica Confidential
Sessions
Click the folder into which you want to move the selected subfolder. Navigate through the list by clicking the + sign next to a folder to open it.
You can also double-click the folder to select it and accept the location in one step.
The subfolder and all its contents are moved into the destination folder. To delete a folder You must move or delete any sessions stored within the folder before you can delete it. For more information and instructions, see Moving a session on page 370, and Deleting a session on page 371.
1
Click Sessions in the left frame. The All Sessions page appears, as shown in Figure 9-1.
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Open the folder that contains the subfolder you want to delete.
Version 6.4
Unica Confidential
369
Chapter 9: Sessions
Navigate through the folder structure by clicking a folder name to open it, clicking All Sessons to return to the All Sessions page, or clicking Parent Folder to open the folder that contains the currently open folder. An example folder is shown in Figure 9-4.
3
Click the checkbox next to the folder you want to delete. Click multiple checkboxes to delete multiple folders at once.
4 5
Click Delete Selected. Click OK on the confirmation window. The folder and all its empty subfolders are deleted. If your user name has permission to delete a folder, Affinium Campaign allows you to delete any of subfolders within that folder.
Moving a session
Important!
If someone is editing a flowchart in the session you plan to move, that entire flowchart may be lost when you move the session. Please be sure that none of the flowcharts in the session are open for editing when you move the session.
To move a session
1
Click Sessions in the left frame. The All Sessions page appears, as shown in Figure 9-1.
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Open the folder that contains the session you want to move. Navigate through the folder structure by clicking a folder name to open it, clicking All Sessions to return to the All Sessions page, or clicking Parent Folder to open the folder that contains the currently open folder. An example folder is shown in Figure 9-4.
370
Unica Confidential
Sessions
Click the checkbox next to the session you want to move. Click multiple checkboxes to move multiple sessions at once.
Click Move. The Move Items To window appears, as shown in Figure 9-6.
Click the folder where you want to move the session. Navigate through the list by clicking the + sign next to a folder to open it.
You can also double-click the folder to select it and accept the location in one step.
Deleting a session
When you delete a session, the session and all flowchart files are deleted. Contact and response history information is retained. If there are portions of your session you want to store for reuse, you can save them as a stored object. For more information, see Sessions on page 358.
1
Click Sessions in the left frame. The All Sessions page appears.
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Open the folder that contains the session you want to delete. Navigate through the folder structure by clicking a folder name to open it, clicking All Sessions to return to the All Sessions page, or clicking Parent Folder to open the folder that contains the currently open folder. An example subfolder is shown in Figure 9-4.
Version 6.4
Unica Confidential
371
Chapter 9: Sessions
Click Delete Selected. Click OK on the confirmation window. The session is deleted.
Strategic segments
A strategic segment is a globally persistent list of IDs. Campaign supports multiple strategic segments, and the ID list that is created for each strategic segment and audience level is stored in the Campaign system tables. You can assign an unlimited number of strategic segments to a campaign, as described in Associating strategic segments with a campaign on page 69. Strategic segments are often used in cubes. A cube can be created from any list of IDs, but it is more powerful if it is based on a strategic segment, since cubes based on strategic segments are global and can be analyzed by the various segment reports. See Cubes on page 392 and Dimension hierarchies on page 385 for more information. Before you create a strategic segment, you should do the following:
Determine how your strategic segments will be organized, the folder hierarchy and naming conventions you will use. Determine exactly what strategic segments are important to you. Determine the logic behind your strategic segments. Identify the relationship between different strategic segments. Identify the audience levels appropriate to your strategic segments. Determine how often the strategic segments should be refreshed. Determine what level of detail is defined in each strategic segment. For example, should a segment include all suppressions? Determine if you want to keep historical strategic segments in an archive folder.
372
Unica Confidential
Strategic segments
Create a session as described in Creating a session on page 358, or open an existing session for editing, as described in Editing a session on page 363. Build a flowchart using the Create Seg process. Figure 9-7 shows an example session flowchart designed to create strategic segments.
Figure 9-7 Select Processes in a Session Flowchart
The example flowchart begins with two Select processes. The Universe Select process selects all records from the salary field of a mapped table in a datamart. The OptOuts Select process selects all records from the same datamart that have been classified as opt-outs and need to be removed from the total list of IDs.
Version 6.4
Unica Confidential
373
Chapter 9: Sessions
The customer IDs from these initial Select processes are then passed to a Merge process which eliminates the OptOut IDs. The remaining Eligible IDs are passed to a Segment process where they are divided into three discrete groups of IDs. The three groups of IDs then are passed to a Create Seg process where they are turned into globally persistent strategic segments, thus completing the flowchart.
3
Click Save and Return when you are finished creating your flowchart. Affinium Campaign saves the flowchart and displays the read-only view of the flowchart. The strategic segments are listed on the All Segments page and are available for use in campaigns.
Click Segments in the left frame. The All Segments page appears, listing all of the strategic segments stored in Campaign, as shown in Figure 9-8.
374
Unica Confidential
Strategic segments
Navigate through the folder structure on the left side of the page to find the segment you want. Click the name of the segment you want to view. The right side of the page displays the segments summary information, as shown in Figure 9-9. Table 9-2 describes the information displayed.
Version 6.4
Unica Confidential
375
Chapter 9: Sessions
Element
Description Source Flowchart Audience Level Current Count Used in the Following Campaigns 4
Description
The description provided in the Create Seg process The name of the flowchart where the segment was defined The specified audience level. The number of IDs in this segment A list of all the campaigns that use the segment with links to those campaigns
Click the name listed in the Source Flowchart section. The segments flowchart opens. To view a strategic segment from its session See Viewing a session on page 360.
376
Unica Confidential
Strategic segments
From either the Home page or the All Segments page, search for the segment you want to view. The Search Results page appears. For information and instructions, see Searching for objects in Affinium Campaign on page 59.
Click the name of the segment you want to view. The segments summary page appears, as shown in Figure 9-9.
Click the name listed in the Source Flowchart section. The segments flowchart opens. To view a strategic segment from the Campaign summary page
Go to the summary page of any campaign that uses the segment you want to view. In the Segments and Offers > Relevant Segments section, click the name of the segment. The segments summary page appears, as shown in Figure 9-9.
Click the name listed in the Source Flowchart section. The segments flowchart opens.
Version 6.4
Unica Confidential
377
Chapter 9: Sessions
Navigate through the folder structure on the left side of the page to find the segment you want. Click the segment to select it. The right side of the page displays the segments summary information, as shown in Figure 9-9. Click Edit Summary. The segment name and description appear in editable fields, as shown in Figure 9-10.
Figure 9-10 Edit segment summary page
3 4
6 7
Edit the name and description as desired. Click Save Changes. Your changes are saved and the segments summary page appears. Your changes are reflected in the Name and Description fields of the Define Segments > Edit Segment window of the Create Seg process box.
378
Unica Confidential
Strategic segments
Click Segments in the left frame. The All Segments page appears, as shown in Figure 9-8.
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Click the folder where you want to add the subfolder. Navigate through the folder structure by clicking a folder name to open it, clicking All Segments to return to the All Segments page, or clicking a folder name to open folders in the tree. An example subfolder is shown in Figure 9-4.
Version 6.4
Unica Confidential
379
Chapter 9: Sessions
Click Add a Subfolder. The New Folder page appears. A completed page is shown in Figure 9-5.
Figure 9-12 New Folder page
380
Unica Confidential
Strategic segments
Click Save Changes. The new subfolder appears in its parent folder. To edit a folders name and description
Click Segments in the left frame. The All Segments page appears, as shown in Figure 9-8.
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Click the folder you want to rename. Navigate through the folder structure by clicking a folder name to open it, clicking All Segments to return to the All Segments page, or clicking a folder name to open folders in the tree.
Click Rename. The Folder window appears. This window is similar to the New Folder window shown in Figure 9-5.
Edit the name and description of the folder in the Folder Name and Description fields. Click Save Changes. The name of the folder is changed. To move a folder
Important!
If someone is editing the source flowchart for any segment you plan to move, that entire flowchart may be lost when you move the segment. Make sure none of the source flowcharts are open for editing when you move the subfolder.
Click Segments in the left frame. The All Segments page appears, as shown in Figure 9-8.
Version 6.4
Unica Confidential
381
Chapter 9: Sessions
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Open the folder that contains the subfolder you want to move. Navigate through the folder structure by clicking a folder name to open it, clicking All Segments to return to the All Segments page, or clicking a folder name to open folders in the tree.
Click the checkbox next to the folder you want to move. Click multiple checkboxes to move multiple folders at once.
Click Move. The Move Items To window appears, as shown in Figure 9-13.
Figure 9-13 Destination folder selected on the Move Items To window
Click the folder into which you want to move the selected subfolder. Navigate through the list by clicking the + sign next to a folder to open it.
You can also double-click the folder to select it and accept the location in one step.
The subfolder and all its contents are moved into the destination folder.
382
Unica Confidential
Strategic segments
To delete a folder You must move or delete any segments stored within the folder before you can delete it. For more information and instructions, see Moving a segment on page 383, and Deleting a segment on page 384.
1
Click Segments in the left frame. The All Segments page appears, as shown in Figure 9-8.
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Open the folder that contains the subfolder you want to delete. Navigate through the folder structure by clicking a folder name to open it, clicking All Segments to return to the All Segments page, or clicking a folder name to open folders in the tree.
Click the checkbox next to the folder you want to delete. Click multiple checkboxes to delete multiple folders at once.
4 5
Click Delete Selected. Click OK on the confirmation window. The folder and all its empty subfolders are deleted. If your user name has permission to delete a folder, Affinium Campaign allows you to delete any of subfolders within that folder.
Moving a segment
Important!
If someone is editing the source flowchart for the segment you plan to move, that entire flowchart may be lost when you move the segment. Please be sure that none of the source flowcharts are open for editing when you move the subfolder.
To move a segment
1
Version 6.4
Unica Confidential
Chapter 9: Sessions
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Open the folder that contains the segment you want to move. Navigate through the folder structure by clicking a folder name to open it, clicking All Segments to return to the All Segments page, or clicking a folder name to open folders in the tree.
Click the checkbox next to the segment you want to move. Click multiple checkboxes to move multiple segment at once.
Click Move. The Move Items To window appears, as shown in Figure 9-13.
Click the folder where you want to move the session. Navigate through the list by clicking the + sign next to a folder to open it.
You can also double-click the folder to select it and accept the location in one step.
Deleting a segment
Use the following procedure to delete a segment. To delete a segment
1
Click segment in the left frame. The All Segments page appears.
384
Unica Confidential
Dimension hierarchies
Note
You can Shift+click any link in Affinium Campaign to open the content in a new browser window.
Open the folder that contains the segment you want to delete. Navigate through the folder structure by clicking a folder name to open it, clicking All Segments to return to the All Segments page, or clicking a folder name to open folders in the tree.
Click the checkbox next to the segment you want to delete. Click multiple checkboxes to delete multiple segment at once.
4 5
Click Delete Selected. Click OK on the confirmation window. The segment is deleted.
Note
If there are still active flowcharts that contain the segment, the segment may be re-created when those flowcharts are run. If a flowchart containing the segment was open for editing when you deleted the segment, it will also be re-created.
Dimension hierarchies
A dimension hierarchy is a set of SQL selection queries that can be applied to any list of IDs. Like strategic segments, dimension hierarchies can be made available globally in a Select process or used as the basis for constructing cubes. For more information on creating a cube, see Cube on page 155. Among the most commonly specified dimensions are time, geography, product, department, and distribution channel. However, you can create any kind of dimension that best relates to your business or campaign. As the building blocks of cubes, dimensions become the basis for a variety of reports (total sales across all products at increasing aggregation levels, crosstabular analysis of expenses versus sales by geography, and so on). Dimensions are not limited to a single cube; they can be used in many cubes
Version 6.4
Unica Confidential
385
Chapter 9: Sessions
A dimension hierarchy is made up of various levels, which in turn are comprised of dimension elements, or elements for short. Campaign supports dimensions that are comprised of an infinite number of levels and elements, as well as:
Data points built as input to customer analytic reporting and visual selection Roll ups into unlimited number of categories to support drill-down capability. (Dimensions must roll up cleanly across boundaries, so elements must be mutually exclusive and not overlap.)
The following two examples illustrate a basic dimension hierarchy that would be created in your datamart and then mapped into Campaign.
Example
Age Dimension Hierarchy Lowest level: (21-25), (26-30), (31-35), (36-45), (45-59), (60+) Rollups: Young (18-35), Middle (35-59), Older (60+)
Example
Income Dimension Hierarchy Lowest level: >$100,00, $80,000 - $100,00, $60,000 - $80,000, $40,000 $60,000 Rollups: High (> $100,000), Middle ($60,000 $100,000), Low (< $60,000) To use dimensions in Campaign, you must do the following:
Define and create a hierarchical dimension in a table or delimited flat file in your data mart Map this hierarchical dimension table or flat file to a dimension in Campaign A hierarchical dimension is created in the data mart either by the Campaign administrator or by a UNICA consulting team, and is an operation external to Campaign. Also note that the lowest level of the hierarchical dimension must use either raw SQL, a pure Affinium
Note
386
Unica Confidential
Dimension hierarchies
Expression (no custom macros, ss, or derived fields) to define the individual elements. When this hierarchical dimension is then mapped into Campaign, Campaign executes this code to perform the various roll-ups. To map a hierarchical dimension to a Campaign dimension
Note
The following instructions assume that a hierarchical dimension already exists in your data mart.
Access the Dimension Hierarchies window from one of the following places:
The Admin->Dimension Hierarchies menu in a flowchart The Administration->Manage Dimension Hierarchies link. Since in almost all cases dimensions will be used to create cubes, we recommend that you create dimensions from a flowchart in the Sessions area of the application.
Note
Version 6.4
Unica Confidential
387
Chapter 9: Sessions
Click New Dimension. The Edit Dimension window appears, as shown in Figure 9-15.
388
Unica Confidential
Dimension hierarchies
Enter the following information about the dimension you are creating:
The name of the new dimension A description of the dimension for future reference. The number of levels in the dimension (which should in most cases correspond to the hierarchical levels in the hierarchical dimension in the data mart which you are mapping this Affinium dimension to). If you are using this dimension as the basis for a cube, ensure that the Elements are Mutually Exclusive check box is checked (Campaign checks this option by default). Otherwise, you will receive an error when you use this dimension to create a cube, since the values in elements cannot overlap in a cube.
Click Map Table. The Specify Mapping window appears, as shown in Figure 9-16.
Version 6.4
Unica Confidential
389
Chapter 9: Sessions
If you are mapping the Affinium dimension to an existing file (default). If you are mapping the Affinium dimension to a table in a database.
When you have finished mapping the Affinium dimension, the Edit Dimension window appears with the dimension information for the new dimension, as shown in Figure 9-17.
390
Unica Confidential
Dimension hierarchies
Click OK. The Dimensions window appears again with the newly mapped dimension visible.
(Optional but recommended) You can store a dimension hierarchy by clicking Save, as shown in Figure 9-14. Stored dimension hierarchies like other stored objects are available for future use and do not have to be recreated. To update a dimension hierarchy Campaign does not support automatic updates of dimension hierarchies. If the underlying data changes, you must bring up the Dimensions window and then click Update All to update all dimensions. To update individual dimensions, highlight the dimensions with MB1, then click the Update button.
Version 6.4
Unica Confidential
391
Chapter 9: Sessions
Note
Since cubes are comprised of dimensions which are based on strategic segments, dimensions must be updated whenever strategic segments are updated.
Access the Dimension Hierarchies window from one of the following places:
The Admin->Dimension Hierarchies menu in a flowchart. The Administration->Manage Dimension Hierarchies link.
Highlight the dimension hierarchies that you want to load and click Load.
Cubes
A cube is the simultaneous segmentation of a list of IDs (most often a strategic segment) by the queries provided by a number of dimension hierarchies. After the cube is created, you can view segment cross-tab reports that drill into two dimensions of the cube at any given time. Before you can create a cube, you must perform the following preliminary tasks:
Create a strategic segment For more information, see Strategic segments on page 372. Create dimensions that are based on the strategic segment For more information, see Dimension hierarchies on page 385.
Cube metrics can be defined as any Campaign expression with the following restrictions:
You can specify an unlimited number of additional NUMERIC metrics and Campaign will calculate min, max, sum, average for them. Selected metrics can be derived fields or persistent derived fields. The aggregation function on cell count (min, max, avg, % of total no, etc.) is calculated automatically.
392
Unica Confidential
Cubes
The aggregation function on an attribute value (for example, avg(age) ) automatically calculates min, max, sum, and average. Expressions that contain multiple attribute values (for example, (attribute1 + attribute2) ) are supported in derived fields. The Cube process supports derived fields and persistent derived fields. Groupby expressions (for example, (groupby_where(ID, balance, avg, balance, (trxn_date > reference_date))) ) are supported in derived fields. Expressions involving user variables (defined in same flowchart as cube process AND exposed to Affinium Campaign Collaborate) are supported in derived and persistent derived fields. (For more information about Affinium Campaign Collaborate, see the Affinium Campaign Collaborate Users Guide.) Expressions that use raw SQL are supported in a derived field that uses a raw SQL custom macro Expressions that use a custom macro are supported in a derived field.
Although Cubes are comprised of up to three dimensions, metrics can be displayed for only two dimensions at a time. The undisplayed third dimension is still computed and stored on the server, but is not used in visual selection/reporting for that particular report. Cubes can be built on cells as well as segments (which, for example, can be created at the transaction level). However, if a cube is built on a cell, the cube is available only in that flowchart. We recommend that you base cubes on strategic segments. Unless your tables are normalized, defining dimensions with a many-tomany relationship with the audience level could produce unexpected results. The cube algorithm used by Campaign relies on normalized tables. Before you select and build a cube, normalize data by rolling it up (to the customer level through a data prep session for example). If you build a cube on non-normalized dimensions, the sum counts will be wrong in the crosstab reports, owing to the way that Campaign processes the dimension IDs. If you must use nonnormalized dimensions, we recommend that you build cubes with only two dimensions and that you use transactions as the lowest
Important!
Version 6.4
Unica Confidential
393
Chapter 9: Sessions
level metric of the non-normalized dimensions, rather than customer IDs, since the transaction sum will be correct.
When creating a cube dimension, you must give the dimension a name, audience level, and a table to correspond to the dimension. Later, when working in a session or a campaign flowchart, you map this dimension the same as if you were mapping a database table. For more information, see Dimension hierarchies on page 385. Cubes should be built when users are not accessing them, typically after business hours and on weekends.
394
Unica Confidential
10 REPORTS
This chapter provides information about working with reports in Affinium Campaign. This chapter includes the following key topics: Overview Working with reports Accessing reports Generating reports for a campaign Generating reports from the Analytics Home page Bookmarking reports Exporting and printing reports Customizing your reports Organizational reports Performance/profitability reports
Unica Confidential
395
Overview
Affinium Campaign supports three general types of reports:
Organizational reports track the relationships and status of campaigns and their various components (offers, channels, and segments). For more details, refer to Organizational reports on page 403. Performance/profitability reports track performance and profitability over time as they pertain to campaigns, offers, and channels. For more details, refer to Performance/profitability reports on page 438. Cell reports track the information to the specific cells used in a flowchart. For more details, refer to Cell reports on page 455.
All reports are pre-defined and customizable. For each report, you can specify the items to include and the informational columns to display. You can use reports to track the performance of individual campaigns or compare the performance of different campaigns and offers (Campaign Summary Report, Campaign/Offer Performance Over Time), chart channel access (Contact Channel Utilization over Time), see when campaigns are executing or planning to execute (Calendar of Campaigns), and so on.
Note
The information that the Affinium Campaign reports are based on is precalculated and stored in system tables, which greatly enhances performance: when you generate a report, you do not have to wait while the server performs time-consuming calculations.
The web server maintains context, including the list of campaigns selected for generating a report. If you copy the browser, both browser instances will be sharing the same session. If you then view reports from both instances of the browser, they overwrite the current selections. Clicking on the bookmarking link on either of the reports would store the data for the latest report. Edit and Export Links bring the data from the latest report.
396
Unica Confidential
In cases where a date range greater than seven days is specified for a weekly breakdown or weekly summary report, the report is generated with the last seven days in the range.
Accessing reports Generating reports for a campaign Generating reports from the Analytics Home page Bookmarking reports Exporting and printing reports Customizing your reports
Accessing reports
Reports are accessible from several sections of Affinium Campaign:
The Analysis link on the navigation pane this link opens the Analytics Home page, which displays your bookmarked reports and all available Organizational and Performance/Profitability reports in the current instance of Affinium Campaign. These are grouped by Campaign, Offer, Channel and Segment. The Analysis tab of a campaign displays links to reports for an individual campaign. You select the type of report to view from the Report Type dropdown list at the top right of the page. A flowchart page in Edit mode The Reports link at the top of the page opens cell reports for the flowchart. Your Home page if you have bookmarked reports, these are accessible from the My Bookmarked Reports section of your Home page.
Version 6.4
Unica Confidential
397
Click the Campaigns link on the navigation pane. You see the All Campaigns page displaying the list of campaigns.
Select the campaign for which you want to generate a report. The campaign is opened at the Campaign Summary page.
Click the Analysis tab at the top of the page. The Campaign Flowchart Status Summary report for the campaign opens, as shown in Figure 10-1. The report is generated. For more details about the Flowchart Status Summary Report, including possible flowchart statuses, refer to Flowchart Status Summary Report on page 399.
Figure 10-1 Analysis tab - Campaign Flowchart Status Summary report
398
Unica Confidential
Click the Campaigns link on the navigation pane. You see the All Campaigns page displaying the list of campaigns.
Select the campaign for which you want to generate a report. The campaign is opened at the Campaign Summary page.
Click the Analysis tab at the top of the page. The Campaign Flowchart Status Summary report for the campaign opens by default. From the Report Type drop down list, select the Performance/Profitability report that you want to generate for the campaign. Available report types from the drop-down list are:
Campaign Performance Over Time Campaign Detailed Response Summary Campaign Financial Summary
For more details about these reports, refer to Performance/profitability reports on page 438, Performance summary reports on page 441 and Performance over time reports on page 449.
Run Succeeded the flowchart ran successfully without errors. Run Failed one or more errors were encountered during the flowchart run. The run was not completed. Running the flowchart is still running.
Version 6.4
Unica Confidential
399
Run Pending the flowchart is waiting for a trigger, event, or scheduled time to run. Run Paused the flowchart was paused by a user. Inactive the flowchart has never been run.
For details about generating this report for a campaign, refer to To generate the flowchart status summary report for a campaign on page 398.
Bookmarking reports
You can bookmark any report that you generate in Affinium Campaign. When you bookmark a report, it is added to the Bookmarked Reports section on the Analytics Home page, and to the My Bookmarked Reports section on your individual Home page. Bookmarked reports store the parameters needed to generate the report. Clicking a bookmarked report re-generates the report with the stored parameters, ensuring that the information in the report contains the most recent data. To bookmark a report
1 2
Generate the report. Click the Bookmark link at the top of the report page. The Add Bookmark window appears, as shown in Figure 10-2.
400
Unica Confidential
3 4
Enter a name for the report that you are bookmarking. Click Save Changes. The report is added to the Bookmarked Reports section on the Analytics Home page, and to the My Bookmarked Reports section on your Home page. To remove a bookmarked report
1 2 3
Click Analysis to open your Analytics Home page. Under Bookmarked Reports, click Remove next to the report you want to remove. Click OK on the confirmation window that appears. The report is removed from the Analytics Home page as well as the Analysis section of the Home page.
Note
If you accidentally removed a bookmarked report, you can always regenerate it.
Version 6.4
Unica Confidential
401
online help manual. These options are presented as links on the top of your window. Table 10-1 provides details about these options.
Table 10-1 Common options on reports
Description
Opens the Report Parameters window (Figure 10-5), where you can alter the items that you want to report on. Exports the information on your report window to a spreadsheet. Opens a browser that displays the report information. Select the print icon to print your report. Launches an online help manual to assist you in working with Affinium Campaign.
User defined fields are created from entries in the UA_Contact History and UA_ Response History tables. In the Campaign Performance Over Time and the Offer Performance Over Time reports, only numeric fields defined as type int in the UA_Contact History and UA_ Response
402
Unica Confidential
Organizational reports
History tables can be displayed as a user defined field in the report; numeric fields of type bigint will not be displayed.
Organizational reports
Organizational reports display general information about one or more campaigns and their associated components (offers, channels, segments, and so on). You can, for example, run a report that shows all the offers associated with specified campaigns over a specified time (Campaign Offer Listings). Or you can generate an inverse report that shows all the campaigns that use specified offers over a specified time (Offer Campaign Listings). There are four types of Organizational reports, which are discussed in the following sections:
Summary report
The Campaign Summary report, shown in Figure 10-4, provides a high-level overview of all campaigns that have been created. Each entry has a link to the particular campaign.
Note
If you click on a campaign name link, the selected campaigns summary page opens in the current browser window. Click the Back button in your browser window to return to the Campaign Summary report.
Version 6.4
Unica Confidential
403
To open the campaigns summary page in a new browser window, use Shift+Click on the campaign name. The selected campaigns summary page opens in a new browser window. See Table 10-2 for an explanation of the various sections on the Campaign Summary report.
Figure 10-4 Campaign Summary Report
404
Unica Confidential
Organizational reports
Description
Links to the Analytics Home page. Allows you to bookmark the current report. See Bookmarking reports below for more information.
Lists the names of all campaigns created in Affinium Campaign. Click on a campaign name to be taken to the Summary tab of that campaign. The unique code assigned to the campaign at campaign creation. (The code is assigned by Affinium Campaign, or by a custom campaign code generator written by the administrator). The campaign objective, as defined at campaign creation. The date the campaign was last run. The campaign initiative (e.g., Acquisition, Loyalty, Retention, XSell/Upsell). Campaign initiatives are defined by your system administrator during configuration of Affinium Campaign. The date the campaign begins, as defined at campaign creation. The date the campaign ends, as defined at campaign creation. The date the campaign was created. Additional fields that were created during the campaign design.
Campaign Code Objectives Last Run Date Initiative Start Date End Date Create Date User-defined fields, if any
To generate a summary report To generate the Campaign Summary report, simply click on the Campaign Summary Report link on the Analytics Home page. The report is displayed.
Version 6.4
Unica Confidential
405
Listings reports
Listings reports make up the majority of organizational reports. In a listing report, Affinium Campaign allows you to show the association of one object or group of objects with another. For example, in the Campaign Offer Listings report, you select one or more campaigns and a time frame. Affinium Campaign then generates a report that lists all the offers associated with the selected campaign(s). The Offer Campaign Listings report does just the opposite. It generates a report that lists all the campaigns that are associated with a specified offer or offers for a specified period of time. Affinium Campaign supports the following listings reports:
Campaign Offer Listings Campaign Segment Listings Campaign Product Listings Campaign Channel Listings Offer Campaign Listings Offer Product Listings Offer Channel Listings Channel Campaign Listings Channel Offer Listings Segment Campaign Listings
To ensure that background colors print out correctly in the reports, enable the following in Internet Explorer: Tools->Internet Options->Advanced->Printing->Print background colors and images.
Click on the link for the report you want to create. (For this example, the Campaign Offer Listings report is used.)
406
Unica Confidential
Organizational reports
From the Folders section, select one or more item (campaigns, offers, channels or segments) from the list by highlighting the item and clicking on the right arrows. In a folder hierarchy, if you select the top-level folder, the sub-folders are automatically included. For example, if you select an offer folder, all offers contained in that group are selected too. All versions of the offer are also automatically selected. Folder selection for campaigns is also supported.
Click the Generate the Report button. The following sections describe the various Organizational listing reports.
Version 6.4
Unica Confidential
407
For example, Figure 10-6 shows all offers associated with the Y_Smoke test campaign. The offers are presented as links to the corresponding offer page.
Figure 10-6 Campaign Offer Listings report
408
Unica Confidential
Organizational reports
Section Links Analytics Home Bookmark Columns Campaign/Offer Name Channel Effective Date Expiration Date Offer Code1, Offer Code2, etc. Related Reports
Description
Links to the Analytics Home page. Allows you to bookmark the current report. See Bookmarking reports below for more information.
The campaigns you selected and the names of any offers associated with the campaigns. Click the arrow to expand or collapse the list. The means by which the audience will be contacted (DirectMkt, TeleMkt, etc.), as defined at offer creation. The date the offer became/becomes effective, as defined at offer creation. The date the offer expires, as defined at offer creation. Offer codes as entered/automatically generated during offer creation. Other reports that you may find helpful in your review of the Campaign Offer Listings report.
Version 6.4
Unica Confidential
409
Section Links Analytics Home Bookmark Columns Campaign/Segment Name Audience Last Run Date Count
Description
Links to the Analytics Home page. Allows you to bookmark the current report. See Bookmarking reports below for more information.
The campaigns you selected and the names of any segments associated with the campaigns. Click the arrow to expand or collapse the list. The audience level at which the segment was defined. The date that the Segment process last ran in production. This date does not reflect dates associated with a test run, as test runs do not update the Segment process. The size of the segment.
410
Unica Confidential
Organizational reports
Version 6.4
Unica Confidential
411
Description
Links to the Analytics Home page. Allows you to bookmark the current report. See Bookmarking reports below for more information.
The campaigns you selected and the names of any products associated with offers assigned to the campaigns. Click the arrow to expand or collapse the list.
412
Unica Confidential
Organizational reports
Description
Links to the Analytics Home page. Allows you to bookmark the current report. See Bookmarking reports below for more information.
The campaigns you selected and the types of contact channels associated with offers assigned to the campaigns. Click the arrow to expand or collapse the list. The description of the Campaign.
Version 6.4
Unica Confidential
413
414
Unica Confidential
Organizational reports
Section Links Analytics Home Bookmark Columns Offer/Campaign Name Campaign Code
Description
Links to the Analytics Home page. Allows you to bookmark the current report. See Bookmarking reports below for more information.
The offers that you selected and the names of the campaigns to which the offers belong. Click the arrow to expand or collapse the list. The unique code assigned to the campaign at campaign creation. (The code is assigned by Affinium Campaign, or by a custom campaign code generated or written by the administrator). The campaign initiative (e.g., Acquisition, Loyalty, Retention, XSell/Upsell) chosen at campaign creation. Campaign initiatives are defined by your system administrator during configuration of Affinium Campaign. The date the campaign begins, as defined at campaign creation. The date the campaign ends, as defined at campaign creation. The date the campaign (to which the offer belongs) to was last run. The user name of the campaign owner.
Version 6.4
Unica Confidential
415
Description
Links to the Analytics Home page. Allows you to bookmark the current report. See Bookmarking reports below for more information.
The offers you selected and the names of any products associated with them. Click the arrow to expand or collapse the list.
416
Unica Confidential
Organizational reports
Version 6.4
Unica Confidential
417
Description
Links to the Analytics Home page. Allows you to bookmark the current report. See Bookmarking reports below for more information.
The offers you selected and the names of the channels by which customers or prospects will be contacted. Click the arrow to expand or collapse the list. The offer description.
418
Unica Confidential
Organizational reports
Version 6.4
Unica Confidential
419
Description
Links to the Analytics Home page. Allows you to bookmark the current report. See Bookmarking reports below for more information.
The channel(s) and list of campaigns that use such channel(s) to communicate with contacts. Click the arrow to expand or collapse the list. Click on the campaign name to be taken to the Summary tab for that campaign. The unique code assigned to the campaign at campaign creation. (The code is assigned by Affinium Campaign, or by a custom campaign code generator written by the administrator). The campaign initiative (e.g., Acquisition, Loyalty, Retention, XSell/Upsell) chosen at campaign creation. Campaign initiatives are defined by your system administrator during configuration of Affinium Campaign. The date the campaign begins, as defined at campaign creation. The date the campaign ends, as defined at campaign creation. The last run date of the most recently run flowchart in the campaign. The user name of the campaign owner.
Campaign Code
420
Unica Confidential
Organizational reports
Version 6.4
Unica Confidential
421
Description
Links to the Analytics Home page. Allows you to bookmark the current report. See Bookmarking reports below for more information.
The communication channel(s) defined for this campaign and the offers that are sent out via these channels. Click the arrow to expand or collapse the list. Click on the offer name to be taken to the Summary tab for that offer. The means by which the audience will be contacted (DirectMkt, TeleMkt, email, etc.), as defined at offer creation. The date the offer became/becomes effective, as defined at offer creation. The date the offer expires, as defined at offer creation. Offer code(s) as entered/automatically generated during offer creation.
422
Unica Confidential
Organizational reports
Version 6.4
Unica Confidential
423
Description
Links to the Analytics Home page. Allows you to bookmark the current report. See Bookmarking reports below for more information.
The communication channel(s) defined for this campaign and the offers that are sent out via these channels. Click the arrow to expand or collapse the list. Click on the offer name to be taken to the Summary tab for that offer. The means by which the audience will be contacted (DirectMkt, TeleMkt, email, etc.), as defined at offer-creation. The date the offer became/becomes effective, as defined at offercreation. The date the offer expires, as defined at offer creation.
Calendar reports
Calendar reports allow you to view campaign start and end dates as well as offer effective dates in the form of entries on a calendar. The name of a campaign or offer is displayed in the day slot on the calendar that corresponds to the start, end, or effective date, as applies. Affinium Campaign supports the following calendar reports in Julian format:
To generate a calendar report To generate a calendar report, simply click on the applicable calendar link (Calendar of Campaigns or Calendar of Offers on the Analytics Home page. The calendar report appears. 424
Unica Confidential Affinium Campaign Users Guide
Organizational reports
Calendar entries on the Calendar of Campaigns report are preceded by an S, to signify the campaign start date or by an E, to signify the campaign end date. Calendar entries on the Calendar of Offers report are preceded by an E, to signify the offer effective date. The expiration dates for offers are dynamic, and are therefore not displayed on the calendar. The Calendar of Offers report does not display offer effective dates from offer templates. It does, of course, display offer effective dates from offer instances created from templates. The entries are links to the summary page for that campaign or offer. By default, the calendar reports are displayed in month view (as opposed to day, week, or 2-week view). The reports are opened to the current month. When you switch from one view to another, Affinium Campaign displays the new view in the current month. If, for example, on July 15, you are looking at campaigns or offers in the 2-week view for the month of December, and you switch to the day view, the day view opens by default to July 15. The current day is enclosed in a green box in both the smaller calendar in the left pane and in the main calendar (when displayed in month view).
The Calendar of Campaigns report is shown in Figure 10-16 and Figure 10-17 shows a Calendar of Offers report.
Version 6.4
Unica Confidential
425
426
Unica Confidential
Organizational reports
Description
(The small calendar displayed in the left pane.) When you click on a particular day on the smaller calendar, the main calendar displays the day view for the day you have chosen even if you were previously in week, 2-week, or month view. To move both calendars back or forward by one month, click the back and forward arrows respectively on the smaller calendar. The main calendar displays the month view for the month you have chosen, even if you were previously in day, week, or 2-week view in main calendar. The current day is enclosed in a green box.
Links Previous Day/Week/Two Weeks/Month Next Day/Week/Two Weeks/Month Tabs Day Week Two-week Month
Displays the calendar in day view. Displays the calendar in week view. Displays the calendar in 2-week view. Displays the calendar in month view. Link to the previous day, week, two weeks, or month, depending on which view you are in. Whatever view you were in is preserved when you move to the previous unit of time. Link to the next day, week, two weeks, or month, depending on which view you are in. Whatever view you were in is preserved when you move to the next unit of time.
Version 6.4
Unica Confidential
427
customer population (from a cell or strategic segment) along any two desired dimensions.
Note
Only cubes that are built on strategic segments are available through the segment analysis reports; cubes that are built within a flowchart are only accessible through that flowchart.
You can, for example, analyze customer segments from demographic and behavioral or behavioral and financial perspectives that are part of a threedimensional cube (demographic/behavioral/financial). For more information on strategic segments and cubes, see Create Seg on page 153 and Cube on page 155. Affinium Campaign supports the following segment analysis reports:
Segment Crosstab Analysis report Segment Profile Analysis report If the sum counts in these reports are incorrect, see the Affinium Campaign Administrators Guide for information on how to build cubes using non-normalized data.
Note
From the Analysis Home page, click Segment Crosstab Analysis. The Report Parameters window appears, as shown in Figure 10-18.
428
Unica Confidential
Select a strategic segment from the list of list of available segments. If the segment is associated with a cube, its dimensions will appear in the Available Crosstab Reports field. If you generated a strategic segment in Campaign but did not use it in a cube, the strategic segment will not be listed here. In this example, the Individual Demographics segment from the Individuals directory is selected.
Highlight one of the dimensions that appear in the Available Crosstab Reports field. In this example, Income By Region is selected. Once the report is generated, however, you can view any two dimensions. Click Generate the Report. The Segment Crosstab Analysis Crosstab report is displayed, as shown in Figure 10-19.
Version 6.4
Unica Confidential
429
Open an existing flowchart or create a new flowchart. This flowchart must contain a Cube process based on cells. (You determine whether a cube is based on segments or cells on the Source tab of a Cube process.) For existing flowcharts, click Edit to place the flowchart in edit mode. Right click on the Cube process. Select View Crosstab Reports... The Cell Crosstab Analysis report is displayed in a new window.
Figure 10-19 Segment Crosstab Analysis report
2 3 4
Note
In a Crosstab report, when there are no counts of IDs in a particular intersection, Affinium Campaign displays that count as zero. However, when Affinium Campaign displays min/max/sum/avg of other
430
Unica Confidential
Organizational reports
Description
Links to the Analytics Home page. Click to open Add Bookmark window. Enter a name for the bookmark. The Segment Crosstab Analysis report in its current state (with whichever dimension you have displayed) is saved as a bookmark on the Analytics Home page. Allows you to view the data in either tabular or graphical format.
Report Type
The various dimension pairs that are available to be analyzed in this Segment Crosstab Analysis report. Choose a dimension pair from the list. (For example, in Figure 10-19, the available dimension pairs are Income by Age, Income by Region, and Age by Region.) The first set of arrows allows you to review all dimension pairs; the second set of arrows selects and then generates a new report based on the dimension pairs you have selected. The value of the cells and the value of the Total column. For example, the cells in Figure 10-19 can represent transactions, products, or purchases, according to which option you select. The Total column can represent a count , or the sum, minimum, maximum, or average of the various cell value options. One option in Figure 10-19, for example, would be Num_products_max, which will give the maximum number of products purchased by each dimensions that you have specified. This number is displayed in the Total column. The single arrow allows you to review all cell/total values; with the set of arrows, you select, and then Campaign generates a new report based on the cell/total values you have selected.
Cell Values
Cube Input
(This field exists only in a Crosstab report generated by right clicking on a Cube process based on cells.) The cell that is input into the Cube process.
Version 6.4
Unica Confidential
431
Description
Allows you to filter out dimensions. Allows you to determine the depth to which you want to view a dimension.
Levels
For example, in Figure 10-19, if you choose to view the 18-40 dimension at Level 2 (a greater depth), then that dimension will be broken down into 18-25, 26-30, 31-35, and 36-40.
432
Unica Confidential
Organizational reports
When you filter, the dimension you choose is removed. For example, if you want to filter out the 18-40 dimension (in the left-hand column), simply right click over the 18-40 heading. That dimension is removed from the Segment Crosstab Analysis report, as shown in Figure 10-21.
Version 6.4
Unica Confidential
433
From the Analysis Home page, click Segment Crosstab Analysis. The Report Parameters window appears, as shown in Figure 10-22.
434
Unica Confidential
Select a strategic segment from the list of list of available segments. If the segment is associated with a cube, its dimensions will appear in the Available Profile Reports field. If you generated a strategic segment in Campaign but did not use it in a cube, the strategic segment will not be listed here. In this example, the Individual Demographics segment from the Individuals directory is selected. Highlight the dimension that appears in the Available Profile Reports field, and then click Generate the Report. The Profile report is displayed, as shown in Figure 10-23.
Version 6.4
Unica Confidential
435
436
Unica Confidential
Organizational reports Table 10-15 Information on the Segment Profile Analysis report
Description
Link to the Analytics Home page. Click to open Add Bookmark window. Enter a name for the bookmark. The Segment Profile Analysis report in its current state (with whichever dimension you have displayed) is saved as a bookmark on the Analytics Home page.
Dimension
The various dimensions that are available to be displayed in this Segment Profile Analysis report. (For example, in Figure 10-19, the Individual Age Level 2 dimension is displayed.) The single arrow allows you to review all dimension levels; with the set of arrows, you select, and then Campaign generates a new report based on the dimension level you have selected.
Version 6.4
Unica Confidential
437
Chapter 10: Reports Figure 10-24 Segment Profile Analysis report - levels
Performance/profitability reports
Performance/Profitability reports calculate the return of investment (ROI) over a specified time for campaigns, offers, and offer channels. These reports are tied to the logging that you configure in the contact processes, as well as the contact information that you yourself record in your datamart and that Affinium Campaign accesses through the Response process. To ensure that you are generating the correct reports, you should follow these best practice guidelines:
When configuring a contact process, ensure that contacts are logged to the Contact History and Tracking system tables.
438
Unica Confidential
Performance/profitability reports
When setting up a response tracking flowchart, use a Response process to ensure that responders are logging to the UA_Response History Table and the UA_Response Track system tables. A flowchart must be saved once before its results are visible in any applicable Performance/Profitability report. However, thereafter, reporting results are visible as soon as a flowchart executes.
All the Performance/Profitability reports can be accessed from the Analytics Home page, accessible from the Analysis link in the main navigation frame. A subset of these reports can also be accessed on the Analysis tab of a session or campaign flowchart. Performance/Profitability reports are divided into the following two groups:
Control groups
In Affinium Campaign, control groups can be displayed in several Performance/Profitability reports. Control groups are created in the Segment process. The ability to track control groups is enabled when you assign a control offer tracking instance (control OTI) to an offer in a contact processes. Control groups, then, point to OTIs, not offers or offer versions. (OTIs are offer versions that have been used in a contact process. OTIs roll up into offer versions, which roll up into offer groups.) Control group values have the potential to be greater than 0 only when you have assigned a control OTI to an offer. For more information on creating control groups see Sample on page 209. For more information on OTIs and linking offers see Linking a control to an offer on page 174. To generate performance/profitability reports
1
From the Analytics Home page, click the link for the report you would like to generate. (The Offer Performance Over Time report is used in this example.) The Report Parameters window appears, as shown in Figure 10-25.
Version 6.4
Unica Confidential
439
Select a chart layout from the Select a Chart Layout drop down menu. Use the double arrows to review the various options. Select a time period from the Specify a Time Period drop down menu. If you select Other, an additional dialog box appears from which you can select from a list of the last ten years.
From Select One or More Campaigns choose Select a List or Create a Dynamic Query.
To select from a list, select one or more items from the Folders field. Click on the right arrows to populate the Selected Campaign(s)/Offer(s)/Channel(s) field. In a folder hierarchy, if you select the top-level folder, the sub-folders are automatically included. For example, if you select an offer folder, all offers contained in that group are selected too. All versions of the offer are also automatically selected. Folder selection for campaigns and channels () is also supported.
440
Unica Confidential
Performance/profitability reports
To Create a Dynamic Query, fill in the appropriate sub-fields (such as Owner, Effective Date, Expiration Date, Initiative, etc.)
Campaign Detailed Response Summary Campaign Financial Summary Offer Detailed Response Summary Offer Financial Summary
Version 6.4
Unica Confidential
441
442
Unica Confidential
Performance/profitability reports
Description
Link to the Analytics Home page. Allows you to bookmark the current report. See Bookmarking reports below for more information. Click Show Percentages to show the percentage of contacts that responded to the campaign. If you have the offers displayed for a campaign, the percentages are broken down to reflect the percentages of contacts that responded per offer and associated OTIs. Click Hide Percentages to hide all response percentages.
Show/Hide Percentages
Additional columns may appear if your Affinium Campaign administrator customized the user response types in the UA_UsrResponseType table. For more information, see the Affinium Campaign Administrators Guide.
Version 6.4
Unica Confidential
443
444
Unica Confidential
Performance/profitability reports
Section Links Analytics Home Bookmark Show/Hide Control Groups Columns Totals
Description
Link to the Analytics Home page. Allows you to bookmark the current report. See Bookmarking reports below for more information. Click Show Control Groups to show control group figures. Click Hide Control Group to hide all control group figures.
The totals of the various financial categories. If you have multiple campaigns displayed, the totals reflect the figures of all campaigns. If you have control group information displayed, these totals are calculated as well.
Version 6.4
Unica Confidential
445
446
Unica Confidential
Performance/profitability reports
Description
Link to the Analytics Home page. Allows you to bookmark the current report. See Bookmarking reports below for more information. Click Show Percentages to show the percentage of contacts that responded to the offer. If you have the OTIs displayed for an offer, the percentages are broken down to reflect the percentages of contacts that responded per OTI. Click Hide Percentages to hide all response percentages.
The number of responses to an offer. If you have the OTIs displayed for an offer, the numbers are broken down to reflect the number of OTIs that responded per offer version. The number of prospective clients contacted for the offer. If you are displaying multiple offers, the last cell is the total number contacted for all offers displayed.
Version 6.4
Unica Confidential
447
448
Unica Confidential
Performance/profitability reports
Section Links Analytics Home Bookmark Show/Hide Control Groups Columns Totals
Description
Link to the Analytics Home page. Allows you to bookmark the current report. See Bookmarking reports below for more information. Click Show Control Groups to show control group figures. Click Hide Control Group to hide all control group figures.
The totals of the various financial categories. If you have multiple offers displayed, the totals reflect the figures of all offers. If you have control group information displayed, these totals are calculated as well.
Campaign Performance Over Time Offer Performance Over Time Contact Channel Utilization over Time For contact and response history tables in the Campaign Performance Over Time and the Offer Performance Over Time reports, only numeric fields of type int can be displayed as a user defined fieldin the report; numeric fields of type bigint will not be displayed.
Note
Version 6.4
Unica Confidential
449
You can display offers and OTIs associated with the campaign, as well as control group information for the offer tracking instances associated with a campaign.
Figure 10-30 Campaign Performance Over Time report
450
Unica Confidential
Performance/profitability reports
Section Links Analytics Home Bookmark Show/Hide Control Groups Columns Contact Count Resp. Count
Description
Link to the Analytics Home page. Allows you to bookmark the current report. See Bookmarking reports below for more information. Click Show Control Groups to show control group figures. Click Hide Control Group to hide all control group figures.
The number of prospective clients contacted for the campaign. If you are displaying multiple campaigns, the last cell is the total number contacted for all campaigns displayed. The number of responses to a campaign. If you have the offers/OTIs displayed for a campaign, the numbers are broken down to reflect the number of contacts that responded per offer/OTI. The percentage of contacts that responded to the campaign. If you have the offers/OTIs displayed for a campaign, the rates are broken down to reflect the percentage of contacts that responded per offer/OTI.
Resp. Rate
Version 6.4
Unica Confidential
451
Chapter 10: Reports Figure 10-31 Offer Performance Over Time report
452
Unica Confidential
Performance/profitability reports
Section Links Analytics Home Bookmark Show/Hide Control Groups Columns Contact Count Resp. Count
Description
Link to the Analytics Home page. Allows you to bookmark the current report. See Bookmarking reports below for more information. Click Show Control Groups to show control group figures. Click Hide Control Group to hide all control group figures.
The number of prospective clients contacted for the offer/OTI. If you are displaying multiple campaigns, the last cell is the total number contacted for all campaigns displayed. The number of responses to an offer. If you have the OTIs displayed for an offer, the numbers are broken down to reflect the number of contacts that responded per OTI. The percentage of contacts that responded to the campaign. If you have the OTIs displayed for an offer, the rates are broken down to reflect the percentage of contacts that responded per OTI.
Resp. Rate
Version 6.4
Unica Confidential
453
Chapter 10: Reports Figure 10-32 Contact Utilization Over Time report
454
Unica Confidential
Cell reports
Section Links Analytics Home Bookmark Show/Hide Control Groups Columns Contact Count
Description
Link to the Analytics Home page. Allows you to bookmark the current report. See Bookmarking reports below for more information. Click Show Control Groups to show control group figures. Click Hide Control Group to hide all control group figures..
The number of prospective customers contacted via this contact channel for the offer/OTI. If you are displaying multiple offers/OTIs, the last cell is the total number contacted for all offers/OTIs displayed. The number of responses to an offer/OTI via this contact channel. If you have the OTIs displayed for an offer, the numbers are broken down to reflect the number of contacts that responded via the channel per OTI. The percentage of contacts that responded to the offer/OTI via this contact channel. If you have the OTIs displayed for an offer, the rates are broken down to reflect the percentage of contacts that responded via this channel per OTI.
Resp. Count
Resp. Rate
Cell reports
Cell reports provide a variety of information relating to the individual cells that make up a particular flowchart in a session or campaign. Remember that cells are lists of records. An ID is assigned to each record. For example, one cell used by your flowchart may be called Customer values: medium, which contains records of customers (IDs) that you have estimated to be of value medium. Inside this cell, there may be 10 records, which include a Mrs. Smith with a record ID of 8. This cell may be input to a Select process, and output to a MailList process, which will send the chosen records an offer via mail. All Cell reports can be accessed when viewing a flowchart in edit mode.
Version 6.4
Unica Confidential
455
Cell List Cell Variable Profile Cell Variable Crosstab Cell Contents Cell Waterfall
456
Unica Confidential
Cell reports
Version 6.4
Unica Confidential
457
Section Columns Cell Name Cell ID Audience Status Size Notes Display Cell Last Run
Description
Name of cell (list of IDs) from which the information is pulled. The ID associated with the cell from which the information is pulled. The audience level of the cell. The status of the cell after it was last run. Vaues can be Estimated, Test Run, or Session Run. The number of IDs that belong to the cell. Any notes associated with the cell. Notes are entered in the Notes field on the General tab of a process. Yes or No, as determined in the Notes field on the General tab of a process. If you choose Yes, the cell information is written to the UA_Cells Table. The date the cell was last run.
Open an existing flowchart or create a new flowchart. For pre-existing flowcharts, click Edit to place the flowchart in edit mode. A new flowchart is opened in edit mode. From the top panel, select Reports. The Cell Specific Reports window appears, with the Cell List window displayed by default, as shown in Figure 10-34. (Optional) To toggle the display between Tree View and Table View, click Options. The Report Options window appears, as shown in Figure 10-35. The options are described in Table 10-24.
458
Unica Confidential
Cell reports
Description
View cells in a table format. This option is the default. View cells in a tree view. A tree view simulates a folder hierarchy in Windows.
Version 6.4
Unica Confidential
459
Description
The name of the report. The cell that is being profiled. The variable against which the cell is profiled.
Open an existing flowchart or create a new flowchart. For pre-existing flowcharts, click Edit to place the flowchart in edit mode. A new flowchart is opened in edit mode. From the top panel, select Reports. The Cell Specific Reports window appears.
460
Unica Confidential
Cell reports
Select Cell Variable Profile from the Report to View drop down menu. The Cell Variable Profile window appears, as shown in Figure 10-36. Select a cell from the Cell to Profile drop down menu. Select a variable from the Field profile window. Affinium Campaign then generates a report, as shown in Figure 10-36.
5 6
(Optional) To the display, click Options. The Report Options window appears, as shown in Figure 10-37. The options are described in Table 10-26.
Figure 10-37 Cell Variable Profile - Report Options window
Table 10-26 Options on Report Options window (Cell Variable Profile report)
Description
Change the number of bins displayed. The field values along the horizontal axis are organized into bins. If the number you specify is less than the number of different field values, some fields will be joined in one bin. The default is 25. Click to profile by metadata. For more information on profiling by metadata, see Profiling by Meta Type on page 270. This option is enabled by default.
Profile by metadata
Version 6.4
Unica Confidential
461
Description
Select to view the report as a table. Select to view the report as a plot graph (the default). When viewing a two or three dimensional report, you can right click on the report to access an array of display options. If more than one cell is available for profiling, check to view a second cell. You must then select the second cell to view from the drop down menu. The two cells will be displayed side by side in graphical format. The default is to view a single cell.
462
Unica Confidential
Cell reports
Note
The process from which the cell is generated must be fully configured and must run successfully in order to profile the cell.
Version 6.4
Unica Confidential
463
Description
The name of the report. The cell that you wish to profile. The variable against which the second variable is profiled. Choose the first variable from a list of all variables that belong to the cell being profiled. The variable against which the first variable is profiled. Choose the second variable from a list of all variables that belong to the cell being profiled.
Field 2
Open an existing flowchart or create a new flowchart. For pre-existing flowcharts, click Edit to place the flowchart in edit mode. A new flowchart is opened in edit mode. From the top panel, select Reports. The Cell Specific Reports window appears. Select Cell Variable Crosstab from the Report to View drop down menu. The Cell Variable Crosstab report appears, as shown in Figure 10-38. Select a cell from the Cell drop down menu. From the Field 1 drop down menu, choose a variable to profile. From the Field 2 drop down menu, choose another variable to profile. Affinium Campaign generates the report.
3 4
5 6 7
(Optional) To the display, click Options. The Report Options window appears, as shown in Figure 10-39. The options are described in Table 10-28.
464
Unica Confidential
Cell reports Figure 10-39 Report Options window (Cell Variable Crosstab report)
Table 10-28 Options on Report Options window (Cell Variable Crosstab report)
Description
Change the number of bins displayed. The field values along the horizontal axis are organized into bins. If the number you specify is less than the number of different field values, some fields will be joined in one bin. The default is 10. Click to profile by metadata. For more information on profiling by metadata, see Profiling by Meta Type on page 270. This option is enabled by default. Select to view the report as a table. Select to view the report as a 2-D plot graph (the default). When viewing a two or three dimensional report, you can right click on the report to access an array of display options. Select to view the report as a 3-D plot graph. When viewing a two or three dimensional report, you can right click on the report to access an array of display options. Select the way the cell information is displayed in the X-axis. For certain numeric fields, you can select fields to operate on from the Value Field drop down menu.
Cell 1 Display
Version 6.4
Unica Confidential
465
Description
(For both Cell 1 Display and Cell 2 Display). Add a variable to the existing variable being profiled. This second variable will appear as a box within the box that represents the first variable. If more than one cell is available for profiling, check to view a second cell. You must then select the second cell to view from the drop down menu. The two cells will be displayed side by side in graphical format. The default is to view a single cell. Select the way the cell information is displayed in the Y-axis by choosing a display from the Cell 2 Display drop down menu (same options as the Cell 1 Display drop down menu).
Cell 2 Display
466
Unica Confidential
Cell reports
Description
The name of the report currentlly being profiled. The cell whose contents you want to view.
From a flowchart, click on the View Reports link. The Cell Specific Reports window appears, as shown in Figure 10-34. Select Cell Contents from the Reports to View pull-down menu. The Cell Contents report appears, as shown in Figure 10-40. Select a cell from the Cell To View pull-down menu. To the display, click on the Options button. The Cell Content Report Options window appears, as shown in Figure 10-41.
3 4
Version 6.4
Unica Confidential
467
Change the max number of rows to view. The default is 100. Select fields to view by moving fields from the Available Fields area to the Fields to View area. Elect to skip records with duplicate fields. This is useful if you are using non-normalized tables. This option is disabled by default.
468
Unica Confidential
Cell reports
some IDs are extracted from the merge of Gold.out and Platinum.out, resulting in a number less than the sums of the two cells. Next, the Eligible.out cell is passed to a Segment process called Value Tiers, where Eligible.out is parsed into several different contact channels. The Totals row in the Cell Waterfall report shows us that 10705 IDs were removed from the Gold.out cell. Furthermore, we are provided with the number IDs remaining as well as the percentage of original Gold.out IDs remaining.
Figure 10-42 Cell Waterfall report
Cell Waterfall report
Version 6.4
Unica Confidential
469
470
Unica Confidential
How report values are calculated Table 10-30 Information on the Cell Waterfall report
Section Fields
Report to View
Description
The name of the report. The name of the cell being profiled.
Cell Columns Cell Name Size #IDs Removed % Remain Seg % #IDs (Removal Query) Removal Query
Name of the cell. The number of IDs (records) in the cell. The number of IDs removed from the cell when run through the process. (Start count minus end count.) IDs may be added instead of removed. The percentage of IDs remaining in the cell. The percentage of IDs that were segmented from a Segment process. Number of IDs that were filtered out of the cell. Filter criteria that the process uses to purge IDs from the cell.
Revenue Run Cost Run Expense Net Revenue Gross Revenue Return on Marketing Investment and Incremental ROI
Version 6.4
Unica Confidential
471
Revenue
total_responder_revenue = average_responder_revenue * num_responders; total_non_responder_revenue = average_non_responder_revenue * num_non_responders; total_unreachable_revenue = average_non_responder_revenue * num_unreachables; total_revenue = total_responder_revenue + total_non_responder_revenue + total_unreachable_revenue;
Run Cost
cost_of_goods_sold = total_revenue * (1.0 - average_gross_margin_percentage / 100.0); gross_revenue = total_revenue - cost_of_goods_sold; total_treatment = UnitCost() * num_contacts + fixed_cost/fixed_cost_amortization * num_contacts; total_shipping = shipping_cost_per_contact * num_contacts;
472
Unica Confidential
Run Expense
premium_for_responders = average_premium_per_responder * num_responders; premium_for_non_responders = average_premium_per_non_responder * num_non_responders; premium_for_unreachables = average_premium_per_non_responder * num_unreachables; fixed_cost_amortized = fixed_cost * fixed_cost_amortization_percentage / 100.0; total_list_score_cost = list_cost_per_score * list_size; total_list_contact_cost = list_cost_per_contact * num_contacts;
Net Revenue
total_expense = total_treatment + total_shipping + premium_for_responders + premium_for_non_responders + premium_for_unreachables + fixed_cost_amortized + total_list_score_cost + total_list_contact_cost; net_revenue_after_expenses =
Gross Revenue
gross_revenue = total_revenue - cost_of_goods_sold; net_revenue_after_expenses = gross_revenue - total_expense;
Version 6.4
Unica Confidential
473
474
Unica Confidential
GLOSSARY
A
acquisition models
Acquisition modeling enables you to acquire new customers more costeffectively. When combined with estimates of potential customer value, you can target the most desirable prospects, those who will become highvalue, long-term customers. A structure and process for analyzing a data set. For example, a decision tree is a model for the classification of a data set. Data that result from errors (for example, data entry keying errors) or that represent unusual events. Anomalous data should be examined carefully because it may carry important information. See Application Programming Interface. An Application Programming Interface, or API, is a set of procedures and/or function calls that implement certain features and functions. When a software system features an API, it provides a means by which programs written outside of the system can interface with the system to perform additional functions. Non-linear predictive models that learn through training and resemble biological neural networks in structure. For a customer or prospect, the identifier (ID), name, address, phone number, demographic information, psycho graphic information, or other piece of information typically stored in one field/column in a database or one column in a text file.
Unica Confidential
475
Glossary
attrition/ defection modeling audience
Attrition/defection models enable you to identify customers who are at risk of dropping or switching their service to other providers. The subject of targeting in direct marketing activities. Examples in Consumer marketing are: Customer, Household, and Account. Examples in Business to Business are: Industry, Enterprise, Establishment, Contact, and Account. A stored and reusable method for the selection and treatment of audiences or the act of creating stored definition/method. The act of creating or materializing groups of audience members. Implemented by using Select, Merge, Segment and Sample. A key definition used in counting and selecting members of a target audience. You need audience level defined to use in audience selection. These are defined when mapping a table. Working with audience levels, the act of translating or relating or linking between one audience level and another. Also, the act of deduping or expanding from one audience level to another. An example of this is householding. This is implemented in the Audience process in Affinium Campaign.
audience processing
C
campaign campaign graph campaign management campaign process
A collection of sessions run together to market directly to customers or prospects. (For more, see session.) The representation of a campaigns processes and its connections within Affinium Campaign. The design, planning, management, execution, tracking, and evaluation of campaigns. Action(s) taken in the course of a campaign. Typical processes may include: extracting an initial cell from a database table or tables, applying sampling to generate a test cell from the initial cell, performing a test promotion on the test cell, monitoring the response from the test promotion, modeling the test response, scoring the non-test cell, and rolling out the actual promotion. See Classification and Regression Trees.
CART
476
Unica Confidential
Glossary
cell
Cells are lists of identifiers for marketing message recipients (such as customer or prospect IDs), sorted in ascending order and stored in a file. Each cell has a unique identifier within its parent campaign. A user-entered field used to attach an intelligent keycode to an outbound cell. For example, cell codes are entered in the Cell Codes tab in the Snapshot process. See Chi-Square Automatic Interaction Detection. A means of contacting, being contacted by, or interacting with a customer or prospect as part of a campaign. Examples include direct mail, telemarketing, FAX, customer service or support, point-of-sale, E-mail, and Web site accesses. Chi-Square Automatic Interaction Detection, or CHAID, is a decisiontree technique used for classification of a data set. It provides a set of rules that can be applied to a new (unclassified) data set to predict which records will have a given outcome. It segments a data set by using Chisquare tests to create multi-way splits and requires more data preparation than CART. The loss of customers to competitors. Also called attrition. The process of dividing a data set into one or more exclusive groups. Response modeling is an example of binary classification wherein prospects divide into two categories: responders and non-responders. Classification and Regression Trees, or CART, is a decision-tree technique used for classification of a data set. It provides a set of rules that can be applied to a new (unclassified) data set to predict which records will have a given outcome. It segments a data set by creating two-way splits and requires less data preparation than CHAID. (For more on CHAID, see Chi-Square Automatic Interaction Detection.) The process of dividing a data set into mutually exclusive groups such that the members of each group are as close as possible to one another, and different groups are as far as possible from one another, where distance is measured with respect to all available variables. A customer or prospect interaction via a channel during a campaign. Examples might include receiving a direct-mail item, getting a telemarketing call, receiving a FAX, being told of a special coupon offer at a
cell code
CHAID channel
churn classification
clustering
contact
Version 6.4
Unica Confidential
477
Glossary point of sale, phoning technical support, and so on. Also called a touchpoint.
contact process continuation CRM creative
Any process that assigns an offer to a cell. Contact processes are: Mail List, Call List, eMessage, and Recommend. After monitoring the results of a promotional contact in a campaign, contacting a larger list of customers/prospects with the same promotion. See Customer Relationship Management. A creative is comprised of one or more creative pieces, for which cost information may be specified. This cost information can later be used to conduct ROI calculations. Cross-sell/up-sell models identify customers who are the best prospects for the purchase of additional products and services and for upgrading their existing products and services. The goal is to increase share of wallet. Revenue can increase immediately, but loyalty is typically enhanced as well due to increased customer involvement. Customer Relationship Management, or CRM, is the process of acquiring customers, retaining them, and maximizing their value to your business. It is a marketing paradigm based on a customer-centric perspective that utilizes all information available to better find, keep, grow, and understand customers. Key CRM activities are: (1) targeting and attracting the right customers, (2) marketing to customers based on their potential values, (3) customizing the timing, message, and content of your marketing to individuals, (4) proactively preventing customer defection, promoting and encouraging customer loyalty, (5) identifying opportunities and responding in realtime to customer interactions, and (6) coherently coordinating all communications with your customers.
cross-sell/up-sell modeling
D
data
Values collected through record keeping or by polling, observing, or measuring, typically organized for analysis or decision-making. More simply, data are facts, transactions, and figures.
478
Unica Confidential
Glossary
data cleansing
The process of ensuring that all values in a data set are consistent and correctly recorded. Also, the process of data manipulation and substitution in preparing a data set for use by modeling (e.g., handling outliers and missing data). Data items can exist in many formats such as text, integer, and floatingpoint decimal. Data format refers to the form of the data in the database. A subset of a data warehouse that focuses on one or more specific areas. The data usually is extracted from the data warehouse and further de-normalized and indexed to support intense usage in support of a specific application (e.g., campaign management or analytics). The extraction of hidden predictive information from large databases. A system for storing and delivering very large quantities of data, typically enterprise-wide. (See also data warehousing.) The design and implementation of processes, tools, and facilities to manage and deliver complete, timely, accurate, and understandable information for decision-making. It includes all the activities that make it possible for an organization to create manage, and maintain a data warehouse or data mart. (See also data warehouse.) A Decision Support System, or DSS, is a system of database(s), warehouse(s), and/or mart(s) in conjunction with reporting and analysis software optimized to support timely business decision-making and can be used to guide decision-making in a variety of areas, such as marketing, or in financial areas such as loan underwriting, credit and risk assessment, and so on. The process of removing duplicate customer and/or prospect information from a list. A tree-shaped structure that represents a set of decisions. These decisions generate rules for the classification of a data set. See also CART and CHAID. Marketing which includes direct contacts with specific customers or prospects through one or more channels. The Direct Marketing Association, or DMA, is a nonprofit organization based in New York City which has been serving direct marketing since 1917. Their Web site can be found at http://www.the-dma.org.
Version 6.4
Unica Confidential
479
Glossary
DMA DSS dynamic scoring
See Direct Marketing Association. See Decision Support System. Real-time scoring of a list of records, as opposed to scoring an entire database table.
E
EMA Enterprise Marketing Automation Enterprise Resource Planning ERP ETL event-driven exploratory data analysis
See Enterprise Marketing Automation. Enterprise Marketing Automation, or EMA, describes a suite of software designed to automate the marketing area of a company. All campaign management tools fall into this category. Enterprise Resource Planning, or ERP, describes large applications that can run the front and back office areas of large organizations. See Enterprise Resource Planning. Extract, Transform, Load. ETL tools are often used to load, update, and maintain databases. In response to a trigger or execution of a particular process in a campaign. Also referred to as longitudinal. The use of graphical and descriptive statistical techniques to learn about the structure of a data set.
F
fatigue flash count
Repeatedly contacting the same customers, leading to decreasing response rates over time. Current monitored count of responses to a promotion, typically done daily to track the success of the promotion before the final response count becomes available.
480
Unica Confidential
Glossary
G
genetic algorithms
Optimization techniques that use processes such as genetic combination, mutation, and natural selection in a design based on the concepts of natural evolution.
L
level switching
Term used in previous versions of Affinium Campaign to describe the act of changing the key used to identify counted members in a campaign. This action is accomplished by Audience processing in version 3.0 and higher. Lifetime value models predict the net present value of future revenue streams from customers and are powerful tools that help you make acquisition decisions on a financially rational basis. These tools are helpful in financially optimizing your marketing investment, both for acquiring new customers and retaining and growing existing ones. An analytical model that assumes linear relationships in the coefficients of the variables being studied. A statistical technique used to find the best-fitting linear relationship between a target (dependent) variable and its predictors (independent variables). See fatigue. A sigmoidal regression that predicts the proportions of a categorical target variable, such as type of customer, in a population. See event-driven.
M
marketing automation Affinium Model
The framework needed for a company to implement successful customer relationship management. Components of the marketing automation framework are people, process, and technology infrastructure. An application module belonging to the Affinium suite, Affinium Model offers totally automated predictive modeling solution that applies a variety of predictive techniques (RFM, regression, neural networks, decision
Version 6.4
Unica Confidential
481
Glossary trees, and so on) to ascertain precisely which algorithm works best for your data set. Wizards and point-and-click windows guide the analyst through all pre-modeling (data access, data cleanup, problem definition and pre-processing), modeling, and post-modeling (model validation and customer scoring) tasks in an easy-to-follow, step-by-step fashion.
model modeling
The formulas or algorithms or weights generated during modeling. Given a set of inputs (such as customer demographic or income information) and a set of outputs (such as which customers have made purchases during the last year), the process of developing formulas or algorithms or weights which, when applied to the inputs, closely match the observed outputs.
N
non-linear model
An analytical model that does not assume linear relationships in the coefficients of the variables being studied.
O
OLAP On-Line Analytical Processing
See On-Line Analytical Processing. On-Line Analytical Processing, or OLAP, is a common use of a data warehouse that involves real-time access and analysis of multidimensional data such as order information. Refers to array-oriented database applications that allow users to view, navigate through, manipulate, and analyze multidimensional databases. Fine-grained optimization (as offered by Affinium Campaign) allows prospecting list selection down to the individual level. Rather than contacting every prospect from the best performing list, Affinium Campaign users can select the best prospects from all available lists to maximize total ROI. Unlike other products that require running multiple models, frequently outside the product using third party tools, Affinium Campaign lets you perform the entire process within the product. A process that writes out data to a file or database table. Output processes are Snapshot, Optimize, and the contact processes.
optimization
output process
482
Unica Confidential
Glossary
P
parallel processing
The coordinated use of multiple processors to perform computational tasks. Parallel processing can occur on a multiprocessor computer or on a network of workstations or PCs. A structure and process for predicting the values of specified variables in a data set. The application of modeling results to inputs (e.g., lists of customers and associated information) to predict customer behavior (e.g., who is likely to respond to a particular promotion). Point of Sale, or POS, is the point at which a customer pays in person for goods purchased. See Point Of Sale. See campaign process. Generation of simple statistics (e.g., frequency) on a group of customers across one or more variables. Profiling groups can help you develop a detailed understanding of how they differ in demographics and behavior. Information about what changes hands or transpires during a contact with a customer or prospect in a campaign. A promotion has a unique identifier within Affinium Campaign, as well as information about the promotional piece(s) used during the contact, the total costs per contact, and so on. An item used during a contact. Examples could include a mailing, a flyer bundled into a mailing, a FAX page, an e-mail message, a telemarketing script, a coupon generated at a point-of-sale, and so on. Specialized acquisition models that identify prospects who have proximity to store locations as well as a propensity to behave like the best customers. Proximity/propensity modeling is particularly effective for retail businesses.
promotion
promotion piece
R
Recency, Frequency, Monetary
Recency, Frequency, Monetary, or RFM, is the process or technique of sorting a customer list based on the following: (1) when the most recent
Version 6.4
Unica Confidential
483
Glossary discretionary purchase was made, (2) how frequently customers have purchased, and (3) how much money customers have spent on purchases.
response modeling
Response modeling is used to improve customer response rates by targeting prospects who are most likely to respond to a particular advertisement or promotion. Instead of contacting every prospect on a list, response modeling lets you select only those with a high probability of responding positively. This is achieved by building a model to predict the likelihood that an individual will respond based on demographic, lifestyles, and psychotropic data, as well as purchasing history. Return on investment, or ROI, is the value (incremental revenue resulting from the campaign) divided by the total cost of campaign. An ROI greater than 1.0 represents a profitable campaign. Revenue and profit prediction can often tell you more than modeling simple response/non-response, especially if order sizes, monthly billings or margins differ across goods and services. Not all responses have equal value, and a model that maximizes responses does not necessarily maximize revenue or profit. See Recency, Frequency, Monetary. See Return On Investment.
RFM ROI
S
Sales Force Automation sampling
Sales Force Automation, or SFA, is a type of applications suite used to automate a direct sales force. Extracting a subset of data, for example, in preparation for doing a test promotion. Sampling can be done randomly, taking every nth row, or by taking the first or last n rows. For statistically valid control or test groups, samples must be performed randomly. In Affinium Campaign, a sorted list of floating-point scores calculated by applying a model to a cell. The list entries are in the same sequence as their corresponding identifiers in the source cell. Each scored cell has a unique identifier within its parent campaign. After modeling or predictive modeling, the assignment to customers of relative numerical values, usually in the range 0.0 to 1.0, representing the
scored cell
scoring
484
Unica Confidential
Glossary relative likelihood that each will respond to a particular promotion. See also dynamic scoring.
segmentation classification/ analysis
Segmentation classification/analysis partitions the customer base into mutually exclusive and cumulatively exhaustive groups. The members of each are as similar to each other as possible and as different as possible from members of other groups. Segmentation enables fine-tuning of messages based on unique needs and values of each group. The effectiveness of many predictive models can be improved by modeling within, rather than across, segments. A session is a flow of processes in Affinium Campaign designed to achieve specific results with your data. There are four types of sessions: data preparation, audience selection, modeling, and campaign. You can create a single session to perform a task, or create multiple sessions of different types as part of a larger Campaign. See Sales Force Automation.
session
SFA
T
table catalog template treatment trigger
A collection of mapped tables that allow you to re-use data definitions across multiple Affinium Campaign sessions. A pre-designed campaign that can be used as the basis of a new campaign. The assignment of a specific version to a specific input cell. (See version.) An event that causes one or more campaign processes to run, for example, a customer purchases a certain dollar value of goods; a customer opens a new type of account or takes a new loan; a customer makes a large deposit or withdrawal; or a certain amount of time elapses since some prior event.
U
UDI UDME
Version 6.4
Unica Confidential
485
Glossary
Universal Dynamic Interconnect
Universal Dynamic Interconnect, or UDI, is a technology that provides simultaneous connectivity to existing databases and flat files. Data from multiple sources can be used together within a single campaign, as long as a common identifier or translation is available. Unica Data Mining Engine, or UDME, is the data mining engine that Unica incorporates into its products, including Affinium Model and Affinium Campaign. The initial customer/prospect cell in a campaign, generated from one or more databases, internal lists, or purchased or rented customer/prospect lists.
V
version
The version identifies the creative(s) to be used, the contact channel, and the response channel. See also creative.
486
Unica Confidential
Index
A
acquisition models, defined 475 Affinium Campaign concepts 23 configuration 32 general steps for using 29 getting started 31 installing 32 introduction to 21 searching 59 users 23 Model 481 Plan 76 Security Manager 13 Suite 10 Applications 11 Compatibility 13 Key capabilities 13 algorithms, genetic 481 analytical model, defined 475 anomalous data, defined 475 Application Programming Interface (API) 475 attribute, defined 475 audience levels changing 146 defined 476 switching 481 working with 129 Audience process 27 configuring 128 audience, defined 476 Affinium Campaign Users Guide
B
bookmarked reports
53
C
calendar reports 424 Call List process 28, 153 Campaign Flowchart Status Summary Report 398, 399 campaigns analyzing results 48 associating offers 71 associating with strategic segments creating 35, 62 defined 476 deleting 86 editing 78 generating reports for 398 moving 85 organizing 80 overview 23, 61 printing 77 running 48, 79 viewing 73 catalogs, table 485 cell code, defined 477 cell reports 396 cell list 456 cell variable crosstab 462 cell variable profile 459 contents 466 exporting 456 overview 455, 456
69
Unica Confidential
487
Index Customer Relationship Management (CRM) 478 customizing links on Home page 56
printing 456 waterfall 468 cell, defined 477 channel, defined 477 charts displaying reports as 403 Chi-Square Automatic Interaction Detection (CHAID) 477 churn, defined 477 Classification and Regression Trees (CART) 477 classification, defined 477 clustering, defined 477 Compatibility 13 configuration for Affinium Campaign 32 contact process, defined 478 Contact Unica 16 contact, defined 477 continuation, defined 478 copying templates 349 Create Seg process 27, 153 creating campaigns 35, 62 custom macros 339 derived fields 325 flowcharts 90 offers 297 sessions 358 user variables 338 creative, defined 478 cross-sell modeling, defined 478 Cube process 27, 155 cubes relationship to strategic segments and dimension hierarchies 392 custom macros creating 339 creating queries using 255 guidelines 343 managing 347 overview 338 using to create derived fields 328
D
data cleansing 479 defined 478 format 479 Data mart 13 data mart, defined 479 data mining, defined 479 Data model 13 Data source Connectivity 13 data warehousing, defined 479 Database Connectivity 13 date range for weekly reports 397 de-dupe, defined 479 Decision process 27, 159 Decision Support System (DSS) 479 decision tree, defined 479 delay period, using in Schedule process 226 deleting campaigns 86 flowcharts 107 offer groups 314 offer versions 314 offers 314 derived fields creating 325 making persistent 330 overview 324 storing 328 using custom macros to create 328 dimension hierarchies loading stored 392 relationship to cubes and strategic segments 392
488
Unica Confidential
Index
storing 391 updating 391 working with 392 Direct Marketing Association (DMA) duplicating flowcharts 96 offers 314 dynamic scoring, defined 480
479
G
genetic algorithms 481 graphs displaying reports as 403 groups, offer 294 deleting 314
E
editing campaigns 78 flowcharts 98 offers 313 eMessage process 28, 160 EMM see Enterprise Marketing Management Enterprise Marketing Automation (EMA) 480 Enterprise Marketing Management 10 Enterprise Resource Planning (ERP) 480 Event In process 28, 160 Event Out process 28, 160 exporting reports 401, 456 Extract process 27, 160 Extract, Transform, Load (ETL) 480
H
Help 17 Home page customizing links 56 options 53 overview 52 viewing campaigns 73
I
installing Affinium Campaign
32
L F
flash count, defined 480 Flat files Connectivity 13 flowcharts copying 96 creating 90 deleting 107 editing 98 overview 25, 89 running 79, 101, 103 testing 101 viewing 97 folders 80 lifetime value modeling, defined linear model 481 linear regression, defined 481 list fatigue, defined 480, 481 listings reports 406 logistic regression 481
481
M
macros creating queries using 255 Mail List process 28, 164 marketing automation, defined Merge process 26, 191
481
Version 6.4
Unica Confidential
489
Index
configuring 191 model analytical 475 linear 481 non-linear 482 Model process 28 configuring 194 modeling cross-sell 478 defined 482 lifetime value 481 predictive 483 proximity/propensity response 484 up-sell 478 moving offer groups 316 offers 316
483
N
non-linear model, defined
482
O
offer groups moving 316 overview 294 offer versions 294 version codes 295 offers associating with campaigns codes 296 creating 297 creating version 309 deleting 314 duplicating 314 editing 313 groups 294 moving 316 overview 29, 293, 294 printing 309
reports from Summary page 318 searching for 320 versions 294, 313, 314 On-Line Analytical Processing (OLAP) Online help 17 optimization, defined 482 Optimize process 28, 197 organizational reports 396, 403 output process, defined 482 overview Affinium Campaign 21 Affinium Campaign concepts 23 campaigns 61 cell reports 455, 456 custom macros 338 derived fields 324 flowcharts 25, 89 Home page 52 offers 29, 293, 294 processes 25, 109 reports in Campaign 396 sessions 24 templates 349 user variables 335
482
P
parallel processing, defined 483 performance/profitability reports 396, 441 using for troubleshooting 107 persistent derived fields 330 Point Of Sale (POS), defined 483 predictive modeling, defined 483 printing campaigns 77 offers 309 reports 401, 456 process Audience 128 Call List 153 Create Seg 153 Cube 155
71
490
Unica Confidential
Index
Decision 159 eMessage 160 Event In 160 Event Out 160 Extract 160 Mail List 164 Merge 191 Model 194 Optimize 197 Recommend 198 Response 198 Sample 209 Schedule 219 Score 230 Segment 234 Select 245 Snapshot 276 Track 280 processes contact 478 data manipulation 25, 111 legacy 292 optimization 26, 115 output 482 overview 25, 109 run 26, 113 troubleshooting 107 types of 25 profiling fields 262 disallowing 267 options 269 profiling, defined 483 promotion piece, defined 483 promotion, defined 483 proximity/propensity modeling, defined
R
Recency, Frequency, Monetary (RFM) 483 Recommend process 28, 198 regression, logistic 481 report values gross revenue 473 incremental ROI 474 net revenue 473 return on marketing investment 474 revenue 472 run cost 472 run expense 473 reports accessing 397 bookmarked 53 bookmarking 55, 400 calculating values for 471 calendar 424 Campaign Flowchart Status Summary 398, 399 cell 396, 455 cell contents 466 cell list 456 cell variable crosstab 462 cell variable profile 459 cell waterfall 468 customizing 402 date ranges for weekly reports 397 displaying as charts or graphs 403 exporting 401 formulae for generating 471 generating for a campaign 398 generating from Analytics Home page 400 listings 406 organizational 396, 403 overview 396 performance/profitability 107, 396, 441 printing 401 segment analysis 427 summary 403 types of 396
483
Q
queries creating 249, 252 creating using SQL 257 using macros 255
Version 6.4
Unica Confidential
491
Index stored derived fields working with 329 strategic segments 69 relationship to cubes and dimension hierarchies 392 summary reports 403 System requirements 15
user-defined fields in 402 using 397 viewing offer reports 318 response modeling, defined 484 Response process 28, 198 Return On Investment (ROI) 474, 484 revenue and profit prediction, defined 484 running campaigns 48, 79 flowcharts 79, 101, 103
T
table catalogs defined 485 managing 353 Technical support 17 templates copying to Library 349 defined 485 library 351 managing 352 overview 349 pasting from Library 351 testing flowcharts 101 Track process 28, 280 configuring 283 treatment, defined 485 triggers defined 485 sending after run 228 using with Schedule process troubleshooting 107 using reports for 107
S
Sales Force Automation (SFA) 484 Sample process 26, 209 configuring 209 sampling, defined 484 Schedule process 27, 219 configuring 220 specifying delay period 226 user authorization 226 Score process 28, 230 configuring 231 scored cell, defined 484 scoring, defined 484 search, in Affinium Campaign 59, 320 segment analysis reports 427 Segment process 26, 234 configuring 234 segmentation classification, defined 485 segmentation analysis, defined 485 Select process 26, 245 configuring 245 sessions creating 358 defined 485 overview 24 signing in 32 Snapshot process 27, 276 configuring 276 SQL queries, creating 257
223
U
UDI see Universal Dynamic Interconnect Unica Affinium Suite 10 Contact information 16 Technical support 17 Unica Data Mining Engine (UDME) 486
492
Unica Confidential
Index
Universal Dynamic Interconnect 11, 13 Universal Dynamic Interconnect (UDI) 486 universe, defined 486 up-sell modeling, defined 478 user authorization, using in Schedule process 226 user names, in Affinium Campaign 32 user variables creating 338 overview 335 user-defined fields, in reports 402
V
variables see user variables version,offers creating 309 versions, defined 486 versions, offer 294, 295 versions,offer deleting 314 duplicating 314 editing 313 viewing campaigns 73 flowcharts 97 offer reports 318
Z
zoom, flowcharts
97
Version 6.4
Unica Confidential
493
Index
494
Unica Confidential
Affinium Campaign
Administrators Guide
Version 6.4
Copyright
Copyright, Unica Corporation 1999 - 2005. All rights reserved. Unica Corporation Reservoir Place North 170 Tracer Lane Waltham, MA 02451-1379
Examples and Data
All software and related documentation is subject to restrictions on use and disclosure as set forth in the Unica Software License and Services Agreement, with restricted rights for U.S. government users and applicable export regulations. Companies, names, and data used in examples herein are fictitious unless otherwise noted.
Trademarks and Patents
Unica is registered in the U.S. Patent and Trademark Office. Unica Affinium, Affinium, Affinium Campaign, Affinium Campaign Optimize, Affinium Campaign Interact, Affinium Campaign eMessage, Affinium Campaign Collaborate, Affinium Mart, Affinium Model, Affinium Plan, Affinium Report, Universal Dynamic Interconnect, Interconnect Modules, Powering Marketing Innovation, Customer Value Maximization, MAP, and One-to-One Optimization are trademarks of Unica Corporation. All other trademarks are the property of their respective owners. Portions of the software described in this document are covered by U.S. Patent No. 6,317,752 and U.S. Patent No. 6,269,325. NOTICE: This document contains confidential and proprietary information of Unica Corporation (Unica). Use, duplication, or disclosure without the express written consent of Unica Corporation is prohibited.
Document Information
Affinium Campaign Administrators Guide, for Affinium Campaign Version 6.4 ATD 01-10040-100, 6/16/05
Table of Contents
Preface About Affinium and This Guide 7
About the Affinium suite...................................................................... .8 About this guide ................................................................................ .12 Related documents..................................................................... .12 Typographic conventions............................................................ .13 Special information ..................................................................... .13 Keyboard conventions ................................................................ .14 Feedback .................................................................................... .14 Technical support ............................................................................. .15 Users Guide ............................................................................... .15 Unica Technical Support............................................................. .15
Chapter 1
Introduction
17
What does Affinium Campaign do? .................................................. .18 How does Affinium Campaign work?................................................ .18 Who will use Affinium Campaign? .................................................... .19 Affinium Campaign concepts ............................................................ .19 Campaigns, sessions, and flowcharts ........................................ .19 Processes ................................................................................... .20 Offers .......................................................................................... .24 Graphical user interface.................................................................... .25
Chapter 2
27
Administrative tasks overview........................................................... .28 Accessing administrative tools.................................................... .28 Specifying advanced settings ........................................................... .32 General tab ................................................................................. .32 Server Optimization tab .............................................................. .37 Test Run Settings tab ................................................................. .38
Unica Confidential
Table of Contents
Managing user authorizations ............................................................39 Mapping tables ...................................................................................41 Accessing the Table Mappings window .......................................41 Managing data sources ......................................................................42 Accessing the Database Sources window ...................................42 Viewing databases .......................................................................43 Logging into and out of databases ..............................................43 Managing dimension hierarchies........................................................45 Accessing the Dimension Hierarchies window.............................45 Managing audience levels..................................................................46 Managing logs ....................................................................................47 The Logging Options window .......................................................48 Viewing the system log.................................................................49 Operational monitoring .......................................................................49 Flowchart statuses and actions ....................................................52 Controlling flowcharts from the Monitoring page ..........................54
Chapter 3
Using Tables
57
User tables .........................................................................................58 System tables.....................................................................................59 Mapping system tables.................................................................59 Mapping user tables .....................................................................62 Exporting data from Campaign.....................................................82 Remapping a table .......................................................................87 Unmapping a table .......................................................................88 Viewing table information .............................................................89 Storing system tables in databases....................................................90 Creating or editing a data dictionary.............................................91 Creating custom campaign and offer attributes..................................94 Creating custom attributes ...........................................................94 Creating a custom campaign attribute..........................................94 Creating a custom offer attribute ..................................................97 Managing table catalogs ....................................................................99 Opening table catalogs...............................................................100 Creating table catalogs...............................................................101 Saving table catalogs .................................................................103 Recomputing counts and values for tables ................................106
Unica Confidential
Table of Contents
Chapter 4
Dimension Hierarchies
109
Overview ..........................................................................................110 Using dimension hierarchies ......................................................111 Dimension guidelines .................................................................111 Mapping dimensions ........................................................................112 Updating dimension hierarchies .......................................................115 Loading dimension hierarchies.........................................................116
Chapter 5
Logging
117
Log file location ................................................................................118 Setting logging levels .......................................................................118 Enabling logging...............................................................................120 Viewing log files................................................................................120 Clearing logs ....................................................................................122
Chapter 6
Triggers
123
Using triggers ...................................................................................124 Tokens supported by triggers...........................................................125 Affinium trigger (unica_actrg) ...........................................................130 Broadcasting triggers .................................................................130 Failure notification ......................................................................132 Synchronous triggers .................................................................132 Asynchronous triggers................................................................133 UA_Trigger List Table ................................................................134 Advanced settings relating to triggers ..............................................134
Chapter 7
Utilities
135
Affinium Campaign listener (unica_aclsnr).......................................136 Syntax ........................................................................................136 Options .......................................................................................136 Starting and stopping the listener ...............................................137 Running the listener as a Windows NT service ..........................137 Running the listener as a Windows 2000 service.......................139 Affinium Server Manager (unica_svradm)........................................140 Supported commands ................................................................141 Killing a running flowchart ..........................................................147
Version 6.4
Unica Confidential
Table of Contents
Database load utility .........................................................................148 Fast loader repeated tokens.......................................................149 Affinium Campaign Session (unica_acsesutil) .................................150 Syntax ........................................................................................150 Options ......................................................................................150 Return values ............................................................................153 Exporting and importing campaigns, sessions, and flowcharts..153 Database testing utilities ..................................................................154 cxntest utility...............................................................................154 db2test utility (AIX and SUN)......................................................156 odbctest utility.............................................................................157 oratest utility (UNIX-only) ...........................................................159
161
System tables overview....................................................................162 Table definitions ...............................................................................162 Supported tables ..............................................................................162 Legacy tables ...................................................................................168
Appendix B Troubleshooting
171
Affinium Campaign error codes........................................................172 Contacting Unica technical support..................................................224 Working with TeamTrack............................................................225 Searching in TeamTrack ............................................................229
Glossary Index
233 239
Unica Confidential
This preface provides information about the Affinium suite of applications and the conventions used in this Unica Confidential. Key topics include: About the Affinium suite About this guide Technical support
Unica Confidential
Unica Confidential
Affinium technology delivers an integrated suite of applications that address the comprehensive scope of EMM:
Affinium Model is Unicas award-winning data-mining and predictive analysis application that provides segmentation and profiling, valuation, response modeling, and cross selling features to solve specific marketing problems. It is the only data-mining product that automates the model building and optimization process. This capability allows you to very quickly create very accurate predictive models. Affinium Campaign provides a complete set of campaign management capabilities that allow marketers to create, test, optimize, deploy and analyze multi-wave, cross-channel marketing campaigns quickly and easily. Marketing campaigns can be simulated before execution, enabling a marketer to project anticipated ROI results. Affinium Campaign Collaborate enables marketing organizations to distribute the execution of centrally managed marketing campaigns throughout the enterprise to agents, branch managers, field sales, etc. It also
Version 6.4
Unica Confidential
allows organizations to ensure that corporate business rules and best practices are enforced while allowing execution and controlled customization.
Affinium Campaign eMessage is an email application that enables marketers to create, preview, test, execute, and track personalized email communications. It provides reports on key measurements such as clickthroughs, opt-outs, and undeliverable messages. With eMessage, email marketing can be coordinated with other marketing efforts. Affinium Campaign Interact is a real-time personalization application that allows marketers to utilize data from all customer interactions to provide the right level of personalization and most effective offer, content, or service to individuals across all real-time channels. It combines predictive analysis, current interaction context and business objectives and rules to deliver powerful personalization. Affinium Campaign Optimize is a world-class optimization application that enables marketers to determine the optimal interaction strategy for each customer over time. It looks across selected marketing campaigns, offers, and touch points to respect customer privacy, limit contact fatigue, prevent conflicting offers, meet channel or inventory capacity limitations, and maximize marketing ROI and profitability. Affinium Plan is a marketing planning application which empowers the entire marketing team to define, coordinate, resolve, automate, simulate, and monitor various marketing plans, programs and tasks across initiatives. Plan eases organizational collaboration and provides real-time visibility into all marketing activities within an organization. This means marketers achieve improved decision making, collaboration program management, enhanced financial management, and increased productivity and performance. Affinium Leads is a full-featured lead management application that extends the lead generation capabilities of Affinium Campaign into lead management, opportunity maturation, and sales closure. Integration between Marketing and Sales is accomplished through a dynamic workflow and distribution engine, role-specific user interfaces, and end-to-end analytics capabilities.
10
Unica Confidential
Affinium Security Manager (ASM) provides centralized management and control of authentication and security for the Affinium suite. It is a repository that stores information such as user passwords, user group privileges, and data source credentials.
UDI interconnectivity
Affiniums Universal Dynamic Interconnect (UDI) technology forms the foundation of the Affinium suite of products, providing simultaneous, dynamic connectivity to your existing databases and flat files. By using UDI, you can include data from multiple sources, as long as a common identifier is available. UDI technology connects directly to existing databases and flat files, so you can have Affinium applications up and running quickly without needing to first establish a separate datamart or data model. Unicas Affinium suite is able to simultaneously access and manipulate information from multiple databases and flat files through UDI. This includes capabilities to not only read but also write data, making Affinium compatible with multiple touch point systems, such as contact center applications.
Universal Dynamic Interconnect (UDI) technology allows marketers to adapt to an ever-changing marketing data environment. A fully integrated marketing suite with integrated analytics, predictive and historical modeling, campaign management, email marketing, and crosschannel real-time personalization provides consistent and effective one-toone interactions. One-to-one marketing achieved by targeting the right people, at the right time, through multiple channels, with the right offer. A central location for implementing cross-channel marketing methodology and building campaign and interaction logic minimizes hard-coding of rules within your touch point systems and allows for consistent customer treatment and branding.
Version 6.4
Unica Confidential
11
Real-time personalization and optimization at each touch point increases the effectiveness of each offer. Enterprise-wide planning, tracking, and collaboration capabilities provide real-time visibility into all marketing initiatives, increase marketing velocity, and enable control over the achievement of marketing objectives. Automatic optimization of campaigns based on corporate-wide rules, constraints, scoring, and a patented optimization algorithm maximizes your campaign objectives.
Related documents
In addition to this guide, you can find more information about Affinium Campaign in the following documents:
Affinium Campaign Users Guide Affinium Campaign Online Help Affinium Campaign Release Notes Affinium Campaign Installation Guide Affinium Macros Users Guide All guides assume familiarity with Microsoft Windows environments and Microsoft Internet Explorer.
Note
12
Unica Confidential
Typographic conventions
Specific conventions are used in this guide to convey additional information about a subject. Style
Code
Description
Code style is used for text that is used literally, appearing exactly as shown. This includes command names, path names, and system information. Italic code style is used for names of variables that you must provide. For example, you need to supply a value for your_file in the path name example to the right. Bold code style is used to indicate the option used by default if none is specified. The GUI style is used to indicate objects in the applications interface or keys on your keyboard. Square brackets are used to enclose optional items in syntax descriptions. Braces enclose a list from which you must choose an option. A vertical bar separates items in a list. Ellipses in a syntax description indicate that the preceding parameter can be repeated multiple times. For instance, you could use multiple filenames as parameters in the example to the right.
Example
\Affinium\model\model.exe
Italic code
\Affinium\data\your_file
Bold code
{ALL | COL | ROW} the User Name field, the Enter key macro_name(required_var [, optional_variable]) {ALL | COL | ROW} {ALL | COL | ROW}
GUI [] {} |
run filename,
Special information
Note
Notes in the text are displayed like this. They highlight information or provide supplementary information.
Version 6.4
Unica Confidential
13
Important!
Critical information is displayed with this label, to inform you of an important point. Be sure to read this before continuing.
Keyboard conventions
Convention KEY1 + KEY2 KEY1 - KEY2 Keystrokes
A plus sign (+) between two keys means to press both keys down at the same time. A dash (-) between two keys means to press one key, followed by the other.
Alt-F-P means to press the Alt key followed by the letter F, and then the letter P.
Feedback
We appreciate your comments about this Guide. Please contact us at the location most convenient for you:
Unica Corporation, Technical Documentation Reservoir Place North, 170 Tracer Lane, Waltham, MA 02451-1379 Unica Corporation Limited, Technical Documentation Aston Court, Kingsmead Business Park, Frederick Place, High Wycombe, HP11 1LA, UK Unica France, Technical Documentation 27 rue de Berri - 75008 Paris - France Unica Corporation, Technical Documentation 7 Temasek Boulevard, Suntec Tower One, #44-01, Singapore, 039789 781.839.8250 for the Americas 44.1494.616.547 for Europe 33.1.56.69.44.07 for France 65.6430.6618 for Asia Pacific documentation@unica.com
By Mail:
By Phone:
By Email:
14
Unica Confidential
Technical support
Technical support
We offer three technical support resources: the Affinium Campaign Users Guide, the Affinium Campaign Administrators Guide, and Unicas Technical Support department.
Users Guide
The Affinium Campaign Users Guide is designed to allow you to begin using Affinium Campaign quickly. It will also help you develop a clear understanding of the product that will enable you to continue to explore it and learn on your own. You can access the book through the Help link in Affinium Campaign or in the Help subdirectory of the directory where you installed Affinium Campaign.
If you choose to contact Unica by email or phone, use the appropriate contact information for your region: Region Contact information
Unica Corporation, Reservoir Place North, 170 Tracer Lane, Waltham, MA 02451-1379 781.839.8250 support@unica.com Unica Corporation Limited, Aston Court, Kingsmead Business Park, Frederick Place, High Wycombe, HP11 1LA, UK 44.1494.616.547 supporteurope@unica.com
Americas
Europe
Version 6.4
Unica Confidential
15
Region France
Contact information
Unica France, 27 rue de Berri - 75008 Paris - France 33.1.56.69.44.07 supporteurope@unica.com Unica Corporation, 7 Temasek Boulevard, Suntec Tower One, #44-01, Singapore, 039789 65.6430.6618 apsupport@unica.com
Asia Pacific
If you are not a designated support contact at your company, please contact your Affinium administrator for information on who to contact within your company to address any issues. When logging a call with Unica Technical Support the following information may be needed in order to properly diagnose your issue.
Affinium application name and version number Environment details - server operating system, database, and web application (if necessary) Brief description of the nature of your issue Detailed error messages you see when the issue occurs Detailed steps to reproduce the issue Related log files, session files, configuration files, data files, and so on.
Gathering this information prior to submitting your issue into Technical Support could help in finding a resolution more quickly.
16
Unica Confidential
1 INTRODUCTION
This chapter provides an introduction to Affinium Campaign. Affinium Campaign is a Web-based, Enterprise Marketing Management (EMM) solution that consists of a back-end server, a Web server, an Active X client, and the Affinium Security Manager (ASM). This chapter includes the following key topics: What does Affinium Campaign do? Who will use Affinium Campaign? How does Affinium Campaign work? Affinium Campaign concepts Graphical user interface
Unica Confidential
17
Chapter 1: Introduction
18
Unica Confidential
Affinium Campaign treats a marketing campaign as a discrete entity that is made up of one or more flowcharts, which are comprised of one or more processes. However, a campaign can also be associated with one or more strategic segments, offers, and reports, and can consist of multiple flowcharts. The processes, which are defined in a flowchart, are the heart of Campaign because they perform the actual data manipulation, scheduling, reporting, and optimization.
Version 6.4
Unica Confidential
19
Chapter 1: Introduction
more strategic segments and associated with one or more offers and a number of reports. A session is where you create fundamental, persistent, global data constructs (for example, strategic segments and cubes) and then make them globally available to all campaigns. Like campaigns, sessions are also consist of individual flowcharts. A flowchart is a collection of processes linked together to accomplish a particular marketing goal. For example, it can link a particular offer to a particular group for a direct mail campaign, tracking responders and non-responders, or targeting a particular segment of a customer list. Campaign supports batch flowcharts that you can run manually or by a scheduler. Licensed users of Affinium Campaign Interact can also use Campaign to run transactional flowcharts that depend on the occurrence of an event. For more information on transactional flowcharts, see the Affinium Campaign Interact Users Guide.
Processes
Generally, you accomplish all tasks through the use of processes. Processes operate on the mapped records in the data mart. The processes in a flowchart define how and in what order the flowchart runs. You access processes through the flowchart workspace, where you can drag and drop process types from the process frame onto the working palette and configure, refine, rename, and connect them. Flowcharts contain individual processes that you configure to perform a particular step in a campaign or session. For example, you can merge two audience groups with the Merge process or write the results of the entire campaign with either a Snapshot process or one of the contact processes, such as Call List or Mail List.
Note
Generally, the order in which you use processes is arbitrary. However, in almost all cases, you begin a batch flowchart with a Select or Audience process to create initial customer data cells because most other processes require at least one data cell as input.
20
Unica Confidential
Data manipulation processes Data manipulation processes (Table 1-1) allow you to select customers from mapped flat files or database tables based on criteria you specify, merge lists of customers together for inclusion or exclusion, segment customers into meaningful groups, specify a target audience for your campaign, and so forth.
Process Select
Description
Facilitates the selection of customer/prospect records based on criteria you specify. It identifies the customers for the particular campaign, which may or may not be modified and refined by other processes. Supports the ability to combine multiple cells or exclude the contents of multiple cells. You would use the Merge process, for example, to exclude customers from an initial Select process who meet certain criteria (such as delinquent accounts, for example). Supports the ability to divide customers into meaningful groupings. You would use the Segment process, for example, to group customers by account type if you wanted to apply each account with a different treatment. Facilitates the creation of one or more cells for different treatments, control groups, or a subset for analytic processing. You would use the Sample process, for example, if you wanted a certain percentage of your target audience to receive a test version of an offer through email, and another percentage to receive a standard offer through regular mail. Allows you to work within different audience levels which were defined when the customer database tables were mapped into Campaign. Audience levels may, for example, have been defined as Head of Household, Commercial, or Consumer based on certain criteria. Allows you to write/transform data into a table in the database for subsequent processing. Only executes a subsequent branch in a flowchart if the input cell is not zerolength. You would use the Decision process, for example, to execute a particular flowchart branch for one type of customer and another branch for another type of customer. Similar to the Segment process, which runs all subsequent branches regardless of zero-length cells.
Merge
Segment
Sample
Audience
Extract
Decision
Run processes
Version 6.4
Unica Confidential
21
Chapter 1: Introduction
Run processes (Table 1-2) control the actual execution of completed campaigns, which includes the management and output of contact lists, the assignment of treatments to target audiences, the tracking of responses and contacts, the logging of data, and the scheduling of campaign or session runs.
Table 1-2 Run Processes
Process Snapshot
Description
Allows you to write out the data that you have created and refined in the current flowchart. You would use a snapshot to compare the data or measure changes over the course of a campaign, like the changes in credit use following a usage stimulation campaign. Allows you to specify when a flowchart, group of processes, or a single process will execute.
Schedule
You can schedule campaigns and campaign events to run at a specific time, repeatedly at set time intervals, or as the result of some action taking place (referred to as a trigger). For example, you can take snapshots of data at specified time intervals or at preset campaign stages. External events, such as a hit on a web site, can trigger campaigns using Affinium Campaigns event notification process. Supports the creation of data cubes from dimensions derived from customer databases tables which are then used as the basis for creating campaigns. To be used by the very technical user or the Campaign consultant. Users can select a defined segment or a series of input cells, create a cube, and then drill into the data to select a target audience which can then be converted into the appropriate process boxes (the Select process, for example) for inclusion in a flowchart. Supports the creation of strategic data segments from customer databases tables which are then used as the basis for creating dimensions, cubes, and selects. To be used by the very technical user or the Campaign consultant. For licensed users of Affinium Campaign Interact, accepts data from a UDI queue in a transactional flowchart. For more information, see the Affinium Campaign Interact Users Guide. Writes data to a UDI queue.
Cube
Create Seg
22
Unica Confidential
Description
Allows a user to assign offers to cells, generate a contact list, and log contact history for direct mail communications. Allows a user to assign offers to cells, generate a contact list, and log contact history for telemarketing communications. Links to Affinium Campaign eMessage to support personalized email execution. For more information, see the Affinium Campaign
Optimization processes Optimization processes let you fine tune your campaign to maximize effectiveness. You use Optimization processes to create models to generate model scores that you can use for more refined selection and to optimize your ROI for customer contacts.
Process Model
Description
Generates response models using the Affinium Campaign modeling engine. You can use these models to, among other things, dynamically score a target audience. The Optimize process is available for licensed users of Affinium Campaign Optimize. Adding an Optimize process to your session flow allows your organization to determine the optimal interaction strategy for each customer over time by looking across multiple marketing campaigns offers and channels. For more information, see the Affinium Campaign Optimize Users Guide. Scores all incoming cells using one or more models that were created either in a Model process or in Affinium Model. You would use the Score process to identify the best customers or prospects for a campaign that you plan to run. Supports multiple levels of tracking, multiple response types, and the logging of additional user attributes for responders. It is also the basis for many of the performance reports generated by Campaign.
Optimize
Score
Response
Version 6.4
Unica Confidential
23
Chapter 1: Introduction
Offers
An offer represents a single marketing message that you can use in a variety of ways. For example, you can use an offer in different marketing campaigns, at different points in time, and in different channels. An offer is associated with a target audience in a flowchart using one of the contact processes (Mail List, Call List, or eMessage). A flowchart tracks customer responses using a Response process, which makes the offer available for several reports, including Performance and ROI reports. Offers have metadata fields that include a unique name, description, offer code with up to five sub-fields, effective/expiration dates, contact channel, relevant products, content/creative URL, redemption URLs. Offers can also have a set of extended attributes. In Campaign you can:
Link an unlimited number of offer versions to a campaign. Associate a product with an offer. You define and map the fields that Campaign should access in the UA_Product system table, based on the fields in your data mart. Use a calendar to select effective/expiration dates for the offer when you create it. Search for offers by name, description, or code. Create an organization report based on a particular offer.
Offer versions
Offer refers to an offer and all versions based on it. An offer may have multiple versions, and you can create an offer version from any existing offer version. When you create an offer, a new version automatically duplicates the information in the parent offer or version. You can edit this information. Offers display in a hierarchy and if an offer has versions, you can expand it to see them. Offer versions automatically roll up to the offer for reporting. You can accept the automatically generated tracking code or override it with any unique code. Moving an offer to a different folder location moves all of its versions with it.
24
Unica Confidential
Offer codes
Offer codes are the same among all versions of the same offer. If you change the offer code in one offer version, it changes for all other versions of the same offer; you cannot override this behavior. Use caution when you change the code of an existing offer; if it is being used by a campaign, it may be unable to use an offer if it refers to the offer by it another code. Offer codes have the following features:
Can have up to five parts. The format of offer codes is defined by parameters in the system configuration file, unica_acsvr.cfg. Entire code (all parts taken together) must be unique across different offers. Campaign enforces this. Campaign generates unique offer codes automatically, or you can enter a custom code manually or write a custom code generator.
Many organizations use a treatment code, which represents the application of an offer version to a cell with a particular tracking code within a campaign. Campaign automatically generates the following codes, all of which are available as Affinium-generated fields in contact processes:
Offer code Version code Campaign code Cell code Tracking code
Version 6.4
Unica Confidential
25
Chapter 1: Introduction
26
Unica Confidential
Administrative users can perform administrative functions from various areas of the Campaign user interface.
Note
If you perform any administrative tasks when users are working with Campaign, they will have to log out and then log back into Campaign to see any changes.
Key topics include: Administrative tasks overview Accessing administrative tools Specifying advanced settings Managing user authorizations Mapping tables Managing data sources Managing dimension hierarchies Managing audience levels
Affinium Campaign Administrators Guide Unica Confidential
27
Specifying advanced settings specify the General, Server Optimization and Test Run settings for the current flowchart Managing user authorizations view and authorize pending user authorizations Mapping tables map database tables or flat files for use in Campaign Managing data sources view and manage database logins Managing dimension hierarchies manage dimension hierarchies for use in Campaign Managing audience levels view and manage audience levels Managing logs manage logging options Operational monitoring view and control active campaign runs for a campaign and its running flowcharts using the Monitoring interface
The Admin menu at the top of a flowchart in Edit mode The Tools menu at the top of a flowchart in Edit mode The Administration link in the navigation pane The Monitoring link in the navigation pane
28
Unica Confidential
Tables
Version 6.4
Unica Confidential
29
This menu option opens the Stored Derived Field Expressions window where you can access existing derived fields and create new ones. For more details, refer to the Stored Objects chapter in the Affinium Campaign Users Guide. This menu option opens the Stored Trigger Definitions window where you can access existing triggers and create new ones. For more details, refer to Chapter 6, Triggers, on page 123 and to the Affinium Campaign Users Guide. This menu option opens the Stored Templates window where you can access and manage existing flowchart templates. For more details, refer to the Stored Objects chapter in the Affinium Campaign Users Guide. This menu option opens the Stored Table Catalogs window where you can access and manage existing table catalogs. For more details, refer to the Stored Objects chapter in the Affinium Campaign Users Guide. This menu option opens the User Variables window where you can modify existing user variables or add new ones. For more details, refer to the Stored Objects chapter in the Affinium Campaign Users Guide. This menu option opens the Campaign Collaborate Settings window where you can select parameters to expose to Affinium Campaign Collaborate. For more details, refer to the Affinium Campaign Collaborate Users Guide. This menu option opens the Pending User Authorization List window where you can view and authorize pending user authorizations. For more details, refer to Managing user authorizations on page 39. This menu option opens a new text window in which you can view the log for the current flowchart run. For more details about logs, refer to Chapter 5, Logging, on page 117. This menu option opens the Logging Options window where you can specify the message types and categories for logging. For more details about logs, refer to Chapter 5, Logging, on page 117. Check or uncheck this menu option to enable or disable logging. For more details about logs, refer to Chapter 5, Logging, on page 117
Stored Triggers
Stored Templates
User Variables
Parameter List
Logging Options
Enable Logging
30
Unica Confidential
Clear Log
Select this menu option to clear the log for the current flowchart. For more details about logs, refer to For more details about logging functions, refer to Chapter 5, Logging, on page 117.
Version 6.4
Unica Confidential
31
Note
You must have administrator provileges on your user name and login to access the Monitoring page, and you can only view and manage campaigns and flowcharts for the partition that you are logged into.
General tab
The General tab settings allow you to specify:
Whether results from flowchart runs are saved; Whether flowchart processing is done in database or on the Affinium server; The Y2K (Year 2000) threshold; Whether Affinium Campaign automatically saves flowcharts; Whether Affinium Campaign uses checkpoints during flowchart runs; The maximum number of data errors Affinium Campaign allows; The triggers to send on a flowchart run error; The triggers to send when a flowchart run completes successfully.
32
Unica Confidential
Y2K threshold
The Y2K Threshold value determines how Affinium Campaign interprets years that are represented with only two digits.
Version 6.4
Unica Confidential
33
Note
We highly recommend that you store dates in the database with 4-digit years to prevent confusion.
Valid values are 0 to 100; any values higher than 100 are set to 100. The default setting for Y2K Threshold is 20. Campaign uses the Threshold value to calculate a range of years whose lower limit is the threshold value + 1900 and whose higher limit is 99 years above that. For example, if you set the Y2K Threshold to 50, the range of years is from 1900+50 = 1950, to 2049. So, if you enter a two-digit year greater than or equal to your threshold (in this case, 50), the date is interpreted to be in the 1900s. If you enter a two-digit year less than your threshold, it is interpreted to be in the 2000s. If you sent the Y2K Threshold to the maximum value of 100, the range of years will be 1900+100 = 2000, to 2099. In this case, all two-digit years are interpreted to be in the 2000s. You can change this threshold as needed.
Auto-save
You can set the auto-save feature to automatically save your work periodically. When you enable auto-save, it performs a forced save of flowcharts during editing and configuration. It has the same effect as if you chose File > Save. Autosave is not active if you run the flowchart on a branch of the Flow Chart. Auto-save never saves flowcharts in a paused state, even if Auto-save occurs while a selected process is running. The default setting is Never. You must have previously saved the current flowchart (provided a filename) for this feature to work.
34
Unica Confidential
Note
Affinium Campaign stores auto-save files in a temporary directory so that the original flowchart files are not changed. If you exit without saving, all results are lost even if you have enabled auto-save.
Checkpoint
The Checkpoint feature provides the ability to capture a snapshot of a running flowchart for recovery purposes. A checkpoint save has the same effect as if you selected File > Save, and allows you to recover a flowchart in the state of the most recent checkpoint save, in the event the server stops or goes down. When you set a frequency interval for checkpoint, it controls a timer on the server for a running flowchart. Checkpoint saves are made at the specified intervals. Checkpoint is active during a flowchart run and when you runn a branch in the Flowchart. When the running flowchart saves, Campaign saves it in Paused mode. When you open the flowchart, you must either stop or resume the flowchart. When you resume, the currently executing processes run again from the beginning. The default setting for Checkpoint is Never.
Version 6.4
Unica Confidential
35
Set this value higher if you are debugging a problem with an export and want to write the errors to a log file.
36
Unica Confidential
Version 6.4
Unica Confidential
37
The default setting is 32 MB, but you can change the setting to suit your servers capabilities and your needs. Figure 2-4 shows this setting set to 128 MB.
Note
Set a value equal to (80% x available memory) / (number of expected concurrent Affinium Campaign flowcharts).
Enable output
Select this checkbox to specify that you want to output the results of your test runs to your database.
38
Unica Confidential
In general, Affinium Campaign does not write test run results to your database; however, you might want to verify that results are being recorded properly. To do this, limit your cell size and then select the Enable Output checkbox, so that you are using a limited amount of data to test your flowchart run and its output.
You can click OK to authorize the run immediately or defer the decision to a later time. If you prefer not to authorize the run at that time, click Skip to defer authorization on a single process, or click Skip All to defer authorization on all processes requiring authorization. For more information on configuring the Schedule process, see the Affinium Campaign Users Guide.
Version 6.4
Unica Confidential
39
Note
If you have not skipped any authorizations, the Pending User Authorization List will be empty.
Select Admin > User Authorization List to open the Pending User Authorization List window. Each authorization that you skip automatically creates an entry on the Pending User Authorization list. To access the Pending User Authorization LIst window
1
Open a flowchart for editing. You see the flowchart page in Edit mode.
Select Admin > User Authorization List. You see the Pending User Authorization List window displaying any user authorizations that are awaiting approval. To authorize one or more processes
From a flowchart page in Edit mode, select Admin > User Authorization List. You see the Pending User Authorization List window displaying any user authorizations that are awaiting approval.
40
Unica Confidential
Mapping tables
In the Pending User Authorization List, select the pending process or processes that you want to authorize (Ctrl + Click to select multiple processes). Click Authorize. To authorize all pending processes
From a flowchart page in Edit mode, select Admin > User Authorization List. You see the Pending User Authorization List window displaying any user authorizations that are awaiting approval.
Mapping tables
Before you can use Affinium Campaign to change the data in your data mart, you must first map that data to a table in Campaign. Also, before you can export data generated by Campaign, you must either map that data to a table or flat file, or create a new table or flat file to hold the exported data.
Select Admin > Tables from a flowchart page in Edit mode; Click the Administration link on the main navigation page and select the Manage Table Mappings link.
Version 6.4
Unica Confidential
41
From the Table Mappings window you can view the lists of system and user tables, map, unmap, or remap tables, or create new tables. For details, refer to Chapter 3, Using Tables, on page 57.
Select Admin > Database Sources from a flowchart page in Edit mode; Click the Administration link on the main navigation page and select the View Datasource Access link.
42
Unica Confidential
From the Database Sources window you can manage database connections. The window lists all databases used in the current flowchart.
Viewing databases
From the Database Sources window you can select any of the listed databases to view its connection type and configuration options. When you select a database, its information appears in the information window.
Select the database you want to log in to. Click Login. The Database Authentication window appears, as shown in Figure 2-9.
Version 6.4
Unica Confidential
43
3 4 5
Enter your database user name in the User Name field. Enter your database password in the Password field. Click OK to log in. To log out of a database
Select the database you want to log out from. You can select one or more databases.
Click Logout. When you logout from a database the Login Name changes to [not logged in], as shown in Figure 2-10.
44
Unica Confidential
Select Admin > Dimension Hierarchies from a flowchart page in Edit mode; Click the Administration link on the main navigation page and select the Manage Dimension Hierarchies link.
Version 6.4
Unica Confidential
45
From the Dimension Hierarchies window you can modify, delete, or create new dimension hierarchies. For more details about working with dimension hierarchies, refer to Chapter 4, Dimension Hierarchies, on page 109.
46
Unica Confidential
Managing logs
Click the Administration link on the main navigation pane. You see the list of Administration links.
Select the Manage Audience Levels link. The Audience Levels window appears, as shown in Figure 2-12.
Figure 2-12 The Audience Levels Window
Managing logs
Campaign supports a variety of log files that you can use to track flowchart activity. You can manage logging options for a flowchart from the Logging Options window. For details about log file locations, viewing logs, enabling logging and clearing logs, refer to Chapter 5, Logging, on page 117.
Version 6.4
Unica Confidential
47
For more information about working with logs, refer toChapter 5, Logging, on page 117. To access the Logging Options window Select Tools > Logging Options from a flowchart page in Edit mode. The Logging Options window appears, as shown in Figure 2-13.
Figure 2-13 The Logging Options window
48
Unica Confidential
Operational monitoring
The View System Log link is not available if more than one partition has been defined in Affinium Campaign.
Click the Administration link on the main navigation page. You see the Administration links.
Select the View System Log link. A new text window opens, displaying the system log.
Operational monitoring
The Operational Monitoring page displays and allows you to control active flowcharts. For more details, refer to Viewing the Monitoring display on page 49 and Controlling flowcharts from the Monitoring page on page 54. You can perform the following tasks relating to the Monitoring page:
Viewing the Monitoring display Sorting the Monitoring display Viewing associated campaigns or flowcharts Refreshing the Monitoring display Controlling flowcharts from the Monitoring page
For more details about flowchart statuses and actions that you perform on flowcharts from the Monitoring page, refer to Flowchart statuses and actions on page 52.
Version 6.4
Unica Confidential
49
The status for each flowchart appears in the Status column both in text and by the colored status indicator. For the colors corresponding to each status, refer to the table under Flowchart statuses and actions on page 52. The action buttons that are available for each flowchart depend on the flowcharts status. For valid actions corresponding to each status, refer to Flowchart statuses and actions on page 52. For more details about performing actions on flowcharts from the Monitoring page, refer to Controlling flowcharts from the Monitoring page on page 54.
Currently only the Status column supports sorting in both ascending and descending order.
The flowchart Statuses are described in the table under Flowchart statuses and actions on page 52. To sort flowcharts in ascending order
1
Click the Monitoring link in the navigation pane. You see the Monitoring page.
Click the heading for the column by which you want to sort the list of campaigns and flowcharts. The Monitoring window refreshes; the list of flowcharts appears in ascending order, first by campaign, then by the column you selected. If you sorted by the Run Status column, a sort icon appears next to the column head, with an upwardpointing arrow indicating that the sort order is ascending. To sort flowcharts in descending order by Run Status
50
Unica Confidential
Operational monitoring
Sort the Monitoring display list by clicking the Run Status column head. The Monitoring window refreshes; the list of flowcharts appears in ascending order, first by campaign, then alphabetically by Run Status. A sort direction icon appears next to the column head, with an upward-pointing arrow indicating that the current sort order is descending.
Click the sort direction icon. The Monitoring window refreshes; the list of flowcharts now appears in reverse Run Status order by campaign. The sort direction icon now has a downwardpointing arrow, indicating that the current sort order is descending.
Note
If you leave the Monitoring page and return to it, the flowcharts again display in the default sort order (ascending by campaign name).
Click the Monitoring link in the navigation pane. You see the Monitoring page.
Click the linked campaign name for the campaign whose summary page you want to view. You see the summary page for the campaign whose name you selected. To view a flowchart
Click the Monitoring link in the navigation pane. You see the Monitoring page.
Version 6.4
Unica Confidential
51
Click the linked flowchart name for the flowchart you want to view. You see the flowchart whose name you selected, in Read mode.
Click the Monitoring link in the navigation pane. You see the Monitoring page.
Click the Refresh link at the top right of the Monitoring window. The window refreshes with current data.
Description
The flowchart is running.
Valid Actions
Suspend Stop
52
Unica Confidential
Operational monitoring
Description
The flowchart was paused during running from the Flowchart Run menu. When a flowchart is paused, the process remains, guaranteeing that no work is lost when the flowchart run is continued. Note that with the Pause action, system resources are not released (CPU utilization stops, but memory is not freed). You can continue running a paused flowchart from the flowchart Run menu. For details about pausing and continuing a flowchart run, refer to Flowcharts in the Affinium Campaign Users Guide.
Valid Actions
None
The flowchart Suspend action has been initiated from the Monitoring page and the flowchart is transitioning to this status. The flowchart Suspend action has completed and the flowchart run is in a suspended state. The process is shut down and system resources are released; a placeholder remains to enable restarting the flowchart run at the point at which it was suspended.
None
You can resume running a suspended flowchart using the Resume button on the Monitoring page. NOTE: Any work for process boxes that were running at the time the Suspend command was issued is lost, and will be rerun when the flowchart run is resumed. Please be aware that re-running a process box might result in incorrect behavior. For example, suspending then resuming a Snapshot process in Append mode might result in duplicate data being written. The run completed successfully.
Resume
None
Version 6.4
Unica Confidential
53
Description
The flowchart run was stopped either by a user or due to error. For details about stopping a flowchart from the Flowchart Run menu, refer to Flowcharts in the Affinium Campaign Users Guide. The run failed due an unhandled error or a server error.
Valid Actions
None
None
Stopping a running flowchart Suspending a running flowchart Resuming a suspended flowchart You can also Pause, Continue or Stop a flowchart from the Run menu on a flowchart page. The Pause and Continue actions are only available from the flowchart Run menu. For more details, refer to the chapter on Flowcharts in the Affinium Campaign Users Guide.
Note
On the Monitoring page, locate the flowchart that you want to stop. You see its status and the available action buttons. Click the Stop button next to the flowchart status.
54
Unica Confidential
Operational monitoring
The flowchart stops. Its status on the Monitoring page changes to Run Stopped and the status indicator color changes to red.
When you Suspend a flowchart, the run process ends, and system resources are released. A placeholder remains so that you can Resume running the flowchart at the point at which you suspended it. This is different from Pausing a flowchart (from the flowchart Run menu). When you Pause a flowchart, the process remains, and continues to use system resources.
On the Monitoring page, locate the flowchart that you want to suspend. You see its status and the available action buttons. Click the Suspend button next to the flowchart status.
The Suspend process starts. The flowcharts status on the Monitoring page changes to Run Suspending and the color of the status indicator changes to yellow. In Run Suspending status, you cannot perform any actions on a flowchart. When the Suspend process completes, the flowcharts status changes to Run Suspended; the color of the status indicator remains yellow.
On the Monitoring page, locate the suspended flowchart that you want to Resume. You see its status and the available action buttons.
Version 6.4
Unica Confidential
55
The flowchart resumes running. Its status on the Monitoring page changes to Running and the color of the status indicator changes to green.
56
Unica Confidential
3 USING TABLES
This chapter provides information that Affinium Campaign administrators need for understanding and mapping tables. Key topics include: User tables System tables Managing table catalogs Creating custom campaign and offer attributes
Unica Confidential
57
User tables
User tables (usually customer or product database tables) are the data sources that you map into Affinium Campaign to make the data available to processes. Generally, when you work on user tables in Affinium Campaign, the tables are mapped to flat files or to tables in databases. Affinium Campaign supports the following types of user tables:
Base record tables A base record table identifies potential contacts such as individuals, businesses, and households, where you want to direct marketing campaigns. This table must minimally contain a field with an identifier for each potential member of an audience; these identifiers need not be unique. You can assign one or more audience levels to these identifiers and any number of foreign keys and other fields. You can define any number of base tables and map base tables to flat files or a table in a relational database. If you map a base table to a flat file, the flat file must contain all information necessary for the campaign because no dimension tables are supported for flat files.
Dimension tables A dimension table contains information that augments a base table; for example, demographics based on ZIP code, accounts belonging to a customer, order transactions belonging to a customer, and so on. You can define any number of dimension tables. In each dimension table that you define, you must specify one or more keys for joining the dimension table to a base table.
General tables You can map a free-format table for exporting data from Affinium Campaign to a flat file with data dictionary or to a relational table in a database. General tables are used by the Snapshot process to pass information between Affinium Campaign and other applications, to store historical information, or to generate contact and mailing lists.
58
Unica Confidential
System tables
System tables
System tables store session and campaign information, organize application data, populate values in the user interface, and maintain data for reporting. . The system tables required for using Affinium Campaign are automatically created when you install Affinium campaign, and are initially empty. They are populated when you:
Enter information in certain fields (for example, when you create a new version, a new entry is created in the Treatment Version table); Create definitions (for example, when you define custom macros and derived fields); Create various elements in sessions and campaigns.
In addition, you can also use any tool that can add records into the database in which the system tables are stored, to populate these tables. You can view, manage, and map all the tables supported by Affinium Campaign by selecting the Administration link in the main navigation pane then selecting Manage Table Mappings from the list of administrative tools. On the Table Mappings window, select the Show System Tables option. For a list and descriptions of the system tables, see Appendix A, System Tables, on page 161. For details about storing system tables, refer to Storing system tables in databases on page 90.
Note
Campaign does not support case-sensitive table names. For example, myTable and MYTABLE are seen as the same table, not two different tables. When you name tables in Campaign, make sure that the names you select are unique, regardless of case; otherwise, unpredictable behavior might result.
Version 6.4
Unica Confidential
59
Note
Affinium Campaign versions 5.1 and higher no longer support mapping system tables to flat files; in these versions you should only map system tables to database tables.
Click the Administration link in the navigation pane. You see the list of Administrative Tools.
Click Manage Table Mappings. You see the Table Mappings window, as shown in Figure 3-1. By default, the Show System Tables option is selected.
Figure 3-1 System tables Table Mappings window
Select an unmapped table, or unmap a table by selecting it and then clicking the Unmap Table button. With an unmapped table selected, click the Map Table button.
60
Unica Confidential
System tables
The Specify Flat File Or Database Table window appears, as shown in Figure 3-2. By default, the Map to Existing File option is selected; however, Affinium Campaign versions 5.1 and higher no longer support mapping system tables to flat files. In these versions you should only map system tables to database tables.
Figure 3-2 Specify Flat File or Database Table window
Select the Map to Existing Table in Selected Database option. The Select DataSource box becomes enabled.
Select the database to which you want to map the table, then click Next. You see the Specify Source Database Table window, as shown in Figure 3-3.
Version 6.4
Unica Confidential
61
From the Source Table drop-down list, choose the database table to which you are mapping. The fields required in the table from which you are mapping are displayed in the box on the right. When you have selected a table, the fields in your selected source table are displayed in the box on the left.
Modify the two lists of fields to indicate which fields map to which. Select fields in the boxes and use the Add>>, << Remove, Up1 and Down1 buttons to move them into and out of the lists, and change their order in the lists. When you have finished defining the corresponding fields in the table for mapping, click Finish. You are returned to the Table Mappings window. You see the table you have mapped in the list of tables, with the corresponding data source table name.
62
Unica Confidential
System tables
Mapping to an existing fixed-width flat file Mapping to an existing table in a database Mapping to a queue table in a UDI server
For information on how to create a new flat file or database table for mapping, see Exporting data from Campaign on page 82.
Data that you want to change in Campaign is stored in a flat file You want to export Campaign data to an existing flat file
From the Admin menu > Tables->Table Mappings window, select New Table. From the Summary tab of the Select process, select New Table. From a process that supports an extract operation (like Snapshot), select NewTable from the Export To pull-down menu.
The Select the Table Type window appears, as shown in Figure 3-4. A list of table types displays in the Table Types box. You can click on a table type to view information about it in the Description box to the right.
Version 6.4
Unica Confidential
63
From the Table Types list of tables to map, select either a Base Record Table or a General Table, then click Next to continue. The Specify Flat File Or Database Table window appears, as shown in Figure 3-5.
Note
You cannot map a Dimension Table to a flat file; you can only map a Dimension Table to a database table. For more information, see Mapping a user table to a database table on page 76.
64
Unica Confidential
System tables
Select Map to Existing File, then click Next. The Specify Source Date File window appears, as shown in Figure 3-6 with Delimited File selected as the default.
Figure 3-6 Source data file and Data Dictionary window
a Select the Fixed Width radio button. The Specify Source Data window appears,
Version 6.4
Unica Confidential
65
b Specify the path and filename for the new source file and data dictionary.
You can enter these values directly in the Source File and Dictionary File fields or use the Browse button to invoke a file selection window.
Note
Selecting a .dat file will automatically populate the data dictionary field with the same path and filename, except with a .dct extension. You can override the default if desired.
You can also override the field lengths set in an existing data dictionary by editing the data dictionary. For details, refer to Overriding the preset field lengths in output files on page 93.
c When you are satisfied with your choices, click Next.
The Specify the New Tables Fields window appears, as shown in Figure 3-8.
If the flat file being mapped is a delimited file, keep the Delimited File option selected for the File Type, and supply the following information:
If the first row of data in the file contains field names, select the First Row of Data Contains Field Names checkbox. Select the type of field delimiter used in your flat file from the Field Delimiter pull-down menu. The choices are TAB, COMMA, and SPACE.
66
Unica Confidential
System tables
Select the qualifier used in your flat file from the Qualifier pull-down menu. The choices are NONE, SINGLE QUOTE, and DOUBLE QUOTE. This tells to Affinium Campaign whether or not the fields are made up of strings delimited by single or double quotation marks. Enter the name of the source file in the Source File dialog box or click the Browse button. When you are satisfied with your choices, click the Next button to continue. The Specify the New Tables Fields window appears, as shown in Figure 3-8.
Specify the fields to use in the new table. By default, all fields are selected.
Note
When you are mapping to a delimited flat file, you also have the ability to override the field type that is automatically detected by Campaign (Campaign samples the first 100 lines of the file).
Select a field by clicking the name of the field in the list. Select more than one consecutive field using Shift+click (holding down the Shift key while clicking the first and the last field to select).
Version 6.4
Unica Confidential
67
Select multiple non-consecutive fields using Ctrl+click (holding down the Ctrl key while selecting fields). You can also use this to toggle the inclusion of a field in the current selection. This determines the order in which fields are presented in Affinium Campaign.
When you have finished specifying the fields in the new table, click Next. The Specify Table Name and Field Information window appears, as shown in Figure 3-9.
Figure 3-9 Specify Table Name and Field Information window
Specify the Affinium Table Name. This is the name under which the table will appear in Affinium Campaign. You can accept the default or give the table a different name by editing the value in the Affinium Table Name field. This name must be unique within the current flowchart and can contain letters, numbers, and underscores (_). Other characters are automatically removed. If you are mapping a General Table, this is the final step. Click Finish when you are done.
68
Unica Confidential
System tables
You can change the Affinium field names that are paired with the source field names. These are the field names under which the mapped fields will appear in Affinium Campaign. To change a field name, follow these steps:
a In the New Table Fields window, click to select the line containing the source
field/Affinium field name pair that you want to edit. The Affinium field name value appears below in Affinium Field Name.
b Edit the entry in the Affinium Field Name field. c Click on the next field line you want to edit, to continue editing Affinium field
name values.
d When you have finished, click Next to continue.
The Specify Selected Tables Audience Level and Assign ID Fields window appears, as shown in Figure 3-10.
Figure 3-10 Specify Selected Tables Audience Level and Assign ID Fields
You can also access this window when you remap a window from the Admin>Tables menu.
Version 6.4
Unica Confidential
69
An audience is the target entity (for example, Household, Customer, or Account). An Audience Level is defined by a key and specifies how you uniquely identify, count, and select an audience. For example, your table might have an audience level Customer represented by a CustID field which uniquely identifies a customer.
7
list. Initially, the audience level drop-down list is blank, because you have not yet created any audience level entries. These are created when you enter and assign them through this process and appear on the drop-down list from then on. The audience level name should be singular (for example, Household) for greater readability in the Audience process (and other processes).
b From the Select ID Fields for this table window, select the appropriate fields
that represent this audience level from the drop-down list. If you selected a previously-created audience level, the previously used fields are displayed in the sample ID fields for the Audience level pane. If these fields exist in the current table, they are selected by default in the Select ID Fields for this table area. If you change these fields, the data type (text or numeric) must match the previously specified fields.
c Specify whether or not the audience level is normalized.
Enable This audience level is normalized in this table if the audience level is normalized in this table. An audience level is normalized if the combination of specified fields uniquely identifies a row in the table.
d Click Next to continue.
This audience level is automatically set as the default audience for this table, and the Specify Additional Audience Levels window appears, as shown in Figure 3-11.
70
Unica Confidential
System tables
You can optionally specify an unlimited number of additional audience levels that are defined in this table. Alternate audience levels can be used to switch audience levels or for scoping a selection (for example, one customer per household). For example, your table might have a HHID field which identifies a Household. To use the Audience process to switch between or work within Customer and Household levels, you must add an additional audience level, Household, during the table mapping session. To specify an additional audience level, click the New button. You can also choose to edit or remove an audience level by clicking on the appropriate buttons. The Audience Level and ID Fields window appears, as shown in Figure 3-12.
Version 6.4
Unica Confidential
71
normalized.
d Enable Set As Selected Tables Audience Level if you want to set the current
The audience level you have defined appears, as shown in Figure 3-13. You can repeat these steps to define as many audience levels as desired.
72
Unica Confidential
System tables
The Specify Fields for Which a Stored List of Values Will be Computed window appears, as shown in Figure 3-14
Figure 3-14 Specify Fields for Which a Stored List of Values Will be Computed window
Version 6.4
Unica Confidential
73
11 (Optional) In this step, you can choose to pre-compute lists of distinct values for
selected fields. This can improve performance later when users profile these fields as they are constructing queries. For more information on profiling, see the Affinium Campaign Users Guide. To specify fields for pre-computed values, follow these steps:
a Specify whether you want to allow real-time profiling. Real-time profiling is
a powerful feature of Affinium Campaign that allows you to view and use characteristics of a field (values and distribution) while you are building a flowchart. When working with large databases, however, frequent profiling can make a significant impact on performance. For this reason, Affinium Campaign gives you the ability to disable this option. If you elect to pre-compute selected fields, you should disable real-time profiling, to prevent users from recomputing the pre-computed list of values when profiling. To disallow real-time profiling, clear the the Allow real-time profiling checkbox (real-time profiling is enabled by default). If you disallow real-time profiling, users will be unable to profile fields, but will be able to see data from pre-computed sources, if pre-computing has been configured for the selected fields.
b Select the fields for which you want a list of distinct values pre-calculated.
Affinium Campaign stores this information in flat files. When you profile one of the pre-computed fields, a pre-calculated list appears first, and then counts are populated. However, the values that are in the list but are not yet encountered in the data subset will appear with a zero count. Typically, this option is most useful if a field contains a limited number of values. You may want to select all fields that have fewer than 1000 distinct values in them. This feature is very useful when you profile a field to see only the distinct values it contains, and not counts. For example, if you profile the GENDER field, and your database contains a million males (M) first, and then a million females (F) you would see only M until the profile process reach the first F in the one million and first row.
74
Unica Confidential
System tables
By pre-calculating the distinct values, the value M and F are immediately displayed. This is especially useful when a user is profiling a field merely to double-click a value to insert it into a query.
12 (Optional) From the Specify the Fields for Which a Stored List of Values Will be Com-
puted window, you can also choose to have the field data pre-defined in a table using the Configure Data Sources option. This allows users to access a lookup table rather than the raw data source when profiling. If fields cannot be pre-defined in a table, the Configure Data Sources button will be greyed out. After selecting fields to be pre-computed (see Step 11b above), follow these steps:
a From the Specify The Fields For Which A Stored List Of Values Will Be Computed
window, click the Configure Data Sources button. The Pre-Computed Field Configuration window appears, as shown in Figure 3-15.
Figure 3-15 The Pre-Computed Field Configuration Window
Data Computed By Affinium This is the default behavior whenever fields are selected for precomputation. Click OK to confirm your choice.
Version 6.4
Unica Confidential
75
Table Name select an existing table to which you want to store these values Field Containing Values specify the field in that table that holds the values, or categories, for the counts Field Containing Counts specify the field in that table that holds the count for each value
Affinium stores all pre-computed profile counts for the selected field in the designated table.
c Click Next Field to configure another field for pre-computation. d Click Previous Field to review the pre-computing configuration for a field. e Click OK to close the Pre-Computed Field Configuration window, saving your
changes. You are returned to the Specify the Fields for Which a Stored List of Values Will be Computed window.
f
When you have completed all the information required for specifying fields for pre-computation, click Finish to complete the table mapping process. You can edit or remap the table at any time.
Data is being mapped to a Campaign system table Data that you want to change in Campaign is stored in a database You want to export Campaign data to a table in an existing database
76
Unica Confidential
System tables
From the Administration link on the navigation pane, select Manage Table Mappings. In the Table Mappings window, select Show User Tables, then click New Table From a flowchart page in Edit mode, select Admin menu > Tables->Table Mappings window, New Table From the Summary tab of the Select process, select New Table From a process that supports an extract operation (like Snapshot), select NewTable from the Extract pull-down menu.
The Select the Table Type window appears, as shown in Figure 3-4. A list of table types appears in the Table Types box. You can click on a table type to view information about it in the Description box to the right.
2
Select the table type you want to create. You can select Base Record, Dimension, or General Table from the list. Click Next to continue. The Specify Flat File Or Database Table window appears, as shown in Figure 3-16.
Version 6.4
Unica Confidential
77
4 5
Select Map to Existing Table in Selected Database. Select the source database from the Database Name list, then click Next to continue. The Specify New Tables Source Database and Fields window appears, as shown in Figure 3-17.
78
Unica Confidential
System tables
Figure 3-17 Specify New Tables Source Database and Fields window
Select the source table from the drop-down list in the Source Table field. Only tables to which you have read access will be displayed. When you have selected a table, all of the fields from that table are displayed. (Optional) Add, remove, or change the order of fields, using the Add, Remove, Up 1 and Down 1 buttons. Click Next. Depending upon the type of table you are mapping to, follow these steps: If you are mapping to a Base Table:
a Specify one or more audience levels. b After you have specified audience levels, if dimension tables exist, the Specify Relationship to Dimension Tables window will appear, as shown in
Figure 3-18.
Version 6.4
Unica Confidential
79
Check the box under the Related heading for any dimension table that is related to the base table you are creating. If you identified a dimension table as related to the base table, specify key fields to use in the New Table Key Fields To Use box.
c When you are satisfied with your choices, click Next. The Specifying Base Table Relationships window appears, as shown in Figure 3-20 d Specify the fields for which a stored list of values will be calculated.
If you are mapping to a General Table: If you are mapping to a general table, the Specify Table Name and Field Information window appears, as shown in Figure 3-9. Enter the information required on the window, then click Finish. If you are mapping to a Dimension Table: If you are mapping to a dimension table, follow these steps:
80
Unica Confidential
System tables a The Specify Table Name and Field Information window appears, as shown in
Figure 3-9. Enter the information required on the window, then click Next.
b The Specify The Dimension Tables Key Fields window appears, as shown in
Figure 3-19.
Figure 3-19 Specify the Dimension Tables Key Fields
Select one or more key fields by clicking on the Key Fields <Click here ...> hotspot. Select the checkbox to indicate whether the selected key field(s) are normalized in the table. By default, this checkbox is selected. Select the method by which your dimension tables are joined (inner, outer, or auto). By default, auto is selected as the table join method.
c When you are satisfied with your choices, click Next. The Specifying Base Table Relationships window appears, as shown in Figure 3-20.
Version 6.4
Unica Confidential
81
Select a related base table from the Base Record Tables list. To select a base table, click on the box to the left of the name of the table. The selected base table key field appears in the Key Field To Use dropdown list. Select the base tables key field from the Key Field To Use drop-down list.
e When you are satisfied with your choices, click Next. The Specify Fields and
Specify the fields for which a stored list of values will be calculated. For details, refer to Step 11 under To map a user table to a flat file.
82
Unica Confidential
System tables
Creating table and flat file operations are only supported in processes that output Campaign data, such as Snapshot, and not from the Admin menu >Tables >Table Mappings menu. The following sections discuss how to perform these tasks in detail. For information on mapping export data to existing flat files or tables, see Mapping user tables on page 62.
This operation cannot be performed from the Admin menu ->Tables ->Table Mappings ->New Table window. It can only be performed from a process that supports exporting data, such as Snapshot.
From the Export To drop down menu in a process that supports exporting (such as Snapshot) select New Table. The New Table Definition window appears, as shown in Figure 3-4.
A list of table types appears in the Table Types box. You can click on a table type to view information about it in the Description box to the right. Select either Base Record Table or General Table.
Note
Click the Next button. The Specify Flat File Or Database Table window appears, as shown in Figure 3-21.
Version 6.4
Unica Confidential
83
Select Create New File, then click Next. The Specify the Target Data File window appears with Fixed-Width Flat File selected by default, as shown in Figure 3-22.
Figure 3-22 The Specify the Target Data File window
84
Unica Confidential
System tables
If you are creating a delimited flat file, follow the directions for Mapping user tables on page 62. If you are creating a fixed-width flat file, you have two choices:
If you are not using an existing data dictionary, specify the path and filename for the new target file and data dictionary or use the Browse button to bring up the file selection window. If you are using an existing data dictionary, do the following:
a Select the Create Table Based on Existing Data Dictionary checkbox. b Enter the name of the source dictionary file, target data file, and target
dictionary file or use the Browse button to bring up the file selection window. For more information on data dictionaries, see Creating or editing a data dictionary on page 91.
6
When you have finished specifying the target data file information, click Next. The Specify the New Tables Fields window appears, as shown in Figure 3-23.
Figure 3-23 The Specify the New Tables Fields window
Version 6.4
Unica Confidential
85
Specify fields in the new table. Select the source table fields that you want in the new table, and click Add to add them to the New Table Fields list. By default, all available fields from your source table appear. You can also remove fields or change the order, using the Remove, Up 1 and Down 1 buttons.
When you have finished specifying the fields for the new table, click Next. The rest of the process is identical to mapping a fixed-width flat file, described in Mapping a user table to a flat file on page 63.
Note
The newly defined table should appear in the Export to Table drop-down list. If it does not, see Remapping a table on page 87 for more information.
This operation cannot be performed from the Admin menu ->Tables ->Table Mappings window. It can only be performed from a process that supports exporting data.
From the Export To drop down menu in a process that supports exporting (such as Snapshot) select New Table. The Select the Table Type window appears, as shown in Figure 3-4.
A list of table types appears in the Table Types box. You can click on a table type to view information about it in the Description box to the right. Select either Base Record or General Table.
Click Next. The Specify Flat File or Database window appears, as shown in Figure 3-24.
86
Unica Confidential
System tables
4 5
Select Create New Table in Selected Database. Highlight the database in which you want to create the new table. All databases known to Affinium Campaign are listed. If you do not see your database, see your Affinium administrator.
Click Next. The Specify the New Tables Fields window appears, as shown in Figure 3-8.
The remainder of the process is identical to mapping a Base Table or a General Table to a database, described in Mapping a user table to a database table on page 76. Follow the steps for mapping a Base or General Table.
Remapping a table
Both user and system tables can be remapped from the Table Mappings window. Re-mapping tables allows you to repeat all the steps originally used to map the table, except for the selection of the table type.
Version 6.4
Unica Confidential
87
To change the table type of a user table, you must un-map the table and then create or map it again, following the instructions in Mapping user tables on page 62 or Exporting data from Campaign on page 82. When you remap a table, you can change information on any of the windows in the process. The system displays all previous selections as defaults. To re-map a table
1
Select Admin menu > Tables. The Table Mappings window appears with user tables listed as the default, as shown in Figure 3-26. If you want to remap a system table, select the System Tables option. Select the table that you want to re-map. You can select only one table at a time. If you select multiple tables, the Re-Map Table button is greyed out and becomes unavailable.
3 4
Click the Re-Map Table button. Follow the steps as described in Mapping user tables on page 62.
Unmapping a table
Unmapping a table removes it from the list of tables and deletes it from the current Affinium Campaign flowchart, although all source files remain intact.
Note
You cannot reverse this process. To restore an unmapped table, you must map it as if for the first time or reload it from a table catalog (for details, see Managing table catalogs on page 99). Unmapping system tables without remapping them can cause problems if the unmapped tables are referenced within a campaign.
To unmap tables
1
Select Admin menu > Tables. The Table Mappings window appears with user tables listed as the default, as shown in Figure 3-26. If you want to unmap a system table, select the System Tables option.
88
Unica Confidential
System tables
Select the tables that you want to unmap. You can select one or more tables.
Click the Unmap Table button. Affinium Campaign will ask you to confirm the unmapping.
Figure 3-25 Confirming the unmapping
Click OK.
Version 6.4
Unica Confidential
89
When you initially open the Table Mappings window, the user tables mapped in the current flowchart are displayed. If you have no mapped user tables, the list is empty. To view system tables, select the Show System Tables option. The Table Mappings window is the only place in Affinium Campaign where you can view, map, unmap, and remap every type of user table (base, dimension, and general), as well as unmap and remap system tables, if you have the appropriate privileges.
90
Unica Confidential
relevant to your Campaign efforts (marketing data or promotional history data, for example). To store system tables in a database
1
Create the tables in the target database. To create the tables in the target database, you will need to use the appropriate database DDL utility. The following are the supported DDL database utilities:
DB2 <Affinium_root>\campaign\ddl\ac_systab_db2.sql Informix <Affinium_root>\campaign\ddl\ac_systab_inf.sql Oracle <Affinium_root>\campaign\ddl\ac_systab_ora8.sql SQL Server <Affinium_root>\campaign\ddl\ac_systab_sqlsvr.sql Sybase <Affinium_root>\campaign\ddl\ac_systab_sybIQ12.sql Teradata <Affinium_root>\campaign\ddl\ac_systab_tera.sql
When you execute the utility appropriate to your database, it creates the table definitions in a database or schema of your choice. Each DDL contains paired drop and create statements so that it can be re-run easily. When you run the DDL for the first time, you receive errors for each of the drop statements as the tables will not exist; you can ignore these errors.
2
(SQL Server and Oracle Only) If you are using SQL Server, then you also need to create an ODBC DSN for the relevant database on the Affinium Campaign Server, as Affinium Campaign routes its SQL requests to SQL Server via the Microsoft ODBC driver. If you are using Oracle, the Oracle client must be installed on the Affinium Campaign Server.
Version 6.4
Unica Confidential
91
To open a data dictionary, find the data dictionary you want, then open it using Notepad or any other text editor. The file you see will look similar to the following example:
CellID, ASCII string, 32, 0, Unknown, MBRSHP, ASCII string, 12, 0, Unknown, MP, ASCII Numeric, 16, 0, Unknown, GST_PROF, ASCII Numeric, 16, 0, Unknown, ID, ASCII Numeric, 10, 0, Descriptive/Names, Response, ASCII Numeric, 10, 0, Flag, AcctAge, ASCII Numeric, 10, 0, Quantity, acct_id, ASCII string, 15, 0, Unknown, src_extract_dt, ASCII string, 50, 0, Unknown, extract_typ_cd, ASCII string, 3, 0, Unknown,
You can change information as needed in the file, making sure that the data that will be stored in the associated table can use the parameters you are setting. To apply the settings, you have to save, close, and reopen the flowchart. You can edit an existing data dictionary file, or create a new one. To create a new data dictionary
1
Create an empty .dat file (length = 0) and a corresponding .dct file. The format is: <Variable_name>, < ASCII string or ASCII Numeric>, <Length_in_bytes>, <Decimal_point >, <Format>, <Comment> The <Decimal_point > value is valid for numeric files only. Affinium Campaign has the following valid formats:
Output Money Date Time Telephone/Access # Flag Categorical Quantity Descriptive/Names City
92
Unica Confidential
All valid date formats are supported. See the Affinium Macros Users Guide for more information on valid date formats. If you do not want to specify the format, use Unknown, as in the following:
acct_id, ASCII string, 15, 0, Unknown, hsehld_id, ASCII Numeric, 16, 0, Unknown, occptn_cd, ASCII string, 2, 0, Unknown, dob, ASCII string, 10, 0, Unknown, natural_lang, ASCII string, 2, 0, Unknown, commun_lang, ASCII string, 2, 0, Unknown, 2
Create a new General table from within a process (or by selecting Admin menu > Tables) and specify the appropriate .dat and .dct file.
Delete the .dat file. Edit the .dct file and change the field sizes as desired. Save, exit, and reload the Affinium Campaign flowchart.
Version 6.4
Unica Confidential
93
The reload allows the system to re-read the new values in the .dct file.
Create the Campaign Tag and Offer Tag tables in your database. The Campaign Tag table must have a column for the campaign ID. The Offer Tag table must have a column for the offer ID in addition to columns for the information you plan to store.
Map the Campaign Tag table and the Offer Tag tables into Campaign. For more information, see Mapping a user table to a database table on page 76. You can now add custom attributes when you create offers and campaigns that is written to these system tables. For more information on creating campaigns and offers, see the Affinium Campaign Users Guide.
94
Unica Confidential
Edit the UA_CampaignExtAttr system table in your database to include a column for the new attribute. We recommend that you name the new attribute in a way that can be understood by users, because the column name will appear verbatim on the Summary tab of all campaigns. For example, if you want to add a custom attribute to capture the vendor used for each campaign, create a new column called Vendor_Name.
If you want to create a drop-down list from which users can select a pre-defined value for the attribute, create or edit the unica_fldinfo.xml file. The unica_fldinfo.xml file must be created in the same directory where the unica_tbmgr.bin file is located, usually in the Affinium/Campaign/conf directory. Figure 3-27 shows a sample unica_fldinfo.xml file that defines a custom campaign attribute called Vendor_Name that has three choices displayed in a drop-down list: First Vendor, Second Vendor, and Third Vendor.
Figure 3-27 Sample unica_fldinfo.xml file displaying custom campaign attribute
Version 6.4
Unica Confidential
95
Add a new fieldinfo tag (and all sub-tags) for the custom attribute you want to define. Edit the name attribute to exactly match the column name you defined in the UA_CampaignExtAttr system table. This field is casesensitive.
item
Add a new item tag for each value you want to appear in the drop-down list. Edit the value attribute to contain the text that you want to appear in the list.
3 4 5
Save the unica_fldinfo.xml file. Log in to Affinium Campaign. Map or re-map the the UA_CampaignExtAttr system table. When re-mapping, be sure to include the new column in the Fields to Include list.
6 7 8
Log out of Affinium Campaign. Log back in to Affinium Campaign. Verify that the new attribute appears correctly on a campaign. Automatic validation is performed based on the data type defined in the UA_CampaignExtAttr system table. Figure 3-28 shows how a new Vendor_Name custom attribute with drop-down list appears to a user.
96
Unica Confidential
Figure 3-28 Campaign Summary tab with a Vendor_Name selected by the user
Edit the UA_OfferExtAttr system table in your database to include a column for the new attribute.
Version 6.4
Unica Confidential
97
We recommend that you name the new attribute in a way that can be understood by users, because the column name will appear verbatim on each offer and offer version. For example, if you want an attribute that allows users to enter the entire cost for each offer, create a new column called Offer_Partner.
2
If you want to create a drop-down list from which users can select a pre-defined value for the attribute, create or edit the unica_fldinfo.xml file. The unica_fldinfo.xml file must be created in the same directory where the unica_tbmgr.bin file is located, usually in the Affinium/Campaign/conf directory. Figure 3-29 shows a sample unica_fldinfo.xml file that defines a custom offer attribute called Offer_Partner.
Figure 3-29 Sample unica_fldinfo.xml file displaying custom offer attribute
98
Unica Confidential
Add a new fieldinfo tag (and all sub-tags) for the custom attribute you want to define. Edit the name attribute to exactly match the column name you defined in the UA_OfferExtAttr system table. This field is casesensitive.
item
Add a new item tag for each value you want to appear in the drop-down list. Edit the value attribute to contain the text that you want to appear in the list.
3 4 5
Save the unica_fldinfo.xml file. Log in to Affinium Campaign. Map or re-map the the UA_OfferExtAttr system table. When re-mapping, be sure to include the new column in the Fields to Include list.
6 7 8
Log out of Affinium Campaign. Log back in to Affinium Campaign. Verify that the new attribute appears correctly on an offer. Automatic validation is performed based on the data type defined in the UA_OfferExtAttr system table.
Version 6.4
Unica Confidential
99
Easily save, load, and update your commonly used user tables; Create alternative data mappings (for example, to switch between a sample database and the production database).
You can save mapped tables to a table catalog, then use the same table catalog in other flowcharts. Affinium Campaign takes a copy of the table catalog as an internal catalog for each flowchart. This means you can:
Make changes to the table catalog in one flowchart, then propagate these changes to other flowcharts if you choose; Retain the internal catalog you first loaded for that flowchart, although you copy it to other flowcharts and make changes there; Make different changes to the internal catalogs of a number of different flowcharts, building from one template table catalog.
You view a list of tables in your internal table catalog using the Table Mappings window, which you access by selecting Admin menu > Tables. This section provides instructions for performing the following tasks with table catalogs:
Opening table catalogs Creating table catalogs Saving table catalogs Loading a stored table catalog Recomputing counts and values for tables
From a flowchart page in Edit mode, select Admin menu > Tables. The Table Mappings window appears, as shown in Figure 3-26.
100
Unica Confidential
All currently mapped tables appear in the Table Mappings window, which is organized into two lists, for the two types of tables, system and user. If you have not mapped any tables, the list is empty.
2
To view system tables, select the Show System Tables option. To view user tables, select the Show User Tables option (this is the default display option).
The table list pane displays a list of the selected tables. You can save, load, and update table catalogs by using the Save, Load, and Compute buttons.
From a flowchart page in Edit mode, select Admin menu > Tables, and map the user tables you want to save into the internal Table Catalog for that flowchart. All currently mapped user tables are saved in the table catalog. You cannot select only particular user tables to be saved. If you have tables mapped that you do not want to save in the table catalog, you must first unmap them. Or you can save the table catalog as is, then load it into a new flowchart and edit it there. For more information on mapping user tables, see Mapping user tables on page 62.
Click Save. The Save Table Catalog window appears, as shown in Figure 3-30.
Version 6.4
Unica Confidential
101
Enter a name for the table catalog. The name must be unique. It cannot contain any periods, apostrophes, or single quotes.
4 5
(Optional) Add a description for the table catalog in the Note field. (Optional) Enable/disable the Save with Database Authentication Information option.
If you disable Save with Database Authentication Information, you will need any database passwords each time you load the table catalog. If you enable Save with Database Authentication Information, the authentication information is saved and no database passwords will be needed.
Select a folder in which to save the table catalog. You can organize table catalogs in folders. Select an existing folder from the Items List, or click the New Folder button to create a new folder. If you do not select a specific folder, the current table catalog will be saved at the top level. The selected folder appears after the Save Under field.
Click Save.
102
Unica Confidential
The table catalog is saved as a .cat file with the name and in the location you have selected.
From a flowchart page in Edit mode, select Admin menu > Tables. The Table Mappings window appears, as shown in Figure 3-26.
Click the Save button. The Save Table Catalog window appears, as shown in Figure 3-31.
Figure 3-31 Save Table Catalog window
(Optional) In the Items List pane on the left, click to select the folder in which you want to save the table catalog. When you click on a table catalog folder to save the table catalog to, the name displays in the Save Under field, above (as shown in Figure 3-31).
Version 6.4
Unica Confidential
103
Enter a name in the Name field, including an extension. You can save a table catalog either as an Affinium catalog file (.cat) or as an XML (.xml) file. You must include the appropriate extension as part of the filename.
5 6
Enter a brief note about the table catalog, if desired, in the Note field. To save the authentication information with the table catalog, select the Save With Database Authentication Information box. If you select this option, users do not have to enter an authentication user name and password to access the data. For enhanced security, do not select this option.
Click the Save button. The table catalog is saved to the library, where you can use it in other flowcharts.
If you do this, you lose all previously mapped tables. If you want to be able to return to this set of table mappings, save them first into a table catalog (for instructions, see Creating table catalogs on page 101).
You can load a table catalog to replace the existing table mappings with the stored mapped tables in the saved table catalog. If you define the default.cat table catalog, each time you create a new flowchart it is loaded by default. However, if you set your browser to accept cookies and load a different table catalog, that catalog is loaded by default instead of default.cat. This is also true for stored dimension hierarchies. To load a stored table catalog
1
From a flowchart page in Edit mode, select Admin menu > Tables. The Table Mappings window appears, as shown in Figure 3-26.
104
Unica Confidential
Choose the appropriate option button to select whether, when the tables are loaded, you want to clear or to overwrite the existing mappings. By default, the option to clear existing mappings is selected. Click OK. The Stored Table Catalogs window appears, as shown in Figure 3-32.
Figure 3-32 The Stored Table Catalogs window
Select the name of the table catalog that you want to load. You can only select one catalog at a time. When you click on the name of a table catalog (with .cat extension), its information appears in the Info box and the Load Catalog button is enabled.
Click the Load Catalog button. The selected catalog is loaded. You see the details of the table(s) in the new catalog displayed in the Table Mappings window.
Version 6.4
Unica Confidential
105
Update all or selected tables from the database or data dictionaries; Recompute the list of distinct values for currently mapped tables.
From a flowchart page in Edit mode, select Admin menu > Tables. The Table Mappings window appears, as shown in Figure 3-26.
If you only want to compute record counts and values for some of your tables, select these tables in the list of tables. You can use Ctrl+click to select more than one table at a time. If you want to compute record counts and values for all of the tables displayed in the Table Mappings window, you do not need to select any tables.
Click the Compute button. The Recompute window appears. If you have not selected any particular tables for computing, by default, the Recompute Record Counts and List of Distinct Values for All Tables option is selected, and the other option is disabled. If you have selected particular tables for computing, the Recompute Record Counts and List of Distinct Values for Selected Tables option is selected. The option to compute All Tables is available.
Note
If you have not selected any tables for computing and want to enable the option to compute values for selected tables, click Cancel on the Recompute window. The window closes and you are returned to the Table
106
Unica Confidential
Mappings window, where you can select the tables for which you want the record counts and values to be computed.
4
When you are satisfied with your selection of tables for computing, click OK. You see a progress window as the values are computed. You are returned to the Table Mappings window when the computation is complete.
Version 6.4
Unica Confidential
107
108
Unica Confidential
4 DIMENSION HIERARCHIES
Dimension hierarchies are fundamental Online Analytical Processing (OLAP) data constructs. The following sections discuss these areas in more detail. Key topics include: Overview Mapping dimensions Updating dimension hierarchies Loading dimension hierarchies
Unica Confidential
109
Overview
Dimension hierarchies are fundamental Online Analytical Processing (OLAP) data constructs which, like strategic segments, you can make available globally in a Select process or use as the basis for constructing cubes. The most commonly specified dimensions are time, geography, product, department, and distribution channel. However, you can create any kind of dimension that relates to your business or campaign. As the building blocks of cubes, dimensions become the basis for a variety of reports (total sales across all products at increasing aggregation levels, crosstabular analysis of expenses versus sales by geography, and so forth). For more details about cubes, refer to the section on the Cube process in the Affinium Campaign Users Guide. In Campaign, the granular breakdown of a dimension is referred to as a Dimension Hierarchy. For example, if you create a dimension based on age, everything within that dimension belongs to the Age dimension hierarchy. A dimension hierarchy is made up of various Levels, which in turn are comprised of individual bins, referred to in Campaign as Dimension Elements, or Elements for short. Campaign supports:
Dimensions that are comprised of an infinite number of levels and elements Data points built as input to customer analytic reporting and visual selection Roll ups into unlimited number of categories to support drill down capability
The following examples illustrate a very basic dimension hierarchy that you would create in your datamart and then map into Campaign.
Example 1
Age Dimension Hierarchy Lowest level: (21-25), (26-30), (31-35), (36-45), (45-59), (60+) Rollups: Young (18-35), Middle (35-59), Older (60+)
110
Unica Confidential
Overview
Example 2
Income Dimension Hierarchy Lowest level: >$100,00, $80,000 - $100,00, $60,000 - $80,000, $40,000 $60,000 Rollups: High (> $100,000), Middle ($60,000 $100,000), Low (< $60,000)
Define and create a hierarchical dimension in a table or delimited flat file in your data mart Map this hierarchical dimension table or flat file to a dimension in Campaign
When this hierarchical dimension is mapped into Campaign, Campaign performs the various roll-ups. The Campaign administrator or a UNICA consulting team creates the hierarchical dimension in the data mart. It is an operation external to Campaign. Also, the lowest level of the hierarchical dimension must use either raw SQL, a pure Affinium expression (no custom macros, user variables, or derived fields) to define the individual elements.
Dimension guidelines
You should consider the following when designing dimensions:
How dimensions relate to each other (for example, Age/Geography/ Timespan); Level of detail for each dimension and cube; Dimensions are not limited to a single cube; they can be used in many cubes; Dimensions must roll up cleanly across boundaries, so elements must be mutually exclusive and not overlap.
Version 6.4
Unica Confidential
111
Mapping dimensions
To map a hierarchical dimension to a Campaign dimension These instructions assume that a hierarchical dimension already exists in your data mart.
1
Access the Dimension Hierarchies window from one of the following places:
Note
The Admin > Dimension Hierarchies menu from a flowchart in Edit mode. The Administration > Manage Dimension Hierarchies link. Because almost all dimensions are used to create cubes, we recommend that you create dimensions from a flowchart in the Sessions area of the application.
112
Unica Confidential
Mapping dimensions
Click on the New Dimension button. The Edit Dimension window appears, as shown in Figure 4-2.
Figure 4-2 Edit Dimension window
Enter the following information about the dimension you are creating:
The name of the new dimension. A description of the dimension for future reference. The number of levels in the dimension. This should generally correspond to the hierarchical levels in the hierarchical dimension in the data mart to which you are mapping this Affinium dimension. If you are using this dimension as the basis for a cube, be sure that Elements are Mutually Exclusive is checked (by default, this option is checked). Otherwise, you will receive an error when you use this dimension to create a cube because the elements cannot overlap in a cube.
Click on Map Table. The Specify Whether The New Table is a Flat File or Database Table window appears, as shown in Figure 4-3.
Version 6.4
Unica Confidential
113
You are mapping the Affinium dimension to an existing file (default). You are mapping the Affinium dimension to an existing table in a database.
If you are mapping to an existing flat file, follow the instructions in To map a user table to a flat file on page 63. If you are mapping to an existing table in a database, follow the instructions in To map an Affinium table to a database table on page 77.
6
After you finish mapping your dimension, the Edit Dimension window appears with the dimension information for the new dimension, as shown in Figure 4-4.
114
Unica Confidential
Click OK. The Dimensions Window appears again with the newly mapped dimension visible. (Optional but recommended) You can store a dimension hierarchy for future use by clicking Save, as shown in Figure 4-1. If you store a dimension hierarchy you can retrieve it for another use rather than recreating it.
Cubes are comprised of dimensions which are based on strategic segments, so you must update dimensions whenever you update strategic segments.
Access the Dimension Hierarchies window from one of the following places:
Version 6.4
Unica Confidential
115
The Admin > Dimension Hierarchies menu from a flowchart page in Edit mode The Administration > Manage Dimension Hierarchies link
Select the dimension hierarchies you want to update (Use Shift+click or Ctrl+ click to select multiple items in the list) and click Update. OR Click Update All to update all dimensions.
Access the Dimension Hierarchies window from one of the following places:
The Admin > Dimension Hierarchies menu from a flowchart page in Edit mode The Administration > Manage Dimension Hierarchies link
Select the dimension hierarchies that you want to load (Use Shift+click or Ctrl+ click to select multiple items in the list) and click Load.
116
Unica Confidential
5 LOGGING
Campaign supports a variety log files that you can use to track flowchart activity. Logs and logging options are available from the following places in the application:
The Tools menu on a flowchart page in Edit mode The Administrative link on the navigation pane
The instructions in this chapter refer to the Tools menu on a flowchart page in Edit mode. The following sections discuss these areas in more detail. Key topics include: Log file location Setting logging levels Enabling logging Viewing log files Clearing logs
Unica Confidential
117
Chapter 5: Logging
Start/Stop/Pause/Continue flowchart run Server configuration settings at time of flowchart, branch, or process run Whether a flowchart is run from a client or from unica_svradm Start/Stop process Start and completion of data sorting System and campaign-related SQL queries Data retrieval status and number of records returned (logged before derived fields are calculated) Errors Stored trigger runs (as UI_RUN_Trigger trigger)
From the Tools menu of a flowchart, Select Tools > Logging Options. The Logging Options window appears, as shown in Figure 5-1.
118
Unica Confidential
From the Level menu, select one of the following logging levels:
Low Basic logging and start/stop notifications. Medium Low plus warnings and errors. High Low and medium plus informational messages. Custom Select from the list of available logged events.
Because log files can grow quickly when informational messages are logged (High), Medium or Low are the recommended choices.
3
To include process IDs (recommended and selected by default), check Include Process ID in Log Entries. To log system table access (recommended only for debugging), check Trace System Table Access. Click OK to save your selections and exit the utility.
Version 6.4
Unica Confidential
119
Chapter 5: Logging
Enabling logging
When you activate Enable Logging, Affinium Campaign sends flowchart-specific logging information to the log file. From the Admin menu of a flowchart, select Tools > Enable Logging to activate or deactivate this command:
When this option shows a check mark, logging is enabled. When no check mark appears, logging is disabled.
The log file contains benchmark information (date and timestamp) of each entry. It is also very useful for diagnosing problems with a flowchart.
From the Admin menu of a flowchart, select Tools > View Logs. The Log Files window appears (see Figure 5-2).
120
Unica Confidential
The Log Files window displays all .log files in the default log directory (you can navigate to another directory to read log files in a different location). The list is sorted on the name of the log files by default, but you can also sort on size or date/time modified by clicking on the appropriate column label.
2 3
Select the desired log file. Click Open. When you select a log file, it displays into a local Microsoft Notepad session, as shown in Figure 5-3.
Version 6.4
Unica Confidential
121
Chapter 5: Logging
Clearing logs
Clear Log empties the contents of Affinium Campaigns log file. To clear the log, from the Admin menu of a flowchart, select Tools > Clear Log.
122
Unica Confidential
6 TRIGGERS
Campaign allows you to define triggers to perform actions. This chapter provides the information you need to create and use your own triggers. Key topics include: Using triggers Tokens supported by triggers Affinium trigger (unica_actrg) Advanced settings relating to triggers
Unica Confidential
123
Chapter 6: Triggers
Using triggers
A trigger executes a command line, which can be a batch file, a script file, or a command. You can define triggers to perform virtually any action, such as opening an application or running a program. The trigger Send_Mail, for example, in Figure 6-2, opens an application (emailout.exe) that can send an e-mail message. You can define a trigger to perform tasks like the following:
Send an email notification upon completion of a campaign Send an email notification or perform some other task if a process fails Run a third-party modeling tool, such as SAS Run a Unix shell script to FTP a file Launch a customer database update Launch or trigger another Affinium flowchart Execute a run based on the receipt of some event
Affinium Campaign also supports the Affinium Trigger Utility (unica_actrg), which uses inbound triggers to control scheduling within a flowchart. All outbound triggers sent following a process run must be defined and added to the stored triggers library, which you use to define the outbound triggers sent through the Schedule process, for example. Trigger commands should return 0 on success and a non-zero value on failure. When you call a trigger in Affinium Campaign, you determine whether it is run synchronously or asynchronously. To run it synchronously, include a question mark (?) at the end of the trigger command.
Note
You can edit existing stored triggers or delete them from the stored triggers library. If you change the trigger name or delete a trigger that is used by a flowchart, the process(es) referring to that trigger will become
124
Unica Confidential
unconfigured and will be unable to run. You will need to edit the process to edit its reference to the changed trigger.
Token <CAMPCODE>
Description
The campaign code associated with the current campaign. Contact list specified in a contact process. (If the Contact List or Log
Where Used
processes), trigger on failure, trigger on
<CONTACTLIST>
is written to a file, the appropriate file name will replace the trigger token; if the Contact List or Log is written to a database table, the token will simply be removed.)
The log of the particular contact process. (If the Contact List or Log
<CONTACTLOG>
is written to a file, the appropriate file name will replace the trigger token; if the Contact List or Log is written to a database table, the token will simply be removed.)
The username of the Affinium Campaign Collaborate user. The owner of the campaign. The name of the current process. The ID of the current process.
Processes that support triggers,1 trigger on failure, trigger on success. Processes that support triggers,1 trigger on failure, trigger on success. Processes that support triggers.1 Processes that support triggers.1
Version 6.4
Unica Confidential
125
Chapter 6: Triggers
The ID of the current flowchart. The name of the current flowchart. Any user variable.
Processes that support triggers,1 trigger on failure, trigger on success. Processes that support triggers,1 trigger on failure, trigger on success. Processes that support triggers,1 trigger on failure, trigger on success.
Create and add a trigger to the stored triggers library Remove a trigger from the stored library View, edit, and move triggers Work with triggers in Campaign
Select Tools > Stored Triggers. The Stored Trigger Definitions window appears, as shown in Figure 6-1.
Figure 6-1 Stored Trigger Definitions
The Items List displays a list of all the currently defined triggers. Folders are listed with a plus sign to their left, and can be expanded and collapsed the same way as Available Fields within a table.
126
Unica Confidential
A description of the currently selected trigger appears in the Info pane to the right, as shown in Figure 6-1. If you click Run Trigger, a warning message will appear, giving you the option to cancel.
Click the New Item button. The data fields for the new item appear on the right, as shown in Figure 6-2.
Figure 6-2 Stored Trigger Definitions window New Item
You cannot use spaces in the string, but you can use underscores (_). This name must be different from any other triggers in the folder you want to save it (otherwise Affinium Campaign will prompt whether you want to overwrite an existing trigger). To rewrite an old definition, you can select an existing trigger name from the Items List.
(Optional) Enter a free-form text description in the Note field. You can provide a free-form text description of the trigger for documentation purposes. You also may want to keep a modification history of who modified the trigger, when, and what changes were made.
Version 6.4
Unica Confidential
127
Chapter 6: Triggers
(Optional) Select a folder to save the trigger to. Triggers can be organized in folders:
You can select an existing folder from the list and move triggers in and out of that folder. (The currently selected folder is shown after the Save Under field above the Item List.) You can create a new folder, by clicking on New Folder. You can create an unlimited number of folders (including nesting folders in a hierarchy) to organize and store your triggers.
To see if the trigger works as intended, click Run Trigger. Affinium Campaign runs the trigger as defined by the Trigger command and logs a run trigger event.
Note
The specified executable runs on the server and not on the client machine.
To view and/or edit the associated command, click the trigger name on the trigger list.
8 9
Click Save to save your changes. Click Close to exit the Stored Trigger Definitions window. To remove a trigger from the Stored Triggers Library
Select Tools > Stored Triggers. The Stored Trigger Definitions window appears (as shown in Figure 6-1).
2 3
Select the trigger you want to remove. Click Remove. Affinium Campaign will prompt you to confirm the removal.
Click OK.
128
Unica Confidential
5 6
Click Save to save your changes. Click Close to exit the Stored Trigger Definitions window.
Note
If a Schedule process refers to the removed trigger, that process will become unconfigured and will be unable to run once the trigger is removed. You will need to edit the process to remove its reference to the removed trigger.
Select Tools > Stored Triggers. The Stored Trigger Definitions window appears (as shown in Figure 6-1).
Select the desired trigger in the Items List. The Info area shows the detailed information for the selected trigger, including the actual trigger command.
You can edit any of the current values to change the name of the stored trigger, edit the trigger command, or change the folder/location where the trigger is stored.
Version 6.4
Unica Confidential
129
Chapter 6: Triggers
4 5
Click Save to save your changes. Click Close to exit the Stored Trigger Definitions window.
Although this section shows how to run unica_actrg manually, you can create a routine or other application that will automatically run the program as required.
Broadcasting triggers
To broadcast triggers to run Affinium campaigns, you need to run the Affinium Trigger Utility from the command line. Open a command prompt and go to the the bin subdirectory of the directory where you installed Affinium Campaign. The command to run the Affinium Trigger Utility is:
unica_actrg
Entering this command displays the usage information for the utility. The unica_actrg command has the following arguments:
-p <port>: The port that you want to use to run the utility. -s <server_name>: The name of the Affinium Campaign server that you want to use. -v: The version of the Affinium Trigger Utility that you entered this argument with.
<campaign_code> or <campaign_name> or -n <flowchart_name>: The name of the campaign or campaign code that contains all the flowcharts you want to run. Instead of specifying the campaign name or campaign code, you can specify -n and the name of a specific flowchart that you want to run.
130
Unica Confidential
<trigger1> <trigger2>... : The name of the trigger you want to use. You must specify at least one trigger. You can optionally specify multiple triggers.
You must specify these options and arguments in the following order:
unica_actrg [-p <port>] [-s <server_name>] [-v] [<campaign_code> | <campaign_name> | -n <flowchart_name>] <trigger1>,<trigger2>...
If you want to run all the flowcharts in a campaign, use the following syntax:
unica_actrg campaign_name trigger_name
To broadcast a trigger to a campaign, type unica_actrg, the campaign name for a specific campaign, followed by the trigger name. For example:
unica_actrg Camp1 trigger
You also can use the campaign code instead of the campaign code. To run a single flowchart, you the following syntax:
unica_actrg -n flowchart_name trigger_name
To run the trigger web_hit in a campaign in which the campaign code is Camp2000, enter:
unica_actrg Camp2000 web_hit
To broadcast a trigger to any active campaigns or flowcharts, type an asterisk (*) followed by the trigger name. Note that on UNIX, the asterisk must either be escaped (\*) or enclosed in double quotes (*). For example, to run the trigger web_hit in all campaigns or flowcharts where it exists, type:
unica_actrg * web_hit
Version 6.4
Unica Confidential
131
Chapter 6: Triggers
Failure notification
Affinium Campaign allows triggers that fail to result in a failure notification back to the Campaign process. In other words, a campaign should not be allowed to proceed if one or more of its triggered processes has failed.
Note
To maintain backwardscompatibility, any operations where failed triggers were not trapped will be supported in future versions.
Synchronous triggers
Synchronous processing occurs when a trigger executes and the Affinium Campaign process that calls it waits for success or failure. A trigger is synchronous when it is run and terminated with the question mark (?)character.
Synchronous_Trigger runs a critical promotion history update post processing.
You would want to hold up production if this update failed. Figure 6-5 shows a stored synchronous trigger.
132
Unica Confidential
Asynchronous triggers
Asynchronous processing occurs when a trigger is executed and the Affinium Campaign process that calls it does not wait for it to succeed or fail. To create an asynchronous trigger, the trigger must be terminated with nothing or with the ampersand (&) character. Non-terminated command lines process asynchronously.
Asynchronous_Trigger sends non-critical email notification of Campaign
initiation. You would not want to hold up production by an email script. Figure 6-6 shows a stored asynchronous trigger.
Version 6.4
Unica Confidential
133
Chapter 6: Triggers
For details, refer to Specifying advanced settings on page 32. For information on creating triggers, see the Affinium Campaign Users Guide. 134
Unica Confidential
7 UTILITIES
Campaign supports a variety of administrative utilities. The following sections discuss these areas in more detail. Key topics include: Affinium Campaign listener (unica_aclsnr) Affinium Server Manager (unica_svradm) Database load utility Affinium Campaign Session (unica_acsesutil) Affinium Campaign Session (unica_acsesutil) Database testing utilities
Unica Confidential
135
Chapter 7: Utilities
Syntax
The unica_aclsnr utility has the following syntax:
unica_aclsnr [-p port] [-r] [-v]
Options
The unica_aclsnr utility supports the following options
-p port
This option allows you to specify a single port on which to run the Affinium Campaign listener. If you use the -p parameter, you must specify a port. The default port is 4664, which can be overridden with this option.
-r
This option starts a recovery run by forcing the Affinium Campaign listener to find and register any running flowcharts. Use this parameter if for some reason the listener goes down and you have flowcharts still running. Affinium Campaign listener stores flowchart information in a text file (unica_acslnr.log). When you use the -r parameter, the listener checks the log file for running flowcharts and re-establishes the connections.
-v
This option displays the current version of the listener.
136
Unica Confidential
To stop the listener on Windows systems Enter the following command at the system prompt:
svrstop -p port
To start the listener on UNIX systems Enter the following command at the system prompt:
unica_ac.rc START
To stop the listener on UNIX systems Enter the following command at the system prompt:
unica_ac.rc STOP
Select Start > Programs > Command Prompt. The DOS window appears.
Type unica_aclsnr -i and click Enter. The New Table Definitions window appears, as shown in Figure 7-1. 137
Version 6.4
Unica Confidential
Chapter 7: Utilities
Setting up all the environment variables may seem redundant, but it is necessary for Windows NT to read system variables.
4 5 6 7 8 9
Reboot your system for the changes to take place. Select Start > Settings > Control Panel > Services. Highlight Unica Affinium Campaign listener. Click HW Profiles. Make sure the Affinium Campaign listener is enabled. Click OK.
10 Click Startup. 11 Check that Log On As System Account is enabled and the option Allow Service and
138
Unica Confidential
The Affinium Campaign listener is started (status will display Started). To stop the listener service
1 2 3 4
Select Start > Settings > Control Panel > Services. Highlight the Affinium Campaign Listener. Click Stop to stop the service. Click Yes to confirm your action. The Affinium Campaign listener service is stopped.
Select Start > Programs > Command Prompt. The DOS window appears.
Select the Affinium Campaign bin library. For example, d: <ENTER> cd Affinium\campaign\bin <ENTER>
3 4 5
Type unica_aclsnr -i. Select Control panel > System > Advanced > Environment variables. Set all the environment variables as System Variables. Do this in addition to setting them as user variables. Reboot the system for changes to take place.
Version 6.4
Unica Confidential
139
Chapter 7: Utilities
7 8
Select Control panel > Administrative tools > Services Double-click on the Unica Affinium Campaign Listener on Properties in the General tab. Click Start to start the service. For more advanced settings, Windows 2000 restarts the service should it be terminated. In the Properties box in the Recovery tab:
Set First failure: to restart service Set Second failure: to restart service Set Subsequent failures: to restart service
Select Control Panel > Administrative tools > Services. Double click on the Unica Affinium Campaign Listener in the Properties dialog in the General tab. Click Stop to stop the service. Select Start > Programs > Command Prompt. The DOS window appears.
3 4
Select the Affinium Campaign bin library. (For example, d: <ENTER> cd Affinium\campaign\bin <ENTER>)
140
Unica Confidential
Connect to the Affinium listener View all currently open flowcharts View and set environment variables
The Affinium Server Manager delivers into the install_root/bin/ directory on the server. When you start the unica_svradm utility, it checks whether the listener is running. If the listener is running, the connection automatically establishes and the names of the server and the port number are display, as shown in Figure 7-2.
Figure 7-2 The Affinium Server Manager Running
Supported commands
The Affinium Server Manager supports the commands described in the following section. To view the list of all available commands for unica_svradm, use the Help command. For details, refer to Help on page 142.
Note
Commands that take a flowchart name as an argument will operate on all flowcharts in all campaigns and sessions that have the same name. Use relative flowchart paths for commands that take flowchart paths.
Connect
Connect [-f] [-s <server>] [-p <port>]
Version 6.4
Unica Confidential
141
Chapter 7: Utilities
Connects to the Affinium listener running on the <server> at <port> number. You can be connected to only one server at a time. To connect to another server, use -f (forced) connection.
Disconnect
Disconnect
Disconnects from the server. This command is available only if you are connected to a server.
Note
To connect to another server, you can use the -f parameter, or disconnect first, and then connect to the new server.
Exit
Exit
Help
Help
142
Unica Confidential
Kill
Kill -p <pid>
This command issues a kill -9 to the <pid> specified (the Windows NT equivalent is issued on Windows NT). This is intended for run-away processes.
Quit
Quit
Resume
resume {-s <flowchart_name> |-p <pid>|-a}
Use -s to resume a single, specific flowchart by name Use -p to resume the specified process ID Use -a to resume all suspended flowcharts
Run
RUN -p <flowchartPathName> -u <asmUser> [-h partition] [-c <catalogFile>] [-s] [-M] [-S <dataSource> -U <dbUser> -P <dbPassword>]* [-x <xml-filename>] [-v "<varname>=[']<value>[']"]*
Opens and runs a specific single flowchart file, where relative flowchart path and filename, partition, catalog file and username are given. This command runs a saved flowchart using a (-p) flowchart path and a (-u) ASM username. You can choose to specify the user variables for a flowchart using an XML file (-x) or by directly specifying one or more (-v) variableName=value parameters. You can choose to specify (-S) database, (-U) database user name, and (-P) database password. On Unix platforms, flowcharts will be executed by the Unix
Version 6.4
Unica Confidential
143
Chapter 7: Utilities
account specified as the asmUsers alternate login. On Windows NT, the flowchart is run as the administrators user login. The s option specifies a synchronous run. The -M option specifies a run using the Mark feature, which prints out a series of ellipses (...) every 60 seconds during the flowchart run, to indicate that the flowchart is still running. The last set of database logins and passwords specified in the flowchart during the last save are automatically stored in the flowchart.
Save
save {-s <flowchart_name>|-p <pid>|-a}
Use -s to save a single, specific flowchart by name defined by the <server-name> Use -p to save a flowchart defined by the <process id> Use -a to save all running flowcharts
Set
set [variable[=value]]
Displays and sets environment variables. Since all Affinium Campaign environment variable names start with UNICA, you can view them by using the command:
set unica
144
Unica Confidential
Shutdown
shutdown [-f]
Shuts down any running flowcharts, then shuts down the Listener server. The system checks for any running flowchart. If running flowcharts are found, a warning message displays, asking for confirmation of shutdown. To override and force shutdown, use -force.
Status
status [-d |-i [-v | -c]
Displays information both about running and suspended flowcharts (with flowchart name, owner, and file location). The Status command identifies the processes as follows:
C - connected (client is connected to the listener process - may be running, may not) D - disconnected (client is closed but the flowchart is running in the background) O - orphaned (client is not connected to the flowchart and it is not running in the background - this is a lost process that cannot be reconnected to the listener and should be killed so people can log into it)
Stop
stop [-f] {-s <flowchart_name> |-p <pid>| -a}
Version 6.4
Unica Confidential
145
Chapter 7: Utilities
This command checks for active clients, warns if any are present (this can be overridden with the -f force option), and stops the Affinium server processes.
Use -s to stop a single, specific flowchart by name defined by the <server-name> Use -p to stop flowcharts by process id. Use -a to stop all running flowcharts
The system checks for running flowchart. If running flowcharts are found, a warning message displays, asking for confirmation to stop. To override and force stop, use -force.
Suspend
suspend [-f] {-s <flowchart_name>|-p <pid>|-a}
This command allows you to quiesce a running campaign and save the state for later restart with the matching command, RESUME. All currently running a Snapshot process complete data export activities and the flowchart is then saved as a paused flowchart. This causes the least amount of work to be lost and preserves data integrity of output files. If flowcharts must be stopped immediately, issue a SAVE command followed by STOP.
Use -s to suspend a single, specific flowchart by name defined by the <server-name> Use -p to suspend flowcharts specified by process id Use -a to suspend all running flowcharts
The system finishes running any currently running processes, and does not allow any subsequent processes to start. The flowchart is saved and written to the list of suspended flowcharts. The -f parameter allows you to force a suspend. Once suspended, the flowchart is written to the Affinium Campaign Listener as a suspended flowchart.
146
Unica Confidential
Note
If the flowchart is not running at the time of SUSPEND, it is saved, but not written to the listener and cannot be started with RESUME.
Version
Version
Displays the version of unica_svradm and the version of the listener process to which you are connected. You can use this command to help troubleshoot a version mismatch error.
At the command prompt enter the following command to obtain a list of running flowcharts on the server:
% unica_svradm status
Note that even if the flowchart names are the same, you can use the absolute path to uniquely identify them.
2 3
Record the PID associated with the flowchart that you want to kill. To kill the flowchart, enter the following command at the command prompt, replacing PID with the PID of the flowchart that you want to kill:
unica_svradm -kill PID
When a flowchart is killed, its buffer is not flushed to disk. Instead, the last checkpoint copy is saved.
Version 6.4
Unica Confidential
147
Chapter 7: Utilities
Creates a temporary data file as fixed width or delimited text. If specified by the dbconfig.lis parameter, loader_control_file_template, a temporary control file, is dynamically created based on the template file and the list of fields that need to be sent to the database.
Issues the command specified by the dbconfig.lis parameter, loader_command. This can be either a direct call to the database load utility executable or a call to a script that launches the database load utility. Cleans up the temporary data file and control file. This functionality allows you to load data into a new or empty database table and append data to an existing database table. Affinium Campaign does not support using load utilities to update records in an existing database table. For a list of loader parameters that can be set in the dbconfig.lis file, see Affinium Server Manager (unica_svradm) on page 140. Each parameter beings with the loader_ keyword.
148
Unica Confidential
The angle bracket (< >) characters around the comma indicate that the comma should be present on every line, after every inserted field name, except the last. If any sequence of characters does not fit this requirement, it is repeated every time, including the last. So for example, to generate a parenthesized, commaseparated list of field names in which each field name is preceded by a colon, you can use the following syntax:
( :<FIELDNAME><,> )
Because the colon is not enclosed within angle bracket (< >) characters, it repeats for every line; however, the comma appears on every line except the last. It might produce output as follows:
( :FirstName, :LastName, :Address, :City, :State, :ZIP )
Note that the comma does not appear after the last field name (ZIP), yet the colon appears before every field name.
Version 6.4
Unica Confidential
149
Chapter 7: Utilities
Syntax
unica_acsesutil -s FlowChartName [-r | -c | -x [-o outputFileName]] [-u] [(-e exportFileName [-f flowchart|campaign|session])| (-i importFileName [-b abort|replace|skip])] [-p] [-a | -n | -l] [-S datasource -U DB-user -P DB-password] unica_acsesutil -t catFileName [-x [-o outputFileName]] [-u] [-p] [-a | -n | -l] [-S datasource -U DB-user -P DB-password] unica_acsesutil -v
Options
The unica_acsesutil utility supports the following options.
-a
Recompute record counts and the list of distinct values for all tables.
-b
Import-only. Specifies that the import be done in batch mode. Takes one of the following arguments:
150
Unica Confidential
skip If a duplicate object is detected, do not replace it and continue the import.
-c
Generate table catalog in outputFileName (ignored for -s).
-e
Export the flowchart to the exportFileName.
-f
Specifies which type of object to export. Used with either the flowchart, campaign, or session argument, in conjunction with the -e and -s options. If this option is omitted, a flowchart is set for export.
-i
Specifies the file being imported. Should be a file that was exported using the -e option in a previous export operation.
-l
Recompute only the list of distinct values.
-n
Recompute only record counts.
-o
Specify the outputFileName. If unspecified, the default is catFileName.xml or catFileName.cat. The output file name should specify a destination directory when using wild cards.
Version 6.4
Unica Confidential
151
Chapter 7: Utilities
-P DB-password
Specifies the password for the database user account, specified by the -U switch. Used in conjunction with the -U and -S options.
-p
Print table mappings to the console.
-r
Generate a flowchart XML report in outputFileName (ignored for -t).
-S datasource
Specifies a data source from dbconfig.lis to log into. Used in conjunction with the -U and -P switches.
-s
-s flowchart
Specifies a flowchart file on which to operate. The flowchart name may contain wildcard characters.
-t
Read a table catalog as the input. Use catFileName to specify the input table catalog file name. catFileName may contain wildcard characters.
-U DB-Login
Specifies the user login into the datasource specified by the -S switch. Used in conjunction with the -P option, which specifies the user password.
-u
Use existing database authentication information when saving table catalogs.
152
Unica Confidential
-v
Display the version number and exit.
-x
Generate table catalog file in alternate format in outputFileName.
Return values
The unica_acsesutil utility returns a value of 0 if it runs successfully. It returns a 1 if no files are found with the specified flowchart or catalog file name.
When you export a campaign or a session, only the system tables and meta data are exported. You must export the flowcharts separately. Flowcharts can only be exported one at a time.
To export a campaign, session, or flowchart At the command prompt, enter a command with the following syntax:
unica_acsesutil -s <FlowChartName> -e <exportFileName> [-f flowchart|campaign|session][-S <datasource> -U <DBuser> -P <DBpassword>]
Version 6.4
Unica Confidential
153
Chapter 7: Utilities
Before you can import a flowchart, its associated campaign or session must exist. You must therefore export/import the campaign or session and then its associated flowcharts.
cxntest utility
The cxnset utility allows you to test connections to a target database and, once connected, to issue a variety of commands. To use the cxntest utility
1
From a command prompt on the Campaign server, type install_root/bin/cxntest, replacing install_root with the absolute path of the Campaign installation directory.
154
Unica Confidential
The cxntest utility is prompt driven. You must enter the following information exactly at the prompts:
The name of the connection library The name of the data source A user ID The password associated with the user ID
If the connection is successful, you can enter the following commands at the prompt:
bprint[pattern]
Performs an array fetch on a list of tables, 500 at a time. Can optionally specify a search pattern.
describe table
Describes the specified table. Returns each column name and its corresponding data type, storage length, precision, and scale.
exit
Version 6.4
Unica Confidential
155
Chapter 7: Utilities
From a command prompt on the Campaign server, type install_root/bin/db2test, replacing install_root with the absolute path of the Campaign installation directory. The db2test utility returns a list of databases that you can connect to.
The db2test utility is prompt driven. You must enter the following information exactly at the prompts:
The name of the database you want to connect to (taken from the list of Registered Data Sources) A user ID The password associated with the user ID
When you have successfully connected to the database, the db2test utility prints out messages like the following and presents you with a command prompt:
Server ImpactDemo conforms to LEVEL 1. Server's cursor commit behavior: CLOSE Transactions supported: ALL Maximum number of concurrent statements: 0 For a list of tables, use PRINT.
Describes the table or tables specified by pattern. Returns the corresponding type, data type, storage length, precision, and scale.
exit
156
Unica Confidential
odbctest utility
The odbctest utility allows you to test Open DataBase Connectivity (ODBC) connections to a target database and, once connected, to issue a variety of commands. To Use the odbctest utility
1
From a command prompt on the Campaign server, type install_root/bin/odbctest, replacing install_root with the absolute path of the Campaign installation directory. The odbctest utility returns a list of databases that you can connect to, similar to the following:
Registered Data Sources: MS Access Database (Microsoft Access Driver (*.mdb)) dBASE Files (Microsoft dBase Driver (*.dbf)) Excel Files (Microsoft Excel Driver (*.xls)) Visual FoxPro Database (Microsoft Visual FoxPro Driver)
Version 6.4
Unica Confidential
157
Chapter 7: Utilities
Visual FoxPro Tables (Microsoft Visual FoxPro Driver) dBase Files - Word (Microsoft dBase VFP Driver (*.dbf)) FoxPro Files - Word (Microsoft FoxPro VFP Driver (*.dbf)) ImpactDemo (Microsoft Access Driver (*.mdb)) AffiniumDemo (Microsoft Access Driver (*.mdb)) 2
The odbctest utility is prompt driven. You must enter the following information exactly at the prompts:
The name of the database you want to connect to (taken from the list of Registered Data Sources) A user ID The password associated with the user ID
When you have successfully connected to the database, the odbctest utility prints out messages like the following and presents you with a command prompt:
Server ImpactDemo conforms to LEVEL 1. Server's cursor commit behavior: CLOSE Transactions supported: ALL Maximum number of concurrent statements: 0 For a list of tables, use PRINT.
Describes the columns returned by the SQL command specified by SQL_command. 158
Unica Confidential
describe pattern
Describes the table or tables specified by pattern. Returns the corresponding type, data type, storage length, precision, and scale.
exit
From a command prompt on the Campaign server, type install_root/bin/oratest, replacing install_root with the absolute path of the Campaign installation directory. The oratest utility is prompt driven. You must enter the following information exactly at the prompts:
Version 6.4
Unica Confidential
159
Chapter 7: Utilities
The utility does not prompt for confirmation of your selections. If successful, the oratest utility prints a Connection Successful message and exits with a return value of zero (0).
160
Unica Confidential
A SYSTEM TABLES
This appendix provides details about the system tables supported in Affinium Campaign. Key topics include: System tables overview Table definitions Supported tables Legacy tables
Unica Confidential
161
Table definitions
You can choose to store the Affinium Campaign system tables in any supported relational database (DB2, Informix, Oracle, SQL Server, Sybase, or Teradata). The database can be dedicated to the system tables or can be shared with other data relevant to your Campaign efforts (such as marketing data or promotional history data). For more details, refer to Storing system tables in databases on page 90. When you execute the utility appropriate to your database, it creates the table definitions in the database or schema of your choice. The utilities are located in the ddl subfolder of your Campaign installation as follows:
DB2 <Affinium_root>\campaign\ddl\ac_systab_db2.sql Informix <Affinium_root>\campaign\ddl\ac_systab_inf.sql Oracle <Affinium_root>\campaign\ddl\ac_systab_ora8.sql SQL Server <Affinium_root>\campaign\ddl\ac_systab_sqlsvr.sql Sybase <Affinium_root>\campaign\ddl\ac_systab_sybIQ12.sql Teradata <Affinium_root>\campaign\ddl\ac_systab_tera.sql
Supported tables
This section lists the system tables supported in Affinium Campaign alphabetically by table name.
162
Unica Confidential
Supported tables
UA_Campaign table
Tracks general campaign information for all existing campaigns (active and inactive). Stores information such as the campaign ID, status, create date, and description. Initiative allows campaigns to be linked together.
UA_CampaignExtAttr table
Stores information about custom attributes you define for campaigns.
UA_CampToOffer table
Stores information about offers associated with campaigns.
UA_CampToSegment table
Stores the many-to-many mapping between campaigns and segments.
UA_CCRunLog table
Logs each session run including run ID, run status, execution start date/time and completion date/time.
UA_Channel table
Stores the list of all outbound communication channels. All ChannelCodes used in this table must be unique.
UA_ContactHistory table
User-created table that stores the required contact fields (such as AudienceID, PackageID, ContactDate) and any user-defined fields for each audience level.
Version 6.4
Unica Confidential
163
UA_ContactTrack table
Stores tracking information for contact counts by day, month, and year for each offer instance per audience level.
UA_Creative table
Stores information about creatives associated with particular offers (for example, URLS and integration with the MCMs of Affinium Plan).
UA_Derivedfield table
Stores derived fields for reuse within a single flowchart. It stores the name, definition, and description and is initially populated with a copy of the global Derived Field Definition table on the server when a campaign is initially created (when a new flowchart is opened). New derived fields created within the campaign also are stored in this table by using the Create Derived Field window.
UA_ExtContactTrack table
Holds user-defined fields used for tracking contacts.
UA_ExtRespTrack table
Holds user-defined fields used for response tracking.
164
Unica Confidential
Supported tables
UA_Flowchart table
Tracks general information for all existing flowcharts (active and inactive). The Flowchart table has one row for each flowchart in the system. It is used for reporting on the active flowcharts in the system. It contains the filename and path on the server and you can use it to list all active flowcharts. Each flowchart has a unique identifier, a key generated by the system called FlowchartID. This is a system generated, unique number and cannot be altered.
UA_Folder table
Stores the folder hierarchy for campaigns, flowchart, offers, and segments.
UA_IDSByType table
Holds information about the types of IDs used in Campaign.
UA_Initiatives table
Holds initiatives (populates Initiative field in the Campaign Summary). All InitiatiaveNames used in this table must be unique.
UA_Offer table
Stores information about the offer templates (effective/expiration dates, offer codes, financial information for ROI reports, and so forth).
UA_OfferExtAttr table
Stores information about custom attributes you define for offers.
UA_OfferToCreative table
Stores the many-to-many mapping information between offers and creatives.
UA_OfferToProduct table
Stores information about the relationship between offers and products.
Version 6.4
Unica Confidential
165
UA_OfferTrack table
Stores tracking information for each offer.
UA_Optimize_Session table
Stores all relevant information about an ACO session.
UA_OptimizeProcess table
Stores status information about an ACO session.
UA_Personalization table
Stores the personalization settings for the Campaign home page.
UA_Product table
User-defined table that stores fields used to query and identify products. Campaign requires a ProductID field that uniquely identifies each row of the Product table. You can have as many additional fields as you need. Campaign will display these fields when you are building your product query during offer creation.
UA_Response table
Stores information for each Response process.
UA_ResponseHistory table
User-defined table that stores the required response fields (AudienceID, OfferInstanceID, and ResponseChannelID) and any user-defined fields for each audience level.
UA_ResponseTrack table
Stores tracking information that is used to generate all performance and financial analysis reports for each offer instance and response type per audience level.
166
Unica Confidential
Supported tables
UA_Segment table
Stores the information on the segments created by the Create Seg process.
UA_Session table
Stores information on session flowcharts. Similar to UA_Campaign table on page 163, except that it does not store offers, segments, and other campaignspecific information.
UA_SummaryCube table
Stores information on all cubes created with the Cube process and provides status information and a pointer to the CubeDataFile name stored on the Campaign server.
UA_Triggerlist table
Stores a name, a definition, and a note for each outbound trigger sent through the Schedule and Contact processes. A trigger executes a command line, which can be a batch file or a script file.
UA_UsrResponseType table
Stores the list of response types with their descriptions. All ResponseTypes used in this table must be unique.
Version 6.4
Unica Confidential
167
Legacy tables
The following tables, listed alphabetically by table name, are no longer supported in the current version of Affinium Campaign.
UA_Cell table
Tracks cell information, such as CellID, SessionID, CellName, CellCount, CellDate, and CellCode. The CellCode is edited in the Snapshot process on the Cellcodes tab. Used to track campaign information in cell levels. The CellID is assigned when a cell is created.
UA_CChannel table
The UA_Contact Channel table stores information about contact channels used within flowcharts. It also stores the channel ID, name, and description. This table is initially populated with a copy of the global Contact Channel table on the server when a campaign is initially created (when a new flowchart is opened). New contact channels created within the campaign are stored in this table by entering a new value in the Contact Channel text box on the Definition tab of the New Version window. Can be used to populate the UA_Channel table.
UA_Contact table
Stores information about contacts (or treatments) within flowcharts. Stores information such as the process ID, contact ID, and version ID for display in the Treatment tab of the Contact process. Created when a campaign is created.
UA_CreativeCostX table
Stores the cost per transaction for each creative.
UA_CreativePiece table
Stores cost information for creatives within flowcharts. It stores the creative ID, quantities, and cost. This table is initially populated with a copy of the global
168
Unica Confidential
Legacy tables
Creative Cost Item Xaction table on the server when a campaign is initially created (when the user opens a new flowchart). Cost information for new creatives within the campaign are stored in this table by clicking New Creative on the Creatives tab of the New Version window.
UA_RChannel table
The UA Response Channel table stores information about response channels used within campaigns. It stores the response channel ID, name, and description. This table is initially populated with a copy of the global Response Channel table on the server when a campaign is initially created (when a new flowchart is opened). New response channels created within the campaign are stored in this table by using the New Response Channel option in the Response Channel list pane of the New Version window.
UA_Treatment table
Associates treatments (versions of offers) to contact cells and contact cell IDs.
UA_Ver2CChannelX table
The Version to Contact Channel Transaction table links versions to contact channels within campaigns. It contains the version ID and the contact channel ID. This table is initially populated with a copy of the global Version-to-Contact Xaction table on the server when a campaign is initially created (that is, when a user starts a new flowchart). Links for new versions created within the campaign are stored in this table by using the New Version window.
Version 6.4
Unica Confidential
169
UA_Ver2CreativeX table
The Version to Creative Transaction table links versions to creatives within a single campaign. It contains the version ID and the creative ID. This table is initially populated with a copy of the global Version-to-Creative Xaction table on the server when a campaign is initially created (when a user opens a new flowcharts). Links for new versions created within the campaign are stored in this table by using the New Version window.
UA_Ver2-RChannelX table
The Version to Response Channel Transaction table links versions to response channels within a single campaign. It contains the version ID and the response channel ID. This table is initially populated with a copy of the global Version-toResponse Channel Xaction table on the server when a campaign is initially created (when a new flowchart is opened). Links for new versions created within the campaign also are stored in this table by using the New Version window.
UA_Version table
Stores information about versions within a single flowchart. It stores the version ID, name, type, description, creation date, etc. This table is initially populated with a copy of the global Version table on the server when a campaign is initially created (when a new flowchart is opened). New versions created within the campaign also are stored in this table by using the New Version on the Treatment tab of the Contact process.
170
Unica Confidential
B TROUBLESHOOTING
Affinium Campaign is a Web-based client-server application with two servers and a number of environment variables that you must configure for it to work properly. You may encounter errors while using Affinium Campaign. Each error is described in this chapter, along with a suggested solution. If you encounter errors while using Campaign, try reading the descriptions and applying the solutions in this chapter before contacting Unica Technical Support. If an error does not appear here, or a solution fails, contact your Affinium administrator or contact Unica Technical Support using the guidelines outlined in this chapter. This chapter includes the following topics: Affinium Campaign error codes Contacting Unica technical support
Unica Confidential
171
If a blank browser window appears when you click Help, or if all Help links display the first page of the Users Guide instead of opening to the page appropriate to the task you are performing, re-install Adobe Acrobat.
The following table lists the error messages generated by Campaign. Code 301 303 304 305 306 308 309 310 311 312 314 315 316 317 318 Error Text Insufficient memory for this operation. Name conflicts with a built-in function name operator or keyword. Name is too long or contains invalid character(s). Named variable has no value assigned. Syntax error in expression. Error loading saved expression from file (large mem). Error loading saved expression from file (unknown function). Error loading saved expression from file (rand obj). Error loading saved object from file (invalid ID). Error loading saved expression from file (stack). Error saving object to file (invalid ID). Error saving expression to file (large mem). Consecutive operators in expression. Operator syntax error. Parenthesis missing.
172
Unica Confidential
319 320 321 322 323 324 325 328 329 330 331 332 333 334 335 336 338 339 341 342 343 345 346 348 349 350
Parentheses mismatched. Unknown expression. No name given. No expression following an equal sign. Ambiguous field name. Can't sort more than 2^16 points. Error accessing virtual memory (stat=0). Matrix multiply dimension mismatch. Matrix multiply dimension too big. Singular matrix error. Invalid number of arguments. Argument(s) must be scalar number(s). Argument must be greater than 0. Values of argument(s) are invalid. Values of argument(s) must be between -1 and 1. Dimensionality of argument(s) is invalid for the function. Length of arguments must be equal. Dimensionality of arguments must be equal. Standard deviation or other statistical calculation is invalid. Only vector is allowed for the 1st argument. Supplied argument must be integer. Expression is mathematically undefined. Unable to get training pattern. Supplied keyword is not appropriate for this function. Floating pointer value overflow error. Trying to take square root of negative number.
Version 6.4
Unica Confidential
173
353 354 356 357 358 359 360 361 362 363 364 365 367 368 369 370 371 372 373 377 381 382 383 384 394 395
Function's total returned string size is too large. String type not allowed in one or more arguments. Row/column index is not valid. Mixing numbers and text columns not allowed. String quote mismatch. Expression is too complex. String length too long. Number parsing code not valid. This function cannot process numbers. String quote mismatched or missing. This function generates too much data. Too many outputs from this function. Multiple-column outputs not allowed in recursive expressions. Recursive function trying to access future values (not causal). Inputs from the first row contains error. Output column(s) too long. Input/Output dimension of algorithm is corrupted. Recursive variable invalid Internal Only: Null ParseTree! Unknown value in substitution Error encountered interpreting variable type: 'Money' Error encountered interpreting Variable Type: 'Telephone' Error encountered interpreting Variable Type: 'Date' Error encountered interpreting Variable Type: 'Time' Values out of range for one or more arguments. A numeric column must be specified with any keyword other than CountOf.
174
Unica Confidential
396 397 398 450 451 452 453 454 455 456 457 458 459 460 461 462 463 500 600 601 602 603 604 605 606
BETWEEN syntax is: <val> BETWEEN <val1> AND <val2> SUBSTR[ING] syntax is: SUBSTR[ING](<string><offset><size>) Option [OutputValue] is only allowed for MinOf MaxOf and MedianOf keywords. Unable to change file permissions (chmod). Unable to retrieve file attributes (stat). Unable to remove file. Unable to create memory object; check log file for memory or file errors. Unable to lock memory object page; check log file for memory or file errors. Unable to load memory object; check log file for memory or file errors. Unable to create I/O object; check log file for memory or file errors. Unable to create I/O object; check log file for memory errors. Invalid supporting file extension; this may indicate a corrupted file. Invalid UTF-8 character encountered. Unable to convert from wide character to native encoding. Unable to convert from native encoding to wide character. Unable to create directory. Unable to remove directory. Internal parse tree construction error. Internal error: Configuration root not specified.. Environment variable UNICA_ASMURL must be defined. Specified configuration category not found. Specified configuration property must have absolute file path. Invalid response from configuration server. INTERNAL ERROR: Requested configuration path is different from current root. Configuration categories and properties cannot have empty name.
Version 6.4
Unica Confidential
175
607 608 609 610 611 612 700 701 702 703 704 710 711 723 761 768 773 774 778 779 780 781 782 783 784
Configuration category name cannot contain forward slash. Specified configuration property must have relative file path. INTERNAL ERROR: Partition name not specified. Cannot determine default partition. No partition with the given name. No partitions defined at all. Out of memory. Cannot open file. File seek error. File read error. File write error. flowchart file data corrupted. File create error. Error in one or more input variables to this function. Out of disk space. Error saving file. Access denied. INTERNAL HMEM ERROR: cannot flush memory when swapping is disabled. Numerical error: Unknown floating point error. Numerical error: Explicit generation. Numerical error: Invalid number. Numerical error: Denormal. Numerical error: Division by zero. Numerical error: Floating point overflow. Numerical error: Floating point underflow.
176
Unica Confidential
785 786 787 788 789 790 967 997 998 1400 1500 1501 1550 1649 1650 1709 1710 1711 1712 1713 1714 1715 1716 1717 1719 1729
Numerical error: Floating point round-off. Numerical error: Floating point unemulated. Numerical error: Square root of negative number. Numerical error: Stack overflow. Numerical error: Stack underflow. Internal Error. Invalid data dictionary definition at line %d. Internal error: GIO stack overflow. Error loading object: size check failed. Row offset not found for given row Insufficient memory for this operation. Maximum histogram range exceeded Internal Error 1550: Vector is not allowed for any argument.. First parameter cannot be vector if COL keyword is used. Client/Server version mismatch. Unable to initialize sockets. Unable to create a socket. Unable to connect to the specified server. Unable to send socket data. Unable to receive socket data. Unable to bind socket to specified port. Unable to perform socket listen. Communication request has timed out. INTERNAL ERROR: Communication request has timed out. Client/Server library: Error retrieving drive information.
Version 6.4
Unica Confidential
177
1731 1733 1734 1735 1736 1737 1738 1739 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1773 1783 1784 1785 1786
INTERNAL ERROR: Invalid argument index specified. Listener unable to create semaphore. Listener: invalid File Block server port. Listener unable to invoke specified command. Listener: invalid UDME server port. Listener: invalid Shannon server port. Listener: unable to communicate with server process. Listener: internal data integrity error. Unable to create thread. Unable to wait for thread. Client/Server library: Invalid process. Client/Server library: Invalid semaphore. Client/Server library: Invalid mutex. Client/Server library: Insufficient memory. INTERNAL ERROR: Client/Server library: Timeout elapsed object not signaled. Client/Server library: Wait for object failed. Client/Server library: Invalid directory specified. INTERNAL ERROR: Requested server function unsupported. Server shutting down; request refused. UDMEsvr: flowchart requested for deletion is in use. Someone else is already in EDIT or RUN mode. Edit before run is completed is not allowed Requested flowchart is active for another user. Server process has exited. Possible causes:The Campaign listener cannot start the Campaign server process. Suggested solutions: Ask your system administrator for assistance.
178
Unica Confidential
1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1823 1824 1825 10001 10022 10023 10024 10025 10026 10027 10030 10031 10032 10033 10034
Maximum number of flowchart instances is already in use. Requested flowchart is active for Campaign Collaborate. Requested flowchart is in use by a Campaign user. Unable to authenticate user. Invalid group name specified. Invalid file mode specified. INTERNAL ERROR: Exit status requested for active process. Evaluation period has expired. Invalid License Code. lowchart name has been changed by the writer Flowchart name has been changed by the writer INTERNAL ERROR: Mismatch in request parmeter count. INTERNAL ERROR: Mismatch in request parameter type. INTERNAL ERROR: Mismatch in request scalar or vector count. Internal Error. Internal Error: Cannot find Process. Internal Error: Cannot find Connection. Internal Error: Cannot find Process. Internal Error: Cannot find Connection. Internal Error: Unknown function tag. Flowchart contains cycles. Internal Error: Cannot get memory buffer from GIO. flowchart is running. Internal Error: Unknown copy state. Error modifying system table. One or more Processes are not configured.
Version 6.4
Unica Confidential
179
10035 10036 10037 10038 10039 10040 10116 10119 10120 10121 10122 10125 10126 10127 10128 10129 10130 10131 10132 10133 10134 10136 10137 10138 10139
Process has multiple Schedule inputs. Internal Error: Cannot find Process. One or more pasted Processes have derived fields defined. They may need to be redefined. Branch has one or more input processes outside of the branch. flowchart DOM creation error. flowchart DOM parse error. Internal Error: Process not registered. Internal Error: Unknown function tag. Process is running. Process run results will be lost. Internal Error. Process is not configured. Process input is not ready. Process name not unique. Internal Error: Invalid Process index. Internal Error: Invalid Report ID. Internal Error: Invalid Table ID. Internal Error: Invalid Field index. Internal Error: Invalid Cell ID. Internal Error: Invalid Field index. Internal Error: Invalid Process for registration. Process run stopped by user. Changes are not allowed while the Process is queued. Changes are not allowed while the Process is running. Changes are not allowed while a subsequent Process is running or queued.
180
Unica Confidential
10140 10141 10142 10143 10144 10145 10146 10147 10148 10149 10150 10151 10152 10153 10200 10201 10206 10207 10208 10209 10210 10300 10301 10302 10303
The source of the Process has been changed. Derived fields and subsequent Processes may need to be reconfigured. One or more selected Tables don't exist. Changes are not allowed while the flowchart is running. Process DOM creation error. Process DOM parse error. Unknown Process Parameter. Process name contains invalid character. Output Cell Name is empty. Accumulate ID's option must be turned off for schedule process to run on queue. Command not allowed in Reader mode. Cannot open Segment data file. Segment data file error: Invalid header. Internal Error: Invalid Segment (Data file name is blank). Undefined user variable referenced in path. Internal Error: Invalid 'From' Process Internal Error: Invalid 'To' Process Internal Error: Invalid 'From' Process Internal Error: Invalid 'To' Process Internal Error: Invalid connection index. Internal Error: DOM creation error. Internal Error: DOM parse error. ServerComm out of memory. INTERNAL ERROR: No function registered for class. INTERNAL ERROR: Requested function not supported. Another flowchart connection has been established; reconnect not allowed.
Version 6.4
Unica Confidential
181
10304 10305 10306 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10401 10402 10403 10404 10405 10406 10407 10408 10409 10410 10411
All communication ports in the range specified in UNICA_ACSVR.CFG are in use. Requested flowchart is already in use. Command not allowed in reader mode INTERNAL ERROR: flowchart not running. INTERNAL ERROR: Client connected to flowchart. Unrecognized command. Invalid syntax. INTERNAL ERROR: SUSPEND RUN in progress. No flowcharts were affected. New connections have been disabled. An administrator must use unica_svradm's UNCAP command to re-enable. flowchart run completed with errors. Cached data not found Flowcharts are specified with relative, not absolute, pathnames. INTERNAL ERROR: Client already connected. Client is not connected to a server. Connection to server has been lost. Retry? Unable to communicate with server process; it may have exited. Server process is unresponsive; RETRY to wait or CANCEL to disconnect. INTERNAL ERROR: Communication with server already in progress. You have been disconnected; an administrator has suspended this flowchart. You have been disconnected; an administrator has killed this flowchart. You have been disconnected; an administrator has stopped this flowchart. You have been disconnected; an administrator has removed this flowchart. You have been disconnected; an administrator has taken control of this flowchart.
182
Unica Confidential
HTTP SessionID is invalid, or HTTP Session has timed out. Server process is unresponsive; unable to connect at this time. Server process is unresponsive; unable to send trigger to all specified flowcharts at this time. Server process is unresponsive; unable to reconnect at this time. Server process is unresponsive; unable to complete requested action at this time. Possible causes: The Campaign server is busy processing another request. Suggested solutions: Ask your system administrator to check that campaign server machine has enough CPU or memory resource. Server process is updating flowchart data; unable to complete requested action at this time INTERNAL ERROR: SRunMgr RunProcess thread already running. Process's run was cancelled by Run Manager destruction. Invalid Campaign Code format. Invalid Offer Code format. Failed to generate Campaign Code. Failed to generate Offer Code. Invalid Tracking Code format. Failed to generate Tracking Code. Invalid Cell Code format. Failed to generate Cell Code. Invalid Version Code format. Failed to generate Version Code. HTTP communication error. Invalid response from ASM Server. ASM Server: unknown error. ASM Server: Login is invalid. ASM Server: Error while inserting into db.
10454 10501 10502 10530 10531 10532 10533 10534 10535 10536 10537 10538 10539 10550 10551 10552 10553 10554
Version 6.4
Unica Confidential
183
10555 10556 10557 10558 10559 10560 10561 10562 10563 10564 10565 10566 10567 10568 10569 10570 10571 10572 10573 10576 10577 10580 10581 10582 10583 10584
ASM Server: Error while trying to map ASM objects. ASM Server: Error because object already exists. ASM Server: Password Expired. ASM Server: Password is too short. ASM Server: Password not properly formed. Internal Error: parsing data returned from ASM Server. ASM Server: Valid login required. ASM Server: Group name required. ASM Server: Action not supported. ASM Server: Exceeded maximum allowable pw attempts. ASM Server: Password does not contain minimum number of numerics. ASM Server: Password cannot be same as login. ASM Server: Password cannot be reused from before. ASM Server: User logon is disabled. ASM Server: Password does not contain minimum number of letters. ASM Server: Password cannot be blank. ASM Server: Password is incorrect. This action requires proper privileges. ASM Server: Internal System Error. Internal Error: ASM client module is not initialized. Login required to query for db credentials. HTTP communication error nvalid response from eMessage Server eMessage Server: unknown error eMessage Server: Internal System Error eMessage server url is not set.
184
Unica Confidential
10585 10586 10600 10601 10603 10604 10605 10606 10607 10608 10612 10613 10616 10617 10619 10620 10621 10624 10625 10629 10630 10632 10633 10634
Internal Error: parsing data returned from eMessage Server Error returned from eMessage Server. Internal Error: Cell already initialized Internal Error: Source Cell not initialized Internal Error: Invalid cell ID. Internal Error: Invalid field index. Audience ID field not defined. Internal Error: Cannot find table manager. Invalid Table ID. Operation not allowed while cell is being accessed. Internal Error: Derived Field not found. Field not found. Possible causes:The field no longer exists bacause of table mapping change, the audience level changed, or the field was deleted. Suggested solutions: Re-configure the process box to reference a different field. Internal Error: Derived variable not initialized. Internal Error: Expression returns multiple columns. Internal Error: Invalid row index. Ambiguous field name. Internal Error: selected fields not yet computed. Internal Error: Access object became invalid. Internal Error: No Data Source selected for Raw SQL Query. Error writing temporary file on Campaign server. Operations not allowed on different audience levels. Reference to stored query not found. Internal Error: Derived variable should not contain data. Incompatible sort order detected. Set \enable_select_order_by=FALSE\ in dbconfig.lis.
Version 6.4
Unica Confidential
185
10635 10636 10637 10638 10639 10641 10642 10643 10644 10700 10800 10801 10802 10803 10804 10805 10806 10807 10808 10809 11001 11004 11005 11006 11100
Cannot resolve reference to stored query: Stored Query table not yet mapped. User Variable not defined. Cell results are missing; preceding processes must be rerun. Invalid value in 'counts' field. Internal Error: Bad STCell _Select State. Derived variable name conflicts with an existing Persistent Derived Field. Temp table not available for <TempTable> token. Temp table has too many rows Temp table does not have enough rows Incompatible field type or width. Duplicate parameter name for Custom Macro. Missing parameter name for Custom Macro. Invalid number of parameters for custom macro. Illegal parameter name for Custom Macro. Name conflicts with an existing Custom Macro. Missing parameter for Custom Macro. Parameter name is a reserved word. Illegal Custom Macro name. Name conflicts with an existing Affinium Macro. Parameter used within Custom Macro expression is not part of Macro definition. Internal Error: SendMessage error. Internal Error. Internal Error: Unknown report type. The flowchart is being accessed by another user. Memory allocation error.
186
Unica Confidential
11101 11102 11104 11105 11107 11108 11109 11110 11111 11112 11113 11114 11115 11116 11117 11119 11120 11121 11122 11128 11131 11132 11133 11134 11135 11136
Internal Error: Unknown function tag. Internal Error: Unknown class name in IDtoPtr. Internal Error: Bad magic number in SCampaignContextConfig. File name not specified. Server campaign context internal error. Internal Error: Cannot lock report. Table is not defined. Environment variables not set. Internal Error: Error getting field info. Invalid Password. flowchart/Campaign name not unique. Campaign code not unique. Active flowchart can not be deleted. The specified file is not an Affinium Campaign flowchart file. Deletion of an old flowchart file is not supported. Please delete it manually. Unable to write unica_tbmgr.tmp file in UNICA_ACTMPDIR directory. Unable to rename unica_tbmgr.bin in UNICA_ACDIR directory. Unable to copy unica_tbmgr.tmp to unica_tbmgr.bin file. Unable to read unica_tbmgr.bin file in UNICA_ACDIR directory. Operation disallowed in unica_acsvr.cfg configuration file. Invalid template file format. XML initialization error. DOM creation error. DOM parse error. Internal Error: Unknown user variable Server campaign context cell locking error.
Version 6.4
Unica Confidential
187
11137 11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159
Server campaign context file open error. The named user exists already. No user list table is mapped to the admin. session. User not found. Wrong password. File read error. Empty user variable. Flowchart name and Campaign code not unique. authentication_server_url missing in unica_acsvr.cfg file. Invalid user variable. User Variable not found. Changes to the virtual memory setting are not allowed. Unable to create folder file. Please check your OS privilege. Unable to delete folder file. Please check your OS privilege. Unable to rename folder/campaign/session file. Please check your operating system privilege. Unable to create campaign/session file. Please check your OS privileges. This error occurs when Affinium Campaign tries to save data to a file and cannot. Check that the Affinium Campaign user has permission to modify the file. Unable to delete campaign/session file. Please check your OS privilege. Unable to move folder/campaign/session file. Please check your OS privilege. Failed to authenticate datasource. Effective date is later than expiration date Unable to open campaign/session file. Please check your OS privilege. Unable to read log file. Please check your OS privileges. This error occurs when Affinium Campaign tries to find and open the log file. Check that the file exists on the file system.
188
Unica Confidential
11160 11161 11201 11202 11203 11230 11231 11232 11251 11253 11254 11255 11256 11257 11258 11259 11260 11261 11262 11263 11264 11265 11266 11267 11268 11269
Cannot display log. Log file name not specified Operation is not allowed while the flowchart is running. SContainer internal error (1). SContainer internal error (2). SContainer data loading error. Unable to create transcoders between specified encoding and UTF-8. Unable to transcode text value. Cannot determine name of local host. New passwords mismatched. Please re-type. Stack overflow during sort operation. Too many arguments passed to command-line parser. Unbalanced quotes in command or config-file parameter. Unable to open flowchart LOG file for append. Unable to write to flowchart LOG file. Unable to rename flowchart LOG file. Invalid Multibyte or Unicode character encountered. Illegal or duplicate campaign code. Invalid old password New read/write passwords mismatched. New read-only passwords mismatched. Invalid read/write password. Invalid read-only password. Password must contain at least 6 characters. Report registered. Report name missing. New passwords mismatched.
Version 6.4
Unica Confidential
189
11270 11271 11272 11273 11274 11275 11276 11280 11281 11282 11283 11284 11285 11286 11287 11288 11289 11300 11301 11302 11303 11304 11305 11306 11307 11308
Cannot create temporary file on client computer. Error reading temporary file on client computer. Error writing temporary file on client computer. Set new configuration as default? Unmap the selected table(s)? No fields selected. No flowchart name. Execution Checkpoints will not be performed. Server version is newer than client version. Upgrade client installation? Server version is older than client version. Downgrade client installation? Installation executable retrieved but unable to execute. About to clear flowchart log. Are you sure? Help topic not found. Error parsing help topics file. flowchart is recovered from auto-save file. Error loading bitmap. Settings changed. Save catalog now? Flowchart is already open. Disconnect current user and connect? Invalid field name. Invalid field index. No more records. Operation not allowed while table is being accessed. Locked tables cannot be removed. Invalid table ID. ParseTree context in use. Random access of basetable by parsetree not allowed. Invalid table index.
190
Unica Confidential
11309 11310 11311 11312 11313 11314 11315 11316 11317 11318 11319
Invalid key index. Index key not initialized. Entry not found in dimension table. ID field not specified. Invalid Table access. Data already imported. Internal error: VFSYSTEM missing Input files not yet specified. No data. Modification not yet started. Entry into index field is not unique. Unable to create lock file in conf directory. Possible causes: The Campaign server cannot lock the dummy_lock.dat file. Suggested solutions: Ask your system administrator to check that the file is not locked by another process. If another process is not locking the file, ask the Campaign administrator to reboot the Campaign server to remove the lock. Data Dictionary file name not specified. Function or Operation not supported. 'dbconfig.lis' file not found. Dimension table does not have a key field. ID of new version conflicts with existing versions. Cannot open default table manager file 'unica_tbmgr.bin'. Too many duplicate ID's to perform table join. Unable to delete template file Unable to delete work group file Error parsing Data Dictionary file: invalid format. Error converting text data to numeric. Field width too small to hold converted numeric value.
11320
11323 11324 11325 11326 11327 11328 11329 11330 11331 11332 11333 11334
Version 6.4
Unica Confidential
191
11335 11336 11337 11338 11339 11340 11341 11342 11343 11344 11345 11346 11347 11348 11349 11350 11351 11352 11353 11354 11355 11356 11357 11358 11359 11360
Field width too small to hold source text data. Accessed table not mapped. Duplicate ID encountered in normalized table. Internal error: Invalid temp table. Audience definition not compatible: wrong number of fields. Audience definition not compatible: type mismatch. Name of new version conflicts with existing versions. Field not found. Data dictionary has changed. XML table catalog file is invalid. Loader command exited with an error status. Table schema has changed; please remap the table. No results for queue table. Internal error, wrong return format. Internal error loading catalog. No catalog loaded. Internal error connecting to table. Not connected to a table. Invalid keyword in dbconfig.lis file. Invalid UDI connection. Internal Error: base table not set. Invalid table name. DOM creation error. DOM parse error. Unable to import duplicate system table entry. Unable to lock system table. PACKED DECIMAL field type is supported for export only.
192
Unica Confidential
11361 11362 11363 11364 11365 11366 11368 11369 11370 11371 11372 11373 11374 11375 11376 11377 11378 11379 11380 11381 11382 11383 11384 11385 11386
This operation is not supported. Too many fields returned by SQL expression. Data field returned by SQL expression does not agree with user specification. Unknown database specification in raw SQL Custom Macro. Raw SQL Custom Macro returning only ID list is not allowed in this context. Segment not found. Contact History Table is not yet defined for this audience level. Response History Table is not yet defined for this audience level. Dimension Element expression is missing. Ambiguous bin definition. Custom Macro returned wrong number of fields. Custom Macro result fields are not compatible with the current audience level. Dimension Element name is not unique across all levels. Unknown Dimension Name. Unknown Dimension Element. Missing database specification for raw SQL Custom Macro. Campaign code not unique. Root dimension element missing in XML file. Contact Tracking table not yet mapped. Response Tracking table not yet mapped. Syntax error: Missing AND/OR operator. Syntax error: Extra AND/OR operator at end of selection criteria. Field not compatible: Numeric field expected. Field not compatible: Date field expected. Error returned from UDI server.
Version 6.4
Unica Confidential
193
11387 11388 11389 11390 11391 11392 11393 11394 11395 11396 11397 11398 11399 11400 11500 11501 11502 11503 11504 11505 11506 11507 11508 11509 11510
Internal ID would exceed limit. Cannot open Segment data file. Segment data file error: Invalid header. Internal Error: Invalid Segment (Data file name is blank Error accessing segment data. Cannot perform table join unless tables are on the same database. Unable to add entry to non-persistent queue Audience level is reserved, cannot add. Audience level is reserved, cannot remove. Internal Error: Invalid additional info in selected ACO session. Field data exceeded the table mapping width for this field. Remap the table and manually increase the field width before running the flowchart. Post temp table create run script completed with error(s). Cannot allocate an ID for a new object because the allocator is busy. Temp table not available for <OutputTempTable> token. Internal Error: Not a valid table in the database. Internal Error: No table has been selected. Selected table has no field entries. Invalid column index. Invalid column name. Invalid data source. Selected table is invalid or corrupted. Insufficient memory. Database row deletion error. Error in processing SQL query. No data returned - check query.
194
Unica Confidential
11511 11512 11513 11514 11515 11516 11517 11518 11519 11520 11521 11522 11523 11524 11525 11526 11527 11528 11529 11530 11531 12000 12001 12002 12003 12004
No matching row was found in the query result. No more rows in the database. Error inserting row into database table. Bad database ID column. Error updating database table. Error creating new database table. Number of columns not correct for this type of query. Database connection error. Error in getting results from database. Unknown database type in dbconfig.lis file. Internal Error: Incorrect state for query results. Invalid database connection (user is not logged in to DB). First unique ID not set. Invalid data type for this column. Query has no FROM clause. Query uses alias. Internal Error: Error in database temporary table. Database Error. INTERNAL ERROR: No threads available to run query. Invalid keyword in dbconfig.lis file. Catalog/Template contains different DB login(s). Contact History Table not specified. Customer ID not specified. Offer ID not specified. Channel field not specified. Date field not not specified.
Version 6.4
Unica Confidential
195
12005 12006 12007 12008 12009 12010 12011 12012 12015 12016 12017 12018 12019 12020 12021 12022 12023 12024 12025 12026
No proposed contacts table templates. No tables available for template. Template tables must be mapped at Customer level and must contain the required Offer, Channel, and Date fields. No tables available for opt-in/opt-out tables. Opt-in/opt-out tables must be mapped at Customer level. Opt-in/Opt-out tables not specified. \"Customer In...\" rules will not be available. Offer Table not specified. Offer Name field not specified. Offer ID will be used for display. Channel Table not specified. Channel Name field not specified. Channel ID will be used for display. Field name(s) of Offer audience level in template table does not agree with Contact History Table. Field name(s) of Offer audience level in offer table does not agree with Contact History Table. No tables available for offer table. Offer table must be mapped at Offer level. No tables available for channel table. Channel table must be mapped at the Channel level. Killing the server process will lose all work since the last save. Are you sure? Window creation failed. Remove the following tables associated with this audience level? Remove the selected dimension hierarchies? Flowchart is in use. Do you still want to continue? If you click Yes, changes made by other user will be lost. Remove the selected audience level? Audience name already exists. This flowchart has been modified or removed by another user.\r\nYou will be switched to Summary tab now.\r\nAll changes after the last save will be discarded.
196
Unica Confidential
12027 12028 12029 12030 12031 12032 12206 12207 12301 12303 12304 12305 12306 12307 12308 12309 12310 12311 12312 12401 12600 12601 12602 12603
This flowchart needs to be updated. Click OK to update now.\r\nYou will need to redo the last action after update is completed. Object is either initializing or has failed to initialize.\r\nYou may try this operation again. Remove the selected items? You have chosen to cancel connection to Campaign system tables.\r\nYou will be switched to Summary tab now. You have chosen to cancel connection to Campaign system tables.\r\nYou will be switched to Summary tab now. This table is only supported when Interact is installed. Cannot navigate up a directory: already at root. Cannot create directory; check log file for detailed error information. Merge process internal error. Merge process connecting from process error. Merge process cell locking error. Merge process stopped by user. Merge process cell operation error. Merge process getting source cell error. Merge process not configured. No source cell is chosen. No source cell is used. Selected source cells have different audience levels. Missing source cell(s). Input connection may be invalid. SExecute Internal Error (1) INTERNAL ERROR: SReport Report in use; unable to delete. INTERNAL ERROR: Invalid report ID. INTERNAL ERROR: Invalid report type saved.
Version 6.4
Unica Confidential
197
12604 12605 12606 12607 12608 12609 12610 12611 12612 12613 12614 12615 13101 13104 13110 13111 13113 13114 13115 13116 13117 13118 13119 13120 13121 13122
INTERNAL ERROR: Invalid report cell ID. INTERNAL ERROR: Report not initialized before run. INTERNAL ERROR: Missing value. INTERNAL ERROR: Unable to lock report. INTERNAL ERROR: Invalid field specified. Report cannot be created without any cells. INTERNAL ERROR: No more cell records available. Report name conflicts with another registered report. FILE ERROR: Unable to open file Field type does not match internal setting. Table may need to be remapped. Report name is empty. Command not allowed in Reader mode Select process internal error. Select process cell locking error. Select process not configured. Select process unknown function tag. Select process report locking error. Select process profile report generation error. Select process table locking error. No source cell or table. No tables are selected. No query is typed in. No data source is selected. Selected tables have different audience levels. Audience level not specified. Select process DOM creation error.
198
Unica Confidential
13123 13124 13125 13128 13129 13131 13132 13133 13134 13135 13136 13137 13138 13200 13201 13203 13204 13205 13206 13207 13208 13209 13210 13211 13212
Select process DOM parse error. Unknown parameter for Select Process. Invalid parameter value for Select Process. Optimized contact table is not defined in selected ACO session. DB source is not defined in selected ACO session. Database authentication required. String conversion error. No fields are selected for extract. Duplicate output name in fields to extract. No skip duplicate field selected. Command not allowed in Reader mode No source table selected. Error selecting based on dimension hierarchy: No tables mapped at selected Segment's audience level. Contact process memory allocation error. Contact process internal error. Contact process connecting from process error. Contact process locking cell error. Contact process stopped by user. Contact process locking contact table error. Contact process locking version table error. Contact process getting cell information error. Contact process getting table information error. Contact process locking table error. Contact process unknown function tag error. Contact process GIO open error.
Version 6.4
Unica Confidential
199
13213 13214 13215 13216 13217 13218 13219 13220 13221 13223 13224 13225 13226 13227 13228 13229 13230 13231 13232 13233 13234 13235 13236 13237 13238 13239
Contact process locking report error. More information is needed for a creative piece. Exactly one variable cost item should be chosen. Conflict variable cost items. More information is needed for a version. At least one creative piece have to be chosen. At least one response channel have to be chosen. One contact channel has to be chosen. The chosen ID is not unique. Contact ID is not unique. Treatment page: No source cell. Treatment page: Contact ID is not selected. Treatment page: No version is selected. Contact list page: No export table is selected. Contact list page: No summary file is chosen. Contact list page: No export fields are chosen. Tracking page: Frequency of update is not chosen. Tracking page: Monitor period can not be zero. Responders page: No responder table is chosen. Unreachable page: No unreachable table is chosen. Log page: No table is chosen to log contacts. Log page: No fields are chosen to log contacts. Log page: No table is chosen to log responders. Log page: No fields are chosen to log responders. Log page: No table is chosen to log unreachable. Log page: No fields are chosen to log unreachable.
200
Unica Confidential
13240 13241 13242 13244 13246 13248 13249 13250 13251 13252 13253 13254 13255 13256 13257 13258 13259 13260 13261 13262 13263 13264 13265 13266
Contact process getting cell field infomation error. Contact list page: No trigger is specified. Contact list page: no sort field is chosen. Invalid field. Double to string conversion error. Contact list page: No export file is chosen. Contact list page: No delimiter is specified. Selected tables have different audience levels. Contact list page: No export dictionary file is chosen. Log page: No file is chosen to log contacts. Log page: No delimiter is specified for contacts. Log page: No dictionary file is specified for contacts. Log page: No file is chosen to log responders. Log page: No delimiter is specified for responders. Log page: No dictionary file is specified for responders. Log page: No file is chosen to log unreachable. Log page: No delimiter is specified for unreachable. Log page: No dictionary file is specified for unreachable. Contact List Page: Selected Data Export Filename contains Invalid Path Contact List Page: Selected Data Dictionary for Export File contains an Invalid Path. Contact List Page: No skip duplicate field is chosen. Contact List Page: Update Records require a base table with audience same as input. Log Page Contact: Update Records require a base table with audience same as input. Log Page Responders: Update Records require a base table with audience same as input.
Version 6.4
Unica Confidential
201
13267 13268 13269 13270 13271 13272 13273 13274 13275 13276 13277 13278 13279 13280 13281 13282 13283 13284 13285 13286 13301 13304 13310 13311 13312
Log Page Unreachable: Update Records require a base table with audience same as input. Tracking page: No trigger is specified. Responders page: No responder query is specified. Responders page: No data source is selected. Unreachable page: No unreachable query is specified. Unreachable page: No data source is selected. Selected source cells have different audience levels. Unknown parameter for Contact Process. Invalid parameter value for Contact Process. Version Name is not unique. Empty or Duplicate Cell Codes. About to modify a version used by another flowchart. Log Page Contact: No skip duplicate field is chosen. Log Page Responders: No skip duplicate field is chosen. Log Page Unreachable: No skip duplicate field is chosen. Contact process DOM creation error. No data source is selected. Contact List Page: Selected Data Dictionary File does not exist. Log page: No fields are chosen to log contacts. Command not allowed in Reader mode Segment process internal error. Segment process cell locking error. Segment process profile report generation error. Segment process unknown function tag. Segment process report locking error.
202
Unica Confidential
13313 13314 13315 13316 13317 13318 13320 13321 13322 13323 13324 13400 13401 13403 13408 13409 13410 13411 13412 13413 13414 13415 13416 13417 13418 13419
No source cell. No field is selected. No query is specified. No data source is specified. Segment name not unique. No table is selected. Unknown parameter for Segment Process. Invalid parameter value for Segment Process. Segment name not specified. Invalid segment name. Command not allowed in Reader mode Schedule process memory allocation error. Schedule process internal error. Schedule process connecting from process error. Schedule process date format error. Schedule process time format error. Total schedule period is zero. No schedule to run is chosen. Run on time needs times. Run on triggers needs triggers. Need output triggers. Elapsed time is zero. Additional wait must work with one of the first three run options. Schedule run time(s) outside the schedule period. Invalid time format. At least one of the custom run options has to be selected.
Version 6.4
Unica Confidential
203
13420 13421 13422 13423 13501 13503 13504 13505 13506 13507 13508 13510 13511 13512 13513 13514 13515 13516 13517 13518 13519 13520 13521 13601 13602 13603
Delay exceeds the total schedule period. Invalid time. Start time has expired. Run on queue needs table. Selected queue table is invalid. Sample process internal error. Sample process connecting from process error. Sample process cell locking error. Sample process stopped by user. Sample process locking sample table error. Sample process locking version table error. Sample process getting source cell error. Sample process unknown function tag. Sample process not configured. Sample process output cell size exceeding input cell size. No source cell is chosen. No ordering field is chosen. Name not unique. Unknown parameter for Sample Process. Invalid parameter value for Sample Process. Sample name not specified. Invalid sample name. Command not allowed in Reader mode Sample size not specified. Internal error. GIO open error. The named trigger doesn't exist.
204
Unica Confidential
13604 13605 13701 13703 13704 13705 13706 13707 13708 13709 13716 13717 13718 13719 13720 13721 13723 13724 13725 13726 13727 13728 13729 13730 13801 13803
Trigger name not specified Trigger completed with error(s). Score process internal error. Score process connecting from process error. Score process cell locking error. Score process stopped by user. Score process cell operation error. Number of models can't be zero. Score process GIO open error. Environment variables not set. Score field prefix is missing. An internal model is not selected. An external model is not chosen. Model variables are not completely matched. No source cell is selected. The number of models is zero. Score field prefix not unique. External model file has changed. Invalid field. dbscore process completed with error(s). Unknown parameter for Score Process. External Model does not point to a valid file. Cannot get model information. Model file may be invalid. Command not allowed in Reader mode SelectOpt process internal error. SelectOpt process connecting from process error.
Version 6.4
Unica Confidential
205
13804 13805 13806 13807 13809 13810 13812 13901 13903 13904 13905 13906 13907 13909 13910 13911 13912 13913 13914 13915 13917 13918 13921 13923 13924 13925
SelectOpt process cell locking error. SelectOpt process stopped by user. SelectOpt process cell operation error. SelectOpt process table locking error. SelectOpt process report locking error. No model file name is specified. dbscore process completed with error(s). Snapshot process internal error. Snapshot process connecting from process error. Snapshot process cell locking error. Snapshot process stopped by user. Snapshot process cell operation error. Snapshot process table locking error. Snapshot process unknown function tag error. Snapshot process report locking error. No source cell is chosen. No export table is selected. No fields are selected for export. No sort field is chosen. Error to get selected field information. Invalid field. No export file is selected. String conversion error. Selected cells have different audience levels. No delimiter is specified. No export data dictionary file name is specified.
206
Unica Confidential
13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 14001 14003 14004 14005 14006 14008 14009 14010 14013 14014 14015 14016 14017 14018 14101 14103
Selected Data Export Filename contains Invalid Path Selected Data Dictionary for Export File contains an Invalid Path. No skip duplicate field selected. Update Records require a base table with audience same as input. Snapshot process DOM creation error. Unknown parameter for Snapshot Process. Invalid parameter value for Snapshot Process. Empty or Duplicate Cell Codes. Selected Data Dictionary File does not exist. Command not allowed in Reader mode Model process internal error. Model process connecting from process error. Model process cell locking error. Model process stopped by user. Model process cell operation error. Model process report locking error. No responder cell is selected. No non-responder cell is selected. Model file name is not selected. At least one variable has to be used for modeling. No responder and non-responder cells are selected. udmerun process completed with error(s). Selected Model Filename contains Invalid Path Command not allowed in Reader mode EvalOpt process internal error. EvalOpt process connecting from process error.
Version 6.4
Unica Confidential
207
14104 14105 14106 14107 14108 14110 14111 14112 14113 14114 14115 14116 14117 14118 14119 14120 14301 14303 14304 14305 14306 14307 14308 14309 14310 14317
EvalOpt process locking cell error. EvalOpt process stopped by user. EvalOpt process cell operation error. EvalOpt process table locking error. EvalOpt process unknown function tag. EvalOpt process locking report error. No responder cell is chosen. No non-responder cell is chosen. No responder field is chosen. No non-responder field is chosen. Unknown parameter for EvalOpt Process. Set number not specified. Set number out of range. Set name is empty. Not supported options. Command not allowed in Reader mode TestOpt process internal error. TestOpt process connecting from process error. TestOpt process cell locking error. TestOpt process stopped by user. TestOpt process cell operation error. TestOpt process table locking error. No source cell is selected. Number of tests to be optimized is zero. One of the financials is not configured. Report locking error.
208
Unica Confidential
14319 14320 14321 14322 14323 14324 14501 14503 14504 14701 14703 14704 14705 14901 14902 14903 14905 14906 14907 14908 14909 14912 14913 14914 15101 15201
Error to get selected field index. Probability field value exceeds 1.0. Invalid field. No probability field is selected. No treatment is chosen. Command not allowed in Reader mode Custom macro internal error. The custom macro name is empty. The custom macro expression is empty. Stored field internal error. No variable name is specified. No expression is specified. There is already a stored derived field of the same name. List box selection error Too many items selected No items selected Selection not found Unrecognized tree view operation No cost information selected Dialog initialization error Specified cell name (process name + output cell name) is too long Creative ID may only contain alphanumerics and underscore Output Cell Names not unique. Overwrite current info? Dialog initialization error List box selection error
Version 6.4
Unica Confidential
209
15202 15203 15204 15301 15501 15502 15503 15504 15701 15702 15801 15802 15803 15804 15805 15901 15903 15904 15905 15906 15907 15908 16001 16002 16051 16053
Dialog initialization error Specified cell name (process name + output cell name) is too long Invalid cell size limit. Dialog initialization error String not found Minimum rate > maximum rate Dialog initialization error Invalid output cell name Dialog initialization error Specified cell name (process name + output cell name) is too long Selected string not found Tree expansion error Dialog initialization error Segment name not specified Segment names can not be specified Selected string not found Dialog initialization error Specified cell name (process name + output cell name) is too long List box selection error Invalid cell/record size limit. Existing expression based on tables and fields will be lost. Existing criteria based on dimension hierarchy will be lost. Dialog initialization error No list box selection found Stored trigger internal error. The trigger name is empty.
210
Unica Confidential
16054 16055 16101 16102 16103 16104 16105 16106 16201 16202 16203 16302 16303 16304 16305 16306 16400 16401 16402 16403 16404 16405 16406 16407 16408 16409
The trigger command is empty. There is already a trigger defined under the same name. Selection error Multiple selection error No items selected Selection style error Selection not found Dialog initialization error Dialog initialization error SListBox selection error Specified cell name (process name + output cell name) is too long Source table is not yet mapped. DimensionInfo Internal Error: Unknown Function. DimensionInfo Internal Error. Illegal number of levels. Required field missing in source table. It needs to be remapped. No data base source defined No table selected Internal Error: no table manager Bad Campaign Table index Internal Error Internal Error: New Table Unknown function No file name specified No data dictionary specified The selected table has no defined fields Internal Error: No table created
Version 6.4
Unica Confidential
211
16410 16411 16412 16413 16414 16415 16416 16417 16418 16419 16420 16421 16422 16423 16424 16425 16426 16427 16428 16429 16430 16431 16432 16501 16503
No name specified for new table Need a user name and password for the database The database type is not currently supported Table is not a base table -- no relations allowed Bad field index Record table ID not specified Internal Error: No dimension table with this name Table is not a dimension or general table Internal Error: No base table with this name Entry point not valid for this operation Mapping to an existing table not valid for this operation Error creating new Flat File Error - no file/table option selected Error - no database selected Error - table selected is invalid Error - bad key field index Error - blank key field name Error - Table Name is duplicate or invalid Only alphanumerics and underscore are allowed for Affinium field name Dimension table ID not specified Duplicate Affinium field names specified Table name must begin with a letter and may only contain alphanumerics and underscore Error - Dimension Name is duplicate or invalid Derived field internal error. Derived field unknown function tag error.
212
Unica Confidential
16504 16505 16506 16507 16508 16509 16601 16603 16701 16702 16703 16704 16705 16706 16707 16708 16709 16710 16711 16712 16713 16714 16715 16716 16717
Derived field not exist. Derived field report locking error. Derived field table locking error. Derived field cell locking error. Derived field already exists. Derived field getting all field information error. Internal Error. The authorized process's schedule period has expired. Selected string not found Parent window not found Filename not specified No fields selected Dialog initialization error Specified Source File does not exist Remapping system table - are you sure? Overwrite old definition? Syntax check OK Discard changes to current expression? Specified Dictionary File does not exist Derived variable name not specified Query name not specified Trigger name not specified No field selected Illegal field name Invalid name: name must begin with a letter and must contain only alphanumerics or '_'
Version 6.4
Unica Confidential
213
16718 16719 16720 16721 16722 16723 16724 16725 16726 16727 16728 16729 16730 16731 16732 16733 16734 16735 16736 16737 16738 16739 16740 16741 16742
Remove entry? Remove folder? All folder information (sub-folders etc.) will be lost. Name not specified Invalid Data Dictionary file. It may be a directory. Data Dictionary file exists. Do you want to overwrite it? File Not Found Overwrite Existing File? Audience level not specified ID Field(s) not specified Duplicate ID Fields Invalid run state - operation will be terminated No table(s) selected No cell(s) selected Selected tables have different audience levels Selected cells have different audience levels Atleast one audience level should be defined Table's audience level not specified Base Table's related fields not compatible with Dimension Table's key fields The file path length has exceeded the allowed limit No fields are checked Table or field name not specified Derived variable name conflicts with Affinium Generated Field Required value missing. Unable to translate existing expression for Point & Click mode. Restart with empty expression? Unable to translate expression for Point & Click mode. Switch to Text Builder mode?
214
Unica Confidential
16743 16744 16745 16746 16747 16748 16750 16751 16752 16753 16754 16755 16901 16903 16906 16908 16909 17001 17003 17006 17008 17009 17012 17013 17014
Current expression is not valid. Switch to Text Builder mode anyway? Tree expansion error Folder already exists. About to execute trigger command. Are you sure? Derived variable name conflicts with an existing Persistent Derived Field No delimiter is specified. No derived variable name has been specified. Selected segments have different audience levels Illegal field name. User Variable values may only be set in a Select process The full name is too long. An administrator must define at least one audience level before a new table can be created. Remap of Optimized List table is not permitted. Stored template internal error. The template name is empty. Stored template unknown function tag. UNICA_ACTPLDIR directory value does not exist. Directory set in UNICA_ACTPLDIR is not a directory. Stored work group internal error. The work group name is empty. Stored work group unknown function tag. UNICA_ACCATDIR directory value does not exist. Directory set in UNICA_ACCATDIR is not a directory. The catalog file extension is invalid. Only 'cat' and 'xml' are allowed. Target catalog file extension is not same as original. Affinium Data Folder Identifier is empty.
Version 6.4
Unica Confidential
215
17015 17016 17101 17102 17103 17104 17105 17106 17107 17108 17109 17110 17112 17113 17114 17115 17116 17117 17201 17202 17203 17204 17205 17302 17303 17304
Affinium Data Folder Path is empty. Duplicate Identifiers in Affinium Data Folders. Group process internal error. No input is selected. No audience is chosen. No query string. No filter query string. No based-on function is chosen. No based-on field is chosen. No level is selected. No count operator is chosen. Group process cell locking error. Group process unknown function tag. Group process report locking error. The chosen audience is not in the selected table. An invalid audience level is chosen. Unknown parameter for Audience Process. Command not allowed in Reader mode List box selection error Dialog initialization error Tree expansion error Combo box insertion error
Invalid cell size limit. Optimize process internal error. Optimize process cell locking error. Optimize process table locking error.
216
Unica Confidential
17306 17307 17308 17309 17311 17313 17314 17315 17316 17317 17318 17319 17321 17322 17323 17324
Optimize process unknown function tag error. Optimize process report locking error. No input is selected. No fields are selected for export.
17325 Channel not found for selected offer. 17326 Cell is missing offer assignment. 17327 Internal Error: Offer is missing. 17328 Internal Error: Channel is missing. 17329 Score field is not specified. 17351 Selection error 17352 Selection not found 17402 CreateSeg process internal error.
Version 6.4
Unica Confidential
217
17403 CreateSeg process cell locking error. 17404 CreateSeg process unknown function tag. 17405 No input is selected. 17406 Segment name not unique. 17407 Segment name not specified. 17408 Invalid segment name. 17452 Segment name not specified 17502 Internal error. 17503 Cell locking error 17504 Table locking error. 17505 Unknown function tag error. 17507 Report locking error. 17509 No input is selected. 17510 Contact list page: No export table is selected 17511
Contact list page: No export fields are chosen
17512 Log page: No table is chosen to log contacts. 17513 Log page: No fields are chosen to log contacts. 17514 Getting cell field infomation error. 17515 No trigger is specified. 17516 Contact list page: no sort field is chosen. 17518 Invalid field name. 17519 Double to string conversion error. 17521 Contact list page: No export file is chosen. 17522 Contact list page: No delimiter is specified. 17523 Contact list page: No export dictionary file is chosen. 17524 Log page: No file is chosen to log contacts.
218
Unica Confidential
17525 Log page: No delimiter is specified for contacts. 17526 Log page: No dictionary file is specified for contacts. 17527 Contact List Page: Selected Data Export Filename contains Invalid Path 17528 Contact List Page: Selected Data Dictionary for Export File contains an Invalid Path. 17529 Contact List Page: No skip duplicate field is chosen. 17530 Contact List Page: Update Records require a base table with audience same as input. 17531 Log Page Contact: Update Records require a base table with audience same as input. 17532 Selected input cells have different audience levels. 17533 Empty or Duplicate Cell Codes. 17534 Log page: No skip duplicate field is chosen. 17535 Contact list page: Selected Data Dictionary File does not exist. 17538 Offer codes are not unique. 17539 Command not allowed in Reader mode 17540 Invalid Offer ID in eMessage Document 17541 Empty audience level. 17542 No offers are selected. 17544 Missing offer assignment. 17549 Error returned from eMessage server during run. 17550 Internal error: unknown eMessage status. 17552 List box selection error 17553 Selection not found 17554 Offer name or code is empty. 17555 Records for this Process are cleared from Contact History and Tracking tables. 17557 sure?
About to clear Contact History and Tracking table records for this Process. Are you
17558 Invalid expiration duration specified. 17559 Document settings updated from eMessage server.
Version 6.4
Unica Confidential
219
17560 Duplicate tracking codes not allowed. 17561 Cannot determine tracking audience level. 17562 Invalid number of contacts 17563 Invalid number of responses 17564 Invalid or missing start/end date 17565 Start date is later than end date 17570 Missing field assignment for document PF. 17571 Missing field assignment for offer parameter. 17572 Missing field assignment for tracking field. 17573 eMessage directory is invalid. 17574 Missing field assignment for content type. 17575 eMessage is still completing the last operation. Please try again later. 17576 No eMessage document selected. 17577 Unknown parameter. 17578 Invalid parameter. 17579 DOM creation error. 17580 Multiple cells selected. Assignment rule will apply to all selected cells. 17581 Internal Error: Offer is missing. 17582 Internal Error: Channel is missing. 17583 specified.
Contact History is tracked at a different audience level. All audience ID fields must be
17584 No output queue selected. 17585 Output queue not found. 17586 Required field not found in output queue. 17587 Log page: Contact History Table is not yet defined for this audience level. 17588 audience level.
Output page advanced settings: Contact History Table is not yet defined for this
220
Unica Confidential
Output page advanced settings: Response History Table is not yet defined for this
17590 Offer URL parameters changed. Process box must be re-configured 17602 Response process internal error. 17603 Response process cell locking error. 17604 Response process table locking error. 17605 Response process unknown function tag error. 17607 Response process report locking error. 17608 Response process getting cell field infomation error. 17611
Double to string conversion error.
17613 Empty audience level. 17614 No input is selected. 17615 Selected input cells have different audience levels. 17616
No offers selected.
17617 One or more offers are missing cell assignments. 17618 Offer Code Field is missing. 17620 Campaign Code Field is missing. 17621 Cell Code Field is missing. 17622 Channel Code Field is missing. 17623 Product ID Field is missing. 17624 No table is chosen to log for other destination. 17625 Update Records require a base table with audience same as tracking. 17626 No file is chosen to log for other destination. 17627 No delimiter is specified for logging to delimited file. 17628 No dictionary file is specified for logging. 17629 No fields are chosen to log for other destination.
Version 6.4
Unica Confidential
221
17630 Invalid field name. 17631 Offer with selected response type is already added in this process. 17632 Response type(s) not specified. 17633 Response channel is not specified. 17634 Response date field is not a date type field. 17635 Response date value is not in the specified format. 17636 No offer is selected 17637 Internal Error: Offer not found. 17638 Internal Error: Contact channel not found. 17639 Internal Error: Campaign not found. 17640 Offer field must be specified to track all incoming responses. 17651 List box selection error 17653 Response name is empty 17654 Records for this Process are cleared from Response History and Tracking tables. 17655 sure?
About to clear Response History and Tracking table records for this Process. Are you
17656 Response channel is not specified. 17657 Records for this Process are cleared from Contact History and Tracking tables. 17658 sure?
About to clear Contact History and Tracking table records for this Process. Are you Contact History is tracked at a different audience level. All audience ID fields must be
17659 specified.
17702 Cube process internal error. 17703 Cube process cell locking error. 17704 Cube process unknown function tag. 17705 No input cell or segment. 17706 Segment name not unique.
222
Unica Confidential
17713 No output cube specified. 17714 Dimension no longer exists. 17715 Selected Segment is based on an unknown audience level. 17717 Report locking error. 17718 Invalid field name. 17752 Cube name is missing. 17753 There are no dimensions available. 17754 There are no dimensions specified for this cube. 17755 Invalid configuration: duplicate dimensions selected. 17800 Error formatting date for display. 17801 Error parsing user input date. 17802 Error formatting currency value for display. 17803 Error parsing user input currency value. 17804 Error formatting number for display. 17805 Error parsing user input number. 17806 Error formatting time for display. 20000 Internal Error: Unknown function tag. 20002 DOM exception 20003 Pipe open error 20004 Offer code not unique 20005 End date specified is earlier than start date 20006 Invalid Report name 20007 Invalid Attribute name 20008 Offer is used. Can not delete. 20009 Folder contains used offer(s). Can not delete. 20010 Invalid character(s) were found in a Numeric Field.
Version 6.4
Unica Confidential
223
20011
20012 Offer version name not unique 20013 Invalid cube specification 20014 Invalid Effective Date 20015 Invalid Expiration Date 20016 Expiration Date specified is earlier than Effective Date 20017 Offer version code not unique 20018 already exists in this folder.
Folder names must be unique within the same folder. The specified folder name
20019 Cannot remove folder: folder contents (files/subfolders) must first be removed. 20020 Folder contains in use segment(s). Can not move. 20021 Can not delete. 20022 Can not move. 20023 Folder contains active segment(s). Can not delete. 20024 Folder contains inactive segment(s). Can not delete.
By logging into TeamTrack at http://team.unicacorp.com/tmtrack/tmtrack.dll?. For more information on how to use TeamTrack, see Working with TeamTrack on page 225. By email at support@unicacorp.com By phone at 781.839.8250
If you are not a designated support contact at your company, please contact your Affinium administrator for information on who to contact within your company to address any issues.
224
Unica Confidential
When logging a call with Unica Technical Support the following information may be needed in order to properly diagnose your issue.
Affinium application name and version number Environment details - server operating system, database, and web application (if necessary) Brief description of the nature of your issue Detailed error messages you see when the issue occurs Detailed steps to reproduce the issue Related log files, session files, configuration files, data files, and so on.
Gathering this information prior to submitting your issue into Technical Support could help in finding a resolution more quickly.
Open a web browser and enter the following URL: TeamTrack at http://team.unicacorp.com/tmtrack/tmtrack.dll? TeamTrack URL prompts you for a user name and password as shown in Figure B-1:
Version 6.4
Unica Confidential
225
Enter your user name and password. If you do not already have a User Name and Password for TeamTrack, please call or email Unica Technical Support to have one set up for you. We require the following information to create a new TeamTrack account:
226
Unica Confidential
Click the link under Incident Number to view all the associated details for that incident.
Version 6.4
Unica Confidential
227
If you want to add a note, URL, file, or item link to the incident, select the corresponding option in the Actions drop-down list, as shown in Figure B-4:
228
Unica Confidential
If you want to send email from the incident, click the envelope icon as shown in Figure B-5:
Figure B-5 The envelope icon
Searching in TeamTrack
If you entered an incident in TeamTrack, you can search for it to get updated information on its resolution status. To search in TeamTrack
1
Click the Search button at the top of the screen and enter the keywords you want to search for. If you want to see all the issues entered for your Company, click on the Search button and do not enter any keywords. Make sure you include both the Active and Inactive Status types, as shown in Figure B-6:
Version 6.4
Unica Confidential
229
230
Unica Confidential
Version 6.4
Unica Confidential
231
232
Unica Confidential
GLOSSARY
A
ACO Affinium Campaign
See Affinium Campaign Optimize. Software that provides a complete set of campaign management capabilities that allow marketers to create, test, optimize, deploy and analyze multi-wave, cross-channel marketing campaigns quickly and easily. Marketing campaigns can be simulated before execution, enabling a marketer to project anticipated ROI results. Software that enables marketing organizations to distribute the execution of centrally managed marketing campaigns throughout the enterprise to agents, branch managers, field sales, etc. It also allows organizations to ensure that corporate business rules and best practices are enforced while allowing execution and controlled customization. An email application that enables marketers to create, preview, test, execute, and track personalized email communications. It provides reports on key measurements such as click-throughs, opt-outs, and undeliverable messages. With eMessage, email marketing can be coordinated with other marketing efforts. A real-time personalization application that allows marketers to utilize data from all customer interactions to provide the right level of personalization and most effective offer, content, or service to individuals across all real-time channels. It combines predictive analysis, current interaction context and business objectives and rules to deliver powerful personalization.
Unica Confidential
233
Glossary
A world-class optimization application that enables marketers to determine the optimal interaction strategy for each customer over time. It looks across selected marketing campaigns, offers, and touch points to respect customer privacy, limit contact fatigue, prevent conflicting offers, meet channel or inventory capacity limitations, and maximize marketing ROI and profitability. Unicas award-winning data-mining and predictive analysis application that provides segmentation and profiling, valuation, response modeling, and cross selling features to solve specific marketing problems. It is the only data-mining product that automates the model building and optimization process. This capability allows you to very quickly create very accurate predictive models. A marketing planning application which empowers the entire marketing team to define, coordinate, resolve, automate, simulate, and monitor various marketing plans, programs and tasks across initiatives. Affinium Plan eases organizational collaboration and provides real-time visibility into all marketing activities within an organization. This means marketers achieve improved decision making, collaboration program management, enhanced financial management, and increased productivity and performance. Software that provides centralized management and control of authentication and security for the Affinium suite. It is a repository that stores information such as user passwords, user group privileges, and data source credentials. See Affinium Security Manager (ASM).
Affinium Model
Affinium Plan
ASM
C
campaign channel
A related selection and execution of activities to achieve marketing communication or sales objectives. A means of contacting, being contacted by, or interacting with a customer or prospect as part of a campaign. Examples include direct mail, telemarketing, fax, customer service or support, point-of-sale, email, and Web sites.
234
Unica Confidential
Glossary
The process of clicking on an online advertisement on a website and arriving at the advertiser's destination. See Affinium Campaign Collaborate. Typed instructions used to run a piece of software. Commands are typed into a command-line interface and used instead of clicking or doubleclicking an icon. A customer or prospect interaction via a channel during a campaign. Examples might include receiving a direct-mail item, getting a telemarketing call, receiving a fax, being told of a special coupon offer at a point of sale, phoning technical support, etc. Identifying customers who are the best prospects for the purchase of additional products and services and for upgrading their existing products and services. The goal is to increase share of wallet. Revenue can increase immediately, but loyalty is typically enhanced as well due to increased customer involvement.
contact
cross-selling
D
data
Values collected through record keeping or by polling, observing, or measuring, typically organized for analysis or decision-making. More simply, data are facts, transactions, and figures. A subset of a data warehouse that focuses on one or more specific areas. The data usually is extracted from the data warehouse and further de-normalized and indexed to support intense usage in support of a specific application, such as campaign management or analytics. The structure in which a piece of software stores information. In a relational database, data models are built from tables. A data model shows what kinds of information an application can store and process. Any system for storing and delivering very large quantities of data.
data mart
data model
data source
E
EMM
Version 6.4
Unica Confidential
235
Glossary
EMM software applications enable you to realize more effective and efficient marketing efforts by touching on all the key areas of marketing, including customer relationship management, brand and product management, strategic planning, and resource management. File that stores data only as text or binary characters. Columns and rows are designated by special characters and/or by using fixed widths..
O
offer one-to-one marketing Optimize opt-in opt-out
An offer is the entire package that a customer may buy. It may include guarantees, bonuses, price reductions, or other incentives. One-to-one marketing (sometimes called 1:1 marketing) is a customer relationship management strategy that emphasizes personalized contact with customers. See Affinium Campaign. Request contact. Request no contact.
P
path
A filename that is fully specified relative to the root directory (as opposed to the current directory). For example, C:\affinium\bin. This is also called a pathname. Describing customers based on available data. Customers may be described in terms of demographics, communications, purchase history, and/or behavior. The application of modeling results to inputs, such as lists of customers and associated information, to predict customer behavior (for example, who is likely to respond to a particular promotion).
profiling
predictive modeling
R
response modeling
Response modeling is used to improve customer response rates by targeting prospects who are most likely to respond to a particular advertisement
236
Unica Confidential
Glossary
or promotion. Instead of contacting every prospect on a list, response modeling lets you select only those with a high probability of responding positively. This is achieved by building a model to predict the likelihood that an individual will respond based on demographic, lifestyles, and psychotropic data, as well as purchasing history.
repository ROI
A shared database with the complete revision history of all files under version control. Return on investment, or ROI, is the value (incremental revenue resulting from the campaign) divided by the total cost of campaign. An ROI greater than 1.0 represents a profitable campaign.
S
segmentation
Segmentation partitions the customer base into mutually exclusive and cumulatively exhaustive groups. The members of each are as similar to each other as possible and as different as possible from members of other groups. Segmentation enables fine-tuning of messages based on unique needs and values of each group. The effectiveness of many predictive models can be improved by modeling within, rather than across, segments.
T
touch point
See contact.
U
UDI Universal Dynamic Interconnect
See Universal Dynamic Interconnect. Universal Dynamic Interconnect, or UDI, is a technology that provides simultaneous connectivity to existing databases and flat files. Data from multiple sources can be used together within a single campaign, as long as a common identifier or translation is available.
Version 6.4
Unica Confidential
237
Glossary
V
valuation
Predicting the monetary value and profitability of a particular customer over time, enabling organizations to target desirable customers and allocate marketing resources strategically and cost-effectively A symbol that can hold different values at different times. For example, the variable username may contain the value cgrant when Cary Grant is working with the software, and later may contain bjones when Brigitte Jones logs in.
variable
238
Unica Confidential
Index
A
accessing administrative tasks 28 Admin menu 29 Advanced Settings 28, 32 Database Sources 42 Dimension Hierarchies 45 Tables 41 Administration link Manage Audience Levels 31, 47 Manage Dimension Hierarchies 31, 45 Manage Table Mappings 31, 41 View Datasource Access 31, 42 View System Log 31, 49 administrative tasks accessing 28 overview 28 Advanced Settings Affinium Virtual Memory Usage 37 Auto-save 34 Checkpoint 35 Disallow Use of Temporary Tables 38 Enable Test Run Output 38 Max Data Errors Allowed 36 Save Flowchart Run Results 33 Send Trigger on Session Run Errors 36 Send Trigger on Session Success 37 server optimization 37 test run settings 38 Use In-DB Optimization During Flowchart Run 33 Y2K Threshold 33 Affinium Security Manager 11 Suite 8 Applications 9 Compatibility 11 Key capabilities 11 Affinium Campaign basic concepts 19 introduction to 17 listener file (unica_aclsnr) 136 session utility (unica_acsesutil) 150 options 150 return values 153 syntax 150 trigger utility (unica_actrg) 130 Affinium Server Manager (unica_svradm) 140 commands Collaborate-only cap 141 uncap 147 Connect 141 Disconnect 142 Exit 142 Help 142 Kill 143 Quit 143 Resume 143 Run 143 Save 144 Set 144 Shutdown 145 Status 145 Unica Confidential
239
Index Stop 145 Suspend 146 Version 147 name 140 Affinium Virtual Memory Usage see Admin menu Advanced Settings attributes creating custom 94, 97 audience levels managing 28, 47 specifying 70 Audience process 21 authorizing pending processes Auto-save see Admin menu Advanced Settings
D
data exporting from Campaign 82 data dictionary creating 91 editing 91 specifying 66 Data mart 11 Data model 11 Data source Connectivity 11 Database Connectivity 11 Database Sources 42 database tables creating 86 database testing utilities 154 cxnset 154 db2test 156 odbctest 157 oratest 159 databases load utility 148 logging in and out of 28, 42, 43 viewing 43 db2test utility 156 Decision process 21 default.cat, loading 104 dimension hierarchies loading stored 116 managing 28, 45 storing 115 updating 115 dimension tables 58 Disallow Use of Temporary Tables see Admin menu Advanced Settings Disconnect command 142
28
B
base record tables
58
C
Campaign overview 18 campaigns overview 19 cap command 141 Checkpoint see Admin menu Advanced Settings Compatibility 11 Connect command 141 Contact Unica 14 cookies, interaction with table catalogs and dimension hierarchies 104 custom attributes creating 97 custom macros 29 cxnset utility 154
240
Unica Confidential
Index
E
EMM see Enterprise Marketing Management Enable Test Run Output see Admin menu Advanced Settings Enterprise Marketing Management 8 Exit command 142 exporting data 82 overriding preset field lengths 93 to a flat file 83 to database table 86 Extract process 21
K
Kill command
143
L
legacy system tables 168 logging in/out databases 43 logs clearing 31 clearing files 122 enabling 30 managing 47 setting options 28, 30 view system log 49 viewing 30 viewing files 120
F
failed flowchart runs 54 Flat files Connectivity 11 flat files creating 83 flowcharts actions on Monitoring page 52 killing 147 monitoring active runs 28, 31 overview of 19 resuming 52, 54, 55 run failed 54 statuses on Monitoring page 52 stopping 52, 54 suspending 52, 54, 55 viewing active runs 49
M
Manage Audience Levels 31 Manage Dimension Hierarchies 31 Manage Table Mappings 31 mapping destinations for exported data 82 export data to flat file 83 export data to new database table remapping tables 87 system tables 59 unmapping tables 88 user tables 41, 62 Max Data Errors Allowed see Admin menu Advanced Settings Merge process 21 modeling, predictive 236 Monitoring display actions 52 flowchart statuses 52 linking to campaigns 51 linking to flowcharts 51 refreshing 52
86
G
general tables GUI 25
58
H
Help 15 Help command
142
Version 6.4
Unica Confidential
241
Index
R
28, 31, 49
recompute table counts and values 106 Resume command 143 resuming flowcharts 52, 54, 55 Run command 143 run stopped 54
O
odbctest utility 157 offer attributes creating custom 97 offers codes 25 overview 24 versions 24 Online help 15 oratest utility 159 overview administrative tasks 28 Affinium Campaign 18 offers 24 processes 20 system tables 59 user tables 58
S
Sample process 21 Save command 144 Save Flowchart Run Results see Admin menu Advanced Settings Segment process 21 Select process 21 Send Trigger on Session Run Errors see Admin menu Advanced Settings Send Trigger on Session Success see Admin menu Advanced Settings session overview 19 Set command 144 Shutdown command 145 status of flowcharts 52 Status command 145 Stop command 145 stopping flowcharts 52, 54 stored objects derived fields 30 table catalogs 30 templates 30 triggers 30 Suspend command 146 suspending flowcharts 52, 54, 55 System requirements 12 system tables DDL utilities 90 field definitions 162
P
parallel processing 236 parameter list 30 pending user authorizations predictive modeling 236 processes data manipulation 21 optimization 23 overview 20 running 22
30
Q
Quit command
143
242
Unica Confidential
Index
legacy tables 168 list of 162 mapping 59 overview 59, 162 remapping 87 storing in databases unmapping 88 viewing 89
37
90
U
UDI see Universal Dynamic Interconnect uncap command 147 Unica Affinium Suite 8 Contact information 14 Technical support 15 unica_svradm see Affinium Server Manager Universal Dynamic Interconnect 9, 11 Use In-DB Optimization During Flowchart Run see Admin menu Advanced Settings user authorizations 28, 30, 39 user tables base record 58 computing counts and values 106 dimension 58 general 58 managing table catalogs 99 mapping 41, 62 mapping to database table 76 mapping to flat file 63 overview 58 recomputing counts and values 106 remapping 87 unmapping 88 viewing 89 user variables 30
T
table catalogs 99 creating 101 loading 104 managing 99 opening 100 saving 103 storing 104 updating 106 tables defined 118 see user tables and system tables Technical support 15, 224 tokens triggers 125 Tools menu Clear Log 29 Custom Macros 29 Enable Logging 29 Logging Options 29, 48 Parameter List 29 Pending User Authorization List 39 Stored Derived Fields 29 Stored Table Catalogs 29 Stored Templates 29 Stored Triggers 29 User Authorization List 29 User Variables 29 View Log 29 triggers overview 124 send on session run errors 36
V
Version command 147 View Datasource Access View Log 30
31
Version 6.4
Unica Confidential
243
Index
Y
Y2K Threshold see Admin menu Advanced Settings
244
Unica Confidential
Affinium Macros
Users Guide
For the Affinium Suite Version 6
Copyright
Copyright, Unica Corporation 1992 - 2004. All rights reserved. Unica Corporation Reservoir Place North 170 Tracer Lane Waltham, MA 02451-1379
Examples and Data
All software and related documentation is subject to restrictions on use and disclosure as set forth in the Unica Software License and Services Agreement, with restricted rights for U.S. government users and applicable export regulations. Companies, names, and data used in examples herein are fictitious unless otherwise noted.
Trademarks and Patents
Unica is registered in the U.S. Patent and Trademark Office. Unica Affinium, Affinium, Affinium Campaign, Affinium Campaign Optimize, Affinium Campaign Interact, Affinium Campaign eMessage, Affinium Campaign Collaborate, Affinium Mart, Affinium Model, Affinium Plan, Affinium Report, Universal Dynamic Interconnect, Interconnect Modules, Powering Marketing Innovation, Customer Value Maximization, MAP, and One-to-One Optimization are trademarks of Unica Corporation. All other trademarks are the property of their respective owners. Portions of the software described in this document are covered by U.S. Patent No. 6,317,752 and U.S. Patent No. 6,269,325. NOTICE: This document contains confidential and proprietary information of Unica Corporation (Unica). Use, duplication, or disclosure without the express written consent of Unica Corporation is prohibited.
Document Information
Affinium Macros Users Guide, For the Affinium Suite Version 6 ATD 01-10030-100, 4/28/05
Table of Contents
Preface About Affinium and This Guide 9
Introducing Affinium Macros ............................................................. .10 The Macro Language.................................................................. .10 Logical Operators ....................................................................... .11 Mathematical Operators ............................................................. .12 Operator Precedence ................................................................. .13 About the Affinium Suite ................................................................... .15 About This Guide .............................................................................. .19 Typographic Conventions ........................................................... .19 Special Information ..................................................................... .20 Keyboard Conventions ............................................................... .21 Feedback .................................................................................... .21 Technical Support............................................................................. .21 Users Guide ............................................................................... .21 Online Help ................................................................................. .22 Unica Technical Support............................................................. .22
Chapter 1
23
Macro Function Summaries.............................................................. .24 Statistical Functions .................................................................... .24 Math and Trigonometric Functions ............................................. .26 String Functions .......................................................................... .30 Date and Time Functions............................................................ .32 Grouping Functions .................................................................... .33 Miscellaneous Functions ............................................................ .33 Macro Function Parameters ............................................................. .34 Format Specifications ................................................................. .34 Use of Constants ........................................................................ .35
Unica Confidential
Table of Contents
Chapter 2
37
Macro Function Summaries ...............................................................38 Statistical Functions .....................................................................38 Math and Trigonometric Functions...............................................40 Engineering Functions..................................................................45 String Functions ...........................................................................46 Date and Time Functions .............................................................47 Grouping Functions ......................................................................48 Miscellaneous Functions ..............................................................49 Notes on Macro Reference Pages ...............................................50 Macro Function Parameters ...............................................................50 Format Specifications...................................................................51 Use of Cell and Column Ranges ..................................................52 Use of Constants..........................................................................53 Computational Precision ..............................................................54 Invalid Cell Results and Blank Cells.............................................55
Chapter 3
59
ABS ....................................................................................................59 ACOS .................................................................................................61 ACOT .................................................................................................63 ALIGN.................................................................................................65 AND....................................................................................................66 ASIN ...................................................................................................68 ASSIGNOFFER..................................................................................71 ATAN..................................................................................................72 AVG....................................................................................................74 AVG_DEV .........................................................................................77 BETWEEN..........................................................................................79 BIT_AND ............................................................................................80 BIT_NOT ............................................................................................82 BIT_OR ..............................................................................................84 BIT_XOR ............................................................................................86 BUFFER ............................................................................................88 CEILING .............................................................................................90 COLUMN............................................................................................92 CONSTANT........................................................................................94
Unica Confidential
Table of Contents
COS....................................................................................................96 COSH .................................................................................................98 COT..................................................................................................100 COUNT.............................................................................................102 COUNT_DIFF...................................................................................103 COV..................................................................................................105 CURRENT_DATE ............................................................................106 CURRENT_DAY ..............................................................................107 CURRENT_JULIAN .........................................................................108 CURRENT_MONTH.........................................................................109 CURRENT_TIME .............................................................................109 Date setting on your web application .........................................109 CURRENT_WEEKDAY....................................................................111 CURRENT_YEAR ............................................................................112 CV_FOLDS ......................................................................................113 DATALINK........................................................................................115 DATE................................................................................................116 DATE_FORMAT...............................................................................120 DATE_JULIAN .................................................................................121 DATE_STRING ................................................................................122 DAY_BETWEEN ..............................................................................124 DAY_FROMNOW.............................................................................125 DAY_INTERVAL ..............................................................................126 DAYOF .............................................................................................127 DDELINK..........................................................................................127 DECIMATE.......................................................................................128 DELAY..............................................................................................130 DERIVATIVE ....................................................................................131 DISTINCT.........................................................................................133 DIV ...................................................................................................134 EQ ....................................................................................................136 EXP ..................................................................................................139 EXTRACT.........................................................................................140 FACTORIAL .....................................................................................143 FLOOR .............................................................................................144 FORMAT ..........................................................................................146 FRACTION .......................................................................................149 GAUSS.............................................................................................150
Unica Confidential
Table of Contents
GAUSS_AREA .................................................................................153 GE ....................................................................................................156 GRID ................................................................................................158 GROUPBY .......................................................................................160 GROUPBY_WHERE ........................................................................162 GT ....................................................................................................164 HISTOGRAM....................................................................................166 IF ......................................................................................................168 IN......................................................................................................170 INIT...................................................................................................172 INT....................................................................................................173 INTEGRAL .......................................................................................175 INVERSE..........................................................................................177 IS ......................................................................................................178 ISERROR .........................................................................................179 ISEVEN ............................................................................................180 ISMEMBER ......................................................................................182 ISODD ..............................................................................................184 KURTOSIS ......................................................................................185 LAG ..................................................................................................188 LE .....................................................................................................190 LIKE..................................................................................................192 LN or LOG ........................................................................................194 LOG2................................................................................................196 LOG10..............................................................................................197 LOWER ............................................................................................199 LT .....................................................................................................200 LTRIM...............................................................................................202 MAX..................................................................................................203 MAXINDEX.......................................................................................205 MEAN ...............................................................................................207 MERGE ............................................................................................210 MIN...................................................................................................212 MINUS..............................................................................................214 MOD .................................................................................................216 MONTHOF .......................................................................................219 MULT................................................................................................219 NE ....................................................................................................222
Unica Confidential
Table of Contents
NORM_MINMAX ..............................................................................224 NORM_SIGMOID.............................................................................229 NORM_ZSCORE .............................................................................233 NOT..................................................................................................238 NPV ..................................................................................................239 NUMBER..........................................................................................241 OFFSET ...........................................................................................250 OR ....................................................................................................251 PCA ..................................................................................................253 PCA_FEATURES.............................................................................255 POSITION ........................................................................................257 PLUS ................................................................................................259 POW.................................................................................................261 RANDOM .........................................................................................263 RANDOM_GAUSS...........................................................................265 RANK ...............................................................................................266 REPEAT ...........................................................................................268 ROTATE_LEFT ................................................................................270 ROTATE_RIGHT..............................................................................272 ROUND ............................................................................................273 ROWNUM ........................................................................................275 RTRIM ..............................................................................................275 SAMPLE_RANDOM.........................................................................276 SELECT ...........................................................................................277 SIGN.................................................................................................279 SIN ...................................................................................................281 SINH.................................................................................................283 SKEW...............................................................................................285 SLIDE_WINDOW .............................................................................287 SORT ...............................................................................................290 SQRT ...............................................................................................292 STAT ................................................................................................294 STDV or STDEV...............................................................................296 STRING_CONCAT...........................................................................299 STRING_HEAD................................................................................301 STRING_LENGTH ...........................................................................302 STRING_PROPER...........................................................................304 STRING_SEG ..................................................................................305
Unica Confidential
Table of Contents
STRING_TAIL ..................................................................................307 SUBSAMPLE ...................................................................................308 SUBSTITUTE ...................................................................................310 SUBSTR or SUBSTRING.................................................................312 SUM .................................................................................................313 TAN ..................................................................................................315 TANH................................................................................................317 TO ....................................................................................................319 TOTAL..............................................................................................320 TRANSPOSE ...................................................................................322 TRUNCATE......................................................................................323 UPPER .............................................................................................325 VARIANCE .......................................................................................326 WEEKDAY .......................................................................................328 WEEKDAYOF ..................................................................................330 XOR..................................................................................................331 XTAB ................................................................................................333 YEAROF...........................................................................................335
Index
337
Unica Confidential
This preface provides information about the Affinium suite of applications and the conventions used in this Users Guide. Key topics include: Introducing Affinium Macros About the Affinium Suite About This Guide Technical Support
Unica Confidential
Not all macros can be used with all products. Chapter 1, Using Macros in Affinium Campaign describes those macros available to users of Affinium Campaign, and Chapter 2, Using Macros in Affinium Model describes those macros available to users of Affinium Model. Model-only macros are indicated in the Table of Contents and in Chapter 3, Affinium Macros Reference, by the icon: .
10
Unica Confidential
Campaign Users Guide for complete details on how to create and use derived fields. Similar to Microsoft Excel, the macro language provides a set of functions that take one or more input parameters and produce output. Some macro functions operate only on numeric data, others only on string data, and some on both numeric and string data. The macro language consists of mathematical operators and over 100 different macro functions to manipulate numbers, dates, and strings, compute statistics and mathematical functions, and execute if/then and other logic. The language is designed to be easy-to-use with online help and optional parameters, so that basic operation can be simply accessed. Syntax error checking is automatically performed within Affinium Campaign and Affinium Model and any errors are reported to the user for correction. In addition to the macro language, each Affinium application supports the use of an unlimited number of temporary variables and the ability to write complex, multi-line programs using the macro language. For additional details, refer to the appropriate Affinium Users Guide.
Note
Numeric counts used by these macros are given using a 1-based system (that is, where the initial value in any count is 1, not 0).
Logical Operators
To review the precedence order of the logical and mathematical operators, see Operator Precedence, on page 13.
Operator
! or NOT < or LT > or GT <= or LE >= or GE == or EQ or =
Description
Logical NOT operator Less than Greater than Less than or equal to Greater than or equal to Equal
Unica Confidential
11
Operator
!= or <> or NE && or AND || or OR IS IN BETWEEN LIKE
Description
Not equal Logical AND operator Logical OR operator Search condition, typically NULL, TRUE, FALSE, or UNKNOWN Compares two values to determine if the provided value is found in a subquery or list Compares two values to determine if the provided value is between two other values Compares two strings to determine if the provided string matches the template string
Mathematical Operators
To review the precedence order of the logical and mathematical operators, see Operator Precedence, below.
Operator ~ or BIT_NOT ^ or POW * or MULT / or DIV % or MOD + or PLUS - or MINUS & or BIT_AND | or BIT_OR BIT_XOR or XOR Description Bitwise NOT Exponential power Multiplication Division Modulo Addition Subtraction1 Bitwise AND Bitwise OR Bitwise XOR
12
Unica Confidential
1. The minus sign is not to be confused with a negative sign preceding a value, which has precedence over all operators. For example -2^2 = 4 (negative two is squared, not two squared and then made negative).
Operator Precedence
Logical and mathematical operators are listed in the following table in their precedence order. Operators within the same group (delineated with double rules) have the same precedence. (Where equivalent operations exist, their precedence order conforms to the C standard.)
|| or OR && or AND XOR or BIT_XOR | or BIT_OR NOT BETWEEN & or BIT_AND IS IN LIKE == or EQ or = != or <> or NE < or LT > or GT <= or LE >= or GE Logical OR operator Logical AND operator Bitwise XOR Bitwise OR Logical NOT operator Compares two values to determine if the provided value is between two other values Bitwise AND Search condition, typically NULL, TRUE, FALSE, or UNKNOWN Compares two values to determine if the provided value is found in a subquery or list Compares two strings to determine if the provided string matches the template string Equal Not equal Less than Greater than Less than or equal to Greater than or equal to
Unica Confidential
13
Addition Subtraction1 Multiplication Division Modulo Exponential power Bitwise NOT Logical NOT operator
1. The minus sign is not to be confused with a negative sign preceding a value, which has precedence over all operators. For example -2^2 = 4 (negative two is squared, not two squared and then made negative).
14
Unica Confidential
Unica Confidential
15
Affinium technology delivers an integrated suite of applications that address the comprehensive scope of EMM:
Affinium Model is Unicas award-winning data-mining and predictive analysis application that provides segmentation and profiling, valuation, response modeling, and cross selling features to solve specific marketing problems. It is the only data-mining product that automates the model building and optimization process. This capability allows you to very quickly create very accurate predictive models. Affinium Campaign provides a complete set of campaign management capabilities that allow marketers to create, test, optimize, deploy and analyze multiwave, cross-channel marketing campaigns quickly and easily. Marketing campaigns can be simulated before execution, enabling a marketer to project anticipated ROI results.
16
Unica Confidential
Affinium Campaign Collaborate enables marketing organizations to distribute the execution of centrally managed marketing campaigns throughout the enterprise to agents, branch managers, field sales, etc. It also allows organizations to ensure that corporate business rules and best practices are enforced while allowing execution and controlled customization. Affinium Campaign eMessage is an email application that enables marketers to create, preview, test, execute, and track personalized email communications. It provides reports on key measurements such as click-throughs, opt-outs, and undeliverable messages. With eMessage, email marketing can be coordinated with other marketing efforts. Affinium Campaign Interact is a real-time personalization application that allows marketers to utilize data from all customer interactions to provide the right level of personalization and most effective offer, content, or service to individuals across all real-time channels. It combines predictive analysis, current interaction context and business objectives and rules to deliver powerful personalization. Affinium Campaign Optimize is a world-class optimization application that enables marketers to determine the optimal interaction strategy for each customer over time. It looks across selected marketing campaigns, offers, and touch points to respect customer privacy, limit contact fatigue, prevent conflicting offers, meet channel or inventory capacity limitations, and maximize marketing ROI and profitability. Affinium Plan is a marketing planning application which empowers the entire marketing team to define, coordinate, resolve, automate, simulate, and monitor various marketing plans, programs and tasks across initiatives. Affinium Plan eases organizational collaboration and provides real-time visibility into all marketing activities within an organization. This means marketers achieve improved decision making, collaboration program management, enhanced financial management, and increased productivity and performance. Affinium Security Manager (ASM) provides centralized management and control of authentication and security for the Affinium suite. It is a repository that stores information such as user passwords, user group privileges, and data source credentials.
Unica Confidential
17
UDI Interconnectivity
Affiniums Universal Dynamic Interconnect (UDI) technology forms the foundation of the Affinium suite of products, providing simultaneous, dynamic connectivity to your existing databases and flat files. By using UDI, you can use data from multiple sources, as long as a common identifier is available. UDI technology connects directly to existing databases and flat files, so you can have Affinium applications up and running quickly without needing to first establish a separate datamart or data model. Unicas Affinium suite is able to simultaneously access and manipulate information from multiple databases and flat files through UDI. This includes capabilities to not only read but also write data, making Affinium compatible with multiple touch point systems, such as contact center applications.
Universal Dynamic Interconnect (UDI) technology allows marketers to adapt to an ever-changing marketing data environment. A fully integrated marketing suite with integrated analytics, predictive and historical modeling, campaign management, email marketing, and crosschannel real-time personalization provides consistent and effective one-toone interactions. One-to-one marketing achieved by targeting the right people, at the right time, through multiple channels, with the right offer. A central location for implementing cross-channel marketing methodology and building campaign and interaction logic minimizes hard-coding of rules within your touch point systems and allows for consistent customer treatment and branding. Real-time personalization and optimization at each touch point increases the effectiveness of each offer. Enterprise-wide planning, tracking, and collaboration capabilities provide real-time visibility into all marketing initiatives, increase marketing velocity, and enable control over the achievement of marketing objectives.
18
Unica Confidential
Automatic optimization of campaigns based on corporate-wide rules, constraints, scoring, and a patented optimization algorithm maximizes your campaign objectives.
This guide assumes familiarity with Microsoft Windows environments. You must also have Microsoft Internet Explorer 6.0 or higher installed on your system. For more information about system requirements, please contact your Affinium administrator.
Typographic Conventions
Specific conventions are used in this guide to convey additional information about a subject. Style
Code
Description
Code style is used for text that is used literally, appearing exactly as shown. This includes command names, path names, and system information. Italic code style is used for names of variables that you must provide. For example, you need to supply a value for your_file in the path name example to the right. Bold code style is used to indicate the option used by default if none is specified. The GUI style is used to indicate objects in the applications interface or keys on your keyboard.
Example
\Affinium\model\model.exe
Italic code
\Affinium\data\your_file
Bold code
{ALL | COL | ROW} the User Name field, the Enter key
GUI
Unica Confidential
19
Style [] {} |
Description
Square brackets are used to enclose optional items in format and command syntax descriptions. Braces enclose a list from which you must choose an option. A vertical bar separates items in a list. Ellipses in a syntax description indicate that the preceding parameter can be repeated multiple times. For instance, you could use multiple filenames as parameters in the example to the right.
Example
macro_name(required_var [, optional_variable]) {ALL | COL | ROW} {ALL | COL | ROW}
run filename,
Special Information
Note
Notes in the text are displayed like this. They highlight information or provide supplementary information.
Tip
Tips and/or short-cuts for using the software are displayed like this. They offer time-saving information or easier ways to perform the same task.
Important Critical information is displayed with this label, to inform you of an important
20
Unica Confidential
Technical Support
Keyboard Conventions
Convention KEY1 + KEY2 KEY1 - KEY2 Keystrokes
A plus sign (+) between two keys means to press both keys down at the same time. A dash (-) between two keys means to press one key, followed by the other.
Alt-F-P means to press the Alt key followed by the letter F, and then the letter P.
Feedback
We appreciate your comments about this Guide. Please contact us: By Mail: By Phone: By Email:
Unica Corporation, Technical Documentation Reservoir Place North, 170 Tracer Lane, Waltham, MA 02451-1379 781.839.8250 support@unicacorp.com
Technical Support
We offer three technical support resources: the Affinium Macros Users Guide, the Affinium Macros Online Help, and Unicas Technical Support department.
Users Guide
The Affinium Macros Users Guide is designed to allow you to begin using Affinium Macros quickly. It will also help you develop a clear understanding of the product that will enable you to continue to explore it and learn on your own.
Unica Confidential
21
Online Help
You can click Help in the Affinium Macros toolbar to view the Affinium Macros online help. The online help is a portable source of information about the application that you can easily access any time you want to learn more about Affinium Macros.
(If you are not a designated support contact at your company, please contact your Affinium administrator for information on who to contact within your company to address any issues.)
22
Unica Confidential
This chapter provides usage information about the macros available for use in Affinium Campaign. All Affinium Campaign users should read this chapter before attempting to use the reaminder of this manual. Key topics include: Macro Function Summaries Macro Function Parameters
Unica Confidential
23
Not all macros listed in this guide are available in Affinium Campaign. Macros available only in Affinium Model are denoted by this icon: .
Statistical Functions Math and Trigonometric Functions String Functions Date and Time Functions Grouping Functions Miscellaneous Functions
Detailed reference pages for each macro function are provided in alphabetical order starting in Chapter 3, Affinium Macros Reference, on page 59. Macro Function Parameters on page 34 provides information on macro function input parameters.
Statistical Functions
Macro Name Returns
Single value in a new column for the ALL keyword; one column with a single value for each input column for the COL keyword; one column with a value for each row for the ROW keyword. Single value in a new column.
Description
AVG
COUNT
24
Unica Confidential
Macro Name
Returns
Single value in a new column for the ALL keyword; one column with a single value for each input column for the COL keyword; one column with a value for each row for the ROW keyword. Single value in a new column for the ALL keyword; one column with a single value for each input column for the COL keyword; one column with a value for each row for the ROW keyword. Single value in a new column for the ALL keyword; one column with a single value for each input column for the COL keyword; one column with a value for each row for the ROW keyword. Single value in a new column for the ALL keyword; one column with a single value for each input column for the COL keyword; one column with a value for each row for the ROW keyword.
Description
MAX
MEAN
MIN
STDV or STDEV
Unica Confidential
25
Macro Name
Returns
Single value in a new column for the ALL keyword; one column with a single value for each input column for the COL keyword; one column with a value for each row for the ROW keyword.
Description
VARIANCE
Returns
One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column
Description
Computes the absolute value of the contents of the specified data range Computes the arc cosine of the contents of the specified data range Computes the arc cotangent of the contents of the specified data range Computes the arc sine of the contents of the specified data range Computes the arc tangent of the contents of the specified data range Calculates the arithmetic mean or average of the cells in the specified data range Compares two values to determine if the provided value is between two other values Computes the ceiling of each value in the specified data range
ACOS
ACOT
ASIN
ATAN
AVG
BETWEEN
CEILING
26
Unica Confidential
Macro Name
COLUMN
Returns
One column for each input column One column for each input column One column for each input column One column for each input column One column containing a single value One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column
Description
Creates new column(s), vertically concatenating the input values in each column Computes the cosine of the contents of the specified data range Computes the hyperbolic cosine of the contents of the specified data range Computes the cotangent of the contents of the specified data range Counts the number of cells containing values in the specified data range Computes the natural number (e) raised to the contents of each cell in the specified data range Computes the factorial of each value in the specified data range Computes the floor of each value in the specified data range Returns the fractional part of each value in the specified data range Computes the integer value (rounded down) of the contents of the specified data range Computes the negative of the contents of the specified data range Computes the natural log of the contents of the specified data range
COS
COSH
COT
COUNT
EXP
FACTORIAL FLOOR
FRACTION
INT
INVERSE
LN
Unica Confidential
27
Macro Name
LOG
Returns
One column for each input column One column for each input column One column for each input column Single value in a new column for the ALL keyword; one column with a single value for each input column for the COL keyword; one column with a value for each row for the ROW keyword. Single value in a new column for the ALL keyword; one column with a single value for each input column for the COL keyword; one column with a value for each row for the ROW keyword. Single value in a new column for the ALL keyword; one column with a single value for each input column for the COL keyword; one column with a value for each row for the ROW keyword. One column with the specified number of values
Description
Computes the natural log of the contents of the specified data range Computes the log base-2 of the contents of the specified data range Computes the log base-10 of the contents of the specified data range
LOG2
LOG10
MAX
MEAN
MIN
RANDOM
28
Unica Confidential
Macro Name
RANDOM_GAUSS
Returns
One column with the specified number of values One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column Single value in a new column for the ALL keyword; one column with a single value for each input column for the COL keyword; one column with a value for each row for the ROW keyword. Single value in a new column for the ALL keyword; one column with a single value for each input column for the COL keyword; one column with a value for each row for the ROW keyword. One column for each input column
Description
Returns the specified number of random values from a Gaussian distribution Computes the rounded value of the contents of the specified data range Computes the sign (positive or negative) of the values in the specified data range Computes the sine of the contents of the specified data range Computes the hyperbolic sine of the contents of the specified data range Computes the square root of the contents of the specified data range
ROUND
SIGN
SIN
SINH
SQRT
STDV or STDEV
SUM
TAN
Unica Confidential
29
Macro Name
TANH
Returns
One column for each input column Single value in a new column for the ALL keyword; one column with a single value for each input column for the COL keyword; one column with a value for each row for the ROW keyword. One column for each input column Single value in a new column for the ALL keyword; one column with a single value for each input column for the COL keyword; one column with a value for each row for the ROW keyword.
Description
Computes the hyperbolic tangent of the contents of the specified data range
TOTAL
TRUNCATE
Returns the non-fractional part of each value in the specified data range
VARIANCE
String Functions
Macro Name Returns Description
Provides output formatting control for both numbers and strings (e.g., output width, alignment, numeric precision, decimal point symbol, grouping symbol, etc.). Returns the formatted output string. Determines if a text string matches a specified pattern
FORMAT
LIKE
30
Unica Confidential
LOWER LTRIM
One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column with a value for each row of the shortest input column One column for each input column One column for each input column
Converts string value to lowercase Removes leading space characters from each string value Converts ASCII text strings for times and dates to numerical values Returns the starting position of a pattern in a text string Removes trailing space characters from each string value Concatenates two text strings from the specified data ranges Returns the first n characters of each string in the specified data range Returns the length of each string in the specified data range Converts each string value by changing the first letter or any letter that follows a white space character or symbol (other than underscore) into uppercase, and all other characters to lowercase Returns the string segment between two specified indices Returns the last n characters of each string in the specified data range Returns characters from a string from a starting position Converts string value to uppercase
NUMBER
POSITION RTRIM
STRING_CONCAT
STRING_HEAD
STRING_LENGTH
STRING_PROPER
STRING_SEG
One column for each input column One column for each input column One column for each input column One column for each input column
Unica Confidential
31
Returns
One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column
Description
Returns the current date in
format
Returns the current day of the month as a number between 1 31 Returns the Julian number for the current date Returns the current month of the year as a number between 112 Returns the current time as a string Returns the current weekday of the month as a number between 06 Returns the current year as a number Converts a date string into a Julian date Transforms date formats Returns the Julian date Returns the date string of the Julian date Returns the number of days between two dates Returns the number of days from the current date to the specified date
CURRENT_JULIAN
CURRENT_MONTH CURRENT_TIME
CURRENT_WEEKDAY
DAY_FROMNOW
32
Unica Confidential
One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column
Returns the number of days between two dates Returns the day of the month as a number Returns the month of the year as a number Converts ASCII text date strings to the day of the week Returns the weekday of the week as a number Returns the year as a number
Grouping Functions
Macro Name
GROUPBY
Returns
One new column with a value for each row One new column with a value for each row
Description
Summarizes across multiple rows of data within a group Summarizes across multiple rows of data that meet a specified condition and are within a group
GROUPBY_WHERE
Miscellaneous Functions
Macro Name
IF
Returns
One column with a value for each row of the shortest input column One column with a value for each row of the shortest input column
Description
Begins a conditional if-then-else statement Returns a one if any value in the input row contains an error (???) cell, else zero
ISERROR
Unica Confidential
33
ISEVEN ISODD
One column for each input column One column for each input column One column for each input column
Tests if input values are even (that is, divisible by two) Tests if input values are odd (that is, not divisible by two) Generates sequential numbers from one to the number of records
ROWNUM
Format Specifications
This section describes the format for some commonly used parameters. It applies to all references to these parameters by macro function specifications in this chapter.
data The data parameter represents a data column for a macro function to act upon. It can be a constant or a field. See the specific macro function for details.
Note
Affinium Campaign does not support calculations on multiple fields at once, or on a subset of rows, as can be done in Affinium Model. Some other parameter names also use the same format as data. The description of these parameters will reference this section and format.
34
Unica Confidential
keyword The keyword parameter controls the behavior of the macro function. It indicates that a keyword can be specified (if it is omitted, the default is used). The keyword choices will be listed for each individual macro function in the following form:
{choice1 | choice2 | choice3}
Select the keyword choice providing the desired behavior. The default choice is shown in bold. For example, given the following options:
{RADIANS | DEGREES}
Note
Many macro functions take the keyword parameters {ALL | COL | ROW}. These keywords do not apply in Affinium Campaign because the input data is always a single column or field. The macro will always behave as if the COL keyword were specified. Therefore, you do not need to specify these keywords when using Affinium Campaign.
Use of Constants
Most of the macro function parameters can take numeric constants or expressions evaluating to a numeric constant (macro functions operating on strings can take string constants). In macro functions performing record-by-record operations (e.g., adding two numeric columns), using a constant is equivalent to specifying a column containing that constant value in each row. Essentially, when a constant is provided as an input parameter, the constant is expanded to same length as the input. Some macro functions can take ASCII text strings as well as numerical constants. Parameters that can accept both numeric constants and ASCII text strings are noted in the Parameters section of each macro function. Examples are provided in the following table.
Unica Confidential
35
Function Definition
PERCENT_UTILIZ = (CURR_BAL*100)/ CREDIT_LIM
36
Unica Confidential
This chapter provides usage information about the macros available for use in Affinium Model. All Affinium Model users should read this chapter before attempting to use the remainder of this manual. Key topics include: Macro Function Summaries Macro Function Parameters
Unica Confidential
37
Statistical Functions
Macro Name
AVG
Returns
Single value in a new column for the ALL keyword; one column with a single value for each input column for the COL keyword; one column with a value for each row for the ROW keyword. Single value in a new column for the ALL keyword; one column with a single value for each input column for the COL keyword; one column with a value for each row for the ROW keyword. Single value in a new column
Description
AVG_DEV
HISTOGRAM
Computes the histogram of a specified data range using provided bin boundaries
38
Unica Confidential
Macro Name
KURTOSIS
Returns
Single value in a new column for the ALL keyword; one column with a single value for each input column for the COL keyword; one column with a value for each row for the ROW keyword. Single value in a new column for the ALL keyword; one column with a single value for each input column for the COL keyword; one column with a value for each row for the ROW keyword. Single value in a new column for the ALL keyword; one column with a single value for each input column for the COL keyword; one column with a value for each row for the ROW keyword. Variable number of columns (see macro) Single value in a new column for the ALL keyword; one column with a single value for each input column for the COL keyword; one column with a value for each row for the ROW keyword.
Description
MEAN
SKEW
STAT
Computes the first through fourth moments of the specified data range
STDV or STDEV
Unica Confidential
39
Macro Name
VARIANCE
Returns
Single value in a new column for the ALL keyword; one column with a single value for each input column for the COL keyword; one column with a value for each row for the ROW keyword. One column for each distinct value in the second input parameter with a number of rows equal to the number of distinct values in the first input parameter
Description
XTAB
Calculates distinct values in two columns and returns the COUNTOF each combination
Returns
One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column
Description
Computes the absolute value of the contents of the specified data range Computes the arc cosine of the contents of the specified data range Computes the arc cotangent of the contents of the specified data range Computes the arc sine of the contents of the specified data range Computes the arc tangent of the contents of the specified data range Computes the ceiling of each value in the specified data range
ACOS
ACOT
ASIN ATAN
CEILING
40
Unica Confidential
Macro Name
COS COSH
Returns
One column for each input column One column for each input column One column for each input column One column containing a single value Single value in one or more columns One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column
Description
Computes the cosine of the contents of the specified data range Computes the hyperbolic cosine of the contents of the specified data range Computes the cotangent of the contents of the specified data range Counts the number of cells containing values in the specified data range Computes the covariance of two input ranges Computes the derivative of the values in the specified data range Divides one specified data range by another Returns TRUE if one data range is equal to another Computes the natural number (e) raised to the contents of each cell in the specified data range Computes the factorial of each value in the specified data range Computes the floor of each value in the specified data range Returns the fractional part of each value in the specified data range Calculates the Gaussian of the values in the specified data range
COT
COUNT
GAUSS
Unica Confidential
41
Macro Name
GAUSS_AREA
Returns
One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column
Description
Calculates the area under the Gaussian of the values in the specified data range Returns TRUE if one data range is greater than or equal to another Returns TRUE if one data range is greater than another Computes the integer value (rounded down) of the contents of the specified data range Computes the integral of the values in the specified data range Computes the negative of the contents of the specified data range Tests if input values are even (that is, divisible by two) Tests if input values are odd (that is, not divisible by two) Returns TRUE if one data range is less than or equal to another Computes the natural log of the contents of the specified data range Computes the natural log of the contents of the specified data range Computes the log base-2 of the contents of the specified data range
GE
GT INT
INTEGRAL INVERSE
ISEVEN ISODD LE LN
LOG
LOG2
42
Unica Confidential
Macro Name
LOG10
Returns
One column for each input column One column for each input column Single value in a new column for the ALL keyword; one column with a single value for each input column for the COL keyword; one column with a value for each row for the ROW keyword. Single value in a new column for the ALL keyword; one column with a single value for each input column for the COL keyword; one column with a value for each row for the ROW keyword. One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column
Description
Computes the log base-10 of the contents of the specified data range Returns TRUE if one data range is less than another
LT MAX
MIN
Subtracts one specified data range from another Computes the modulo of the contents of the specified data range Multiplies the contents of two data ranges Returns TRUE if one data range is not equal to another Adds the contents of two data ranges Computes a base value raised to the specified exponential power(s)
Unica Confidential
43
Macro Name
RANDOM RANDOM_GAUSS
Returns
One column with the specified number of values One column with the specified number of values One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column Single value in a new column for the ALL keyword; one column with a single value for each input column for the COL keyword; one column with a value for each row for the ROW keyword. One column for each input column One column for each input column
Description
Returns the specified number of random numbers Returns the specified number of random values from a Gaussian distribution Computes the rounded value of the contents of the specified data range Computes the sign (positive or negative) of the values in the specified data range Computes the sine of the contents of the specified data range Computes the hyperbolic sine of the contents of the specified data range Computes the square root of the contents of the specified data range
ROUND
SIGN
SIN SINH
SQRT
SUM
TAN TANH
Computes the tangent of the contents of the specified data range Computes the hyperbolic tangent of the contents of the specified data range
44
Unica Confidential
Macro Name
TOTAL
Returns
Single value in a new column for the ALL keyword; one column with a single value for each input column for the COL keyword; one column with a value for each row for the ROW keyword. One column for each input column
Description
TRUNCATE
Returns the non-fractional part of each value in the specified data range
Engineering Functions
DELAY One column for each input column GRID Returns the input column(s) values delayed by a specified number of time steps Returns a grid of all possible value combinations (one per row) Returns the input column(s) values lagging by a specified number of time steps Computes the min/max normalization of a data range Computes the sigmoidal normalization of a data range Computes the z-score normalization of a data range
One column for each input column One column for each input column One column for each input column
NORM_SIGMOID
NORM_ZSCORE
Unica Confidential
45
PCA One column for each input column, plus one PCA_FEATURES SAMPLE_RANDOM One column for each input column SLIDE_WINDOW One column for each input column, plus one
Computes the eigenvectors for principal components of the specified data range Extracts n features from the specified data range Returns column(s) of n cells, each containing a random sample from the specified data range Creates a pattern from a specified window and slides it down to create the next pattern Sorts the values in the specified data range in ascending or descending order Reduces data by returning every n-th row value
SORT One column for each input column SUBSAMPLE One column for each input column
String Functions
DISTINCT FORMAT One column for each input column One column for each input column Provides output formatting control for both numbers and strings (e.g., output width, alignment, numeric precision, decimal point symbol, grouping symbol, etc.). Returns the formatted output string. Determines if a text string matches a specified pattern
LIKE
46
Unica Confidential
NUMBER
One column for each input column One column for each input column One column with a value for each row of the shortest input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column
Converts ASCII text strings for times and dates to numerical values Returns the starting position of a pattern in a text string Concatenates two text strings from the specified data ranges Returns the first n characters of each string in the specified data range Returns the length of each string in the specified data range Returns the string segment between two specified indices Returns the last n characters of each string in the specified data range Returns characters from a string from a starting position Returns characters from a string from a starting position
POSITION STRING_CONCAT
STRING_HEAD
SUBSTR SUBSTRING
format
Returns the current day of the month as a number between 1 31 Returns the Julian number for the current date
CURRENT_JULIAN
Unica Confidential
47
One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column One column for each input column
Returns the current month of the year as a number between 112 Returns the current time as a string Returns the current weekday of the month as a number between 06 Returns the current year as a number Converts a date string into a Julian date Transforms date formats Returns the month of the year as a number Converts ASCII text date strings to the day of the week Returns the weekday of the week as a number Returns the year as a number
Grouping Functions
Macro Name
GROUPBY GROUPBY_WHERE One new column with a value for each row
Returns
One new column with a value for each row
Description
Summarizes across multiple rows of data within a group Summarizes across multiple rows of data that meet a specified condition and are within a group
48
Unica Confidential
Miscellaneous Functions
BUFFER COLUMN One column for each input column One column for each input column One column for each input column Two columns CV_FOLDS One column with a value for each row of the shortest input column One column for each column of linked data One column for each column of linked data MAX_VALUE columns (one column for each output value) One column for each input column One column with a value for each row of the shortest input column One column One column with a value for each row of the shortest input column One column for each input column Copies the input data range, and updates dynamically Creates new column(s), vertically concatenating the input values in each column Copies the input data range once (no dynamic update) Returns each unique value in the input with a count of the number of times that value appeared Divides input patterns into n folds of data for cross-validation Creates an internal link to data in a Affinium Model spreadsheet Creates an external link to data from another Windows application Decimates a column of numbers into multiple columns where a one indicates the index value Extracts rows given the values in a predicate column Begins a conditional statement if-thenelse statement Initializes previous time step values for a recursive function Returns a one if any value in the input row contains an error (???) cell, else zero Tests an input range against a table of values, returning one if a value is contained in the table, else zero
CONSTANT COUNT_DIFF
EXTRACT IF
INIT ISERROR
ISMEMBER
Unica Confidential
49
MAXINDEX
One column with a value for each row of the shortest input column
Returns the column index of the nth (first, second, third, etc.) maximum value for each row of the specified column Divides data into nbins (default 10) groups, each with approximately an equal number of distinct values, and returns the group into which each row of data falls Sorts the specified data range in ascending or descending order
SORT
50
Unica Confidential
Format Specifications
This section describes the format for some commonly used parameters. It applies to all references to these parameters by macro function specifications in this chapter.
data The data parameter represents a data range for a macro function to act upon. It can typically be a constant, a column, or a cell range (see the specific macro function for details). The format for the data parameter is as follows: begin_data [: end_data]
where begin_data can be a constant (for example, 10.2), the name of a column (for example, V1), or a cell range (for example, V1[1:100]). The end_data parameter is optional. If it is provided, begin_data is used as a starting point and must be a column or a cell range. The ending point is specified by end_data.
Note
Some other parameter names also use the same format as data. The description of these parameters will reference this section and format.
keyword The keyword parameter controls the behavior of the macro function. It indicates that a keyword can be specified (if it is omitted, the default is used). The keyword choices will be listed for each individual macro function in the following form:
{choice1 | choice2 | choice3}
Select the keyword choice providing the desired behavior. The default choice is shown in bold. For example, given the following format:
{ALL | COL | ROW}
Unica Confidential
51
For example, with column ranges, the macro definition V6 = V1:V3 AND V4:V6 will generate three output columns (both data ranges contain three columns). Column V1 is AND-ed with column V4; column V2 is AND-ed with V5 and column V3 is AND-ed with V6. However, V6 = V1:V3 AND V4:V5 will only return two output columns (the first column range contains three columns, the second contains only two, and the lesser of the two is used). In this case, column V1 is AND-ed with column V4 and column V2 is AND-ed with V5. Column V3 is not used. With cell ranges, the macro definition V7 = V1[1:5]:V2 AND V4[10:50]:V5 will generate two output columns (both input ranges have two columns). The output columns V7 and V8 will contain five values (cells 15 AND-ed with cells 1014). The macro definition V7 = V1[1:5]:V2 AND V4 only generates one output column, because the second data range only contains one column.
Note
Specifying a column without a cell range is equivalent to specifying the entire column (that is, a cell range of one through the length of the column).
52
Unica Confidential
If you need to perform a row-by-row operation on a cell range and you wish to keep the results in the corresponding rows (that is, if you operate on cells [10:20] and you want the results to be placed in cells 10 20 of the resulting column), compute specify the cell range [1:20] instead. This will compute some unnecessary values, but it will place the results in the desired rows.
where [] represents a blank cell (that is, column V1 only contains two cell values). However, specifying V3 = V1*V2 would produce the two values 2 and 12 (calculations are performed up to the shorter of the two columns).
Use of Constants
Most of the macro function parameters can take numeric constants or expressions evaluating to a numeric constant (macro functions operating on strings can take string constants). In macro functions performing record-by-record operations, using a constant is equivalent to specifying a column containing that constant value in each row. Essentially, when a constant and a cell or column range are provided as input parameters, the constant is expanded to same dimensions as the cell or column range. Any column containing a single cell used as input in a macro function is considered a constant.
Unica Confidential
53
Some macro functions can take ASCII text strings as well as numerical constants. Parameters that can accept both numeric constants and ASCII text strings are noted in the Parameters section of each macro function. Examples are provided in the following table.
Table 2-1 Macro Function Examples Using Constants
Function Definition
V1=3+5
V2=2*V1
V2 = The constant ing is interpreted as a column containSTRING_CONCAT(V1, ing the same number of rows as the column V1, with each ing) row containing the constant ing. The column V2 will contain each of the text strings in V1 concatenated with ing. V4=V1:V3/ AVG(V1:V3) The expression AVG(V1:V3) evaluates to a constant value, say x. The constant x is interpreted as three columns containing as many rows as the shortest column of V1, V2, or V3. Each cell contains the constant x. The output columns, V4V6, will contain the values from columns V1V3 divided by x. The constant 2 is interpreted as a cell range with 11 rows, each containing the value 2.
V3=V1[10:20]^2
Computational Precision
All calculations in Affinium Model spreadsheets are limited to a maximum precision of 32-bits.
54
Unica Confidential
Integer Calculations
Macro functions performing integer calculations (BIT_AND, BIT_NOT, BIT_OR, BIT_XOR, and TO) do not handle negative numbers. Values must be between 0 24 ( 2 1 ) ; otherwise, an error is returned.
You may need to backtrace ??? values in any dependent columns to rectify the problem.
Important Any cells containing ??? passed to the experiment manager as part of a training
Unica Confidential
55
The MAXINDEX macro function ignores both blank cells and ??? cells. The OFFSET macro function ignores blank cells and ??? cells. The DDELINK macro function passes on blanks and ??? cells. For macro functions that skip blank cells, see Macro Function Examples Using Constants on page 54. Errors in ??? cells are still signalled and propagated. For macro functions that skip blank cells, but use ??? cells as described, see below. For macro functions that will return ??? for all cells if any of the cells in the listed argument(s) contain ???, see Macros Functions That Cannot Process ??? Cells on page 57.
56
Unica Confidential
Macro Function
CV_FOLDS DELAY FREQ EXTRACT LAG MERGE SORT SAMPLE_RANDOM SELECT SUBSAMPLE
Unica Confidential
57
58
Unica Confidential
This manual provides reference information for the available spreadsheet macro functions in the Affinium suite. The available macros are listed on the following pages, in alphabetical order. Each macro is provided with its syntax, possible parameters and some examples.
ABS
Syntax
ABS(data)
data The numerical values to compute the absolute value of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters on page 34 or Chapter 2, Using Macros in Affinium Model, on page 37 for the format definition of data.
ABS calculates the absolute value of the numbers in the specified data range. The
Parameters
Description
absolute value of a number is its value without its sign (that is, positive numbers
Unica Confidential
59
are unchanged; negative numbers are returned as positive numbers). ABS returns one new column for each input column, each containing the absolute value of numbers in the corresponding input column.
Examples TEMP = ABS(-3) or TEMP = ABS(3)
Creates a new column named TEMP, where each value is the absolute value of the contents of column V1.
TEMP = ABS(V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the absolute values of the contents of column V1, the values of the VX column are the absolute values of the contents of column V2, and the values of the VY column are the absolute values of the contents of column V3.
TEMP = ABS(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain the absolute values of the values in rows 1020 of column V1. The other cells in TEMP are empty.
TEMP = ABS(V1[1:5]:V2)
Creates two new columns named TEMP and VX, each with values in rows 15 (the other cells are empty). The values in column TEMP are the absolute values of the corresponding rows of column V1, and the values in column VX are the absolute values of the corresponding rows of column V2.
Related Functions
Function
SIGN
Description
Computes the sign (positive or negative) of the values in the specified data range
60
Unica Confidential
ACOS
ACOS
Syntax Parameters
ACOS(data [, units_keyword])
data The numerical values to compute the arc cosine value of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters on page 34 or Chapter 2, Using Macros in Affinium Model, on page 37 for the format definition of data. units_keyword This optional keyword determines whether the input values and results are interpreted as degrees or radians. Select one of the following:
RADIANPerforms the calculations in radians (default) DEGREEPerforms the calculations in degrees
If this parameter is not specified, the default is radians. (To convert from radians to degrees, divide by PI and multiply by 180.) See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Description ACOS calculates the arccosine of the values in the specified data range. The arccosine is the angle whose cosine is the contents of each cell. ACOS returns one
new column for each input column, each containing the arccosine of numbers in the corresponding input column. If the keyword RADIAN is used, ACOS returns values in the range 0 to . If the keyword DEGREE is used, ACOS returns values in the range 0 to 180.
Note
The cell contents of each specified column must have values between -1.0 and 1.0 inclusive. Otherwise, a blank cell is returned for each invalid input.
Unica Confidential
61
Creates a new column named TEMP containing the value 1.571 ( 2 radians). TEMP = ACOS(0, 1) or
TEMP = ACOS(0, DEGREE)
Creates a new column named TEMP, where each value is the arccosine (in radians) of the contents of column V1.
TEMP = ACOS(V1:V3, 1)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the arccosines of the contents of column V1, the values of the VX column are the arccosines of the contents of column V2, and the values of the VY column are the arccosines of the contents of column V3. All values are in degrees.
TEMP = ACOS(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain the arccosines of the values in rows 1020 of column V1 (in radians). The other cells in TEMP are empty.
TEMP = ACOS(V1[1:5]:V2)
Creates two new columns named TEMP and VX, each with values in rows 15 (the other cells are empty). The values in column TEMP are the arccosines of the corresponding rows of column V1, and the values in column VX are the arccosines of the corresponding rows of column V2. All values are in radians.
62
Unica Confidential
ACOT
Related Functions
Function
ACOT ASIN ATAN COS
Description
Computes the arc cotangent of the contents of the specified data range Computes the arc sine of the contents of the specified data range Computes the arc tangent of the contents of the specified data range Computes the cosine of the contents of the specified data range
ACOT
Syntax
ACOT(data [, units_keyword])
data The numerical values to compute the arc cotangent of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters on page 34 or Chapter 2, Using Macros in Affinium Model, on page 37 for the format definition of data. units_keyword This optional keyword determines whether the input values and results are interpreted as degrees or radians. Select one of the following:
RADIANPerforms the calculations in radians (default) DEGREEPerforms the calculations in degrees
Parameters
If this parameter is not specified, the default is radians. (To convert from radians to degrees, divide by PI and multiply by 180.) See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Unica Confidential
63
Description
ACOT calculates the arccotangent of the values in the specified data range. The
arccotangent is the reciprocal of the arctangent (the arctangent is the angle whose tangent is the contents of each cell). ACOT returns one new column for each input column, each containing the arccotangent of numbers in the corresponding input column.
Note
If a cell contains a value whose arctangent is zero, then the arccotangent is infinity. In this case, ACOT returns the largest 32-bit floating-point number.
Creates a column named TEMP containing the value 2.157 (radians). TEMP = ACOT(1, 1) or
TEMP = ACOT(1, DEGREE)
Creates a new column named TEMP, where each value is the arccotangent (in radians) of the contents of column V1.
TEMP = ACOT(V1:V3, 1)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the arccotangents of the contents of column V1, the values of the VX column are the arccotangents of the contents of column V2, and the values of the VY column are the arccotangents of the contents of column V3. All values are in degrees.
TEMP = ACOT(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain the arccotangents of the values in rows 1020 of column V1 (in radians). The other cells in TEMP are empty.
64
Unica Confidential
ALIGN
TEMP = ACOT(V1[1:5]:V2)
Creates two new columns named TEMP and VX, each with values in rows 15 (the other cells are empty). The values in column TEMP are the arccotangents of the corresponding rows of column V1, and the values in column VX are the arccotangents of the corresponding rows of column V2. All values are in radians.
Related Functions
Function
ACOS ASIN ATAN COT
Description
Computes the arc cosine of the contents of the specified data range Computes the arc sine of the contents of the specified data range Computes the arc tangent of the contents of the specified data range Computes the cotangent of the contents of the specified data range
ALIGN
Syntax
Parameters
Description
align a range with position identified by its series to the reference series each row in <range> has a corresponding number, as identified in <series>. the row is
Unica Confidential
65
aligned to the correct row offset by matching <series> to the offset in <reference_series>. if <series> does not contain the number in <reference_series>, 0 is padded. if <reference_series> does not contain the number in <series>, the row is ignored. f more than 1 row align with the reference series, the first one is used. this is used to align dates, as expressed by numbers, associated with time series starting from different dates. this way, we can generate a block where each row are data from the same day.
Examples
Related Functions
Function
Description
AND
Syntax
Parameters
66
Unica Confidential
AND
value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters on page 34 or Chapter 2, Using Macros in Affinium Model, on page 37 for the format definition of data1.
data2 The number(s) to logical AND with the values in data1. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. The number of columns in data2 must equal the number of columns in data1, unless data2 is a constant. See Macro Function Parameters on page 34 or Chapter 2, Using Macros in Affinium Model, on page 37 for the format definition of data2.
Description AND calculates the logical AND between the two specified data ranges. It returns a new column for each input column, each containing the corresponding column in data1 logically AND-ed to the corresponding column of data2 (that is, the first column of data1 is logically AND-ed to the first column of data, the second column with the second column, and so on).
If data2 is a constant, each value in data1 is logically AND-ed by that value. If data2 contains one or more columns, the calculations are performed on a row-by-row basis between one column from data2 and one column from data2. The first row of data1 is logically AND-ed to the first row value of data2, the second row with the second row, and so on. This row-by-row calculation produces a result for each row up to the last value of the shortest column.
Tip
The AND operator can be abbreviated with a double-ampersand (&&). Use the double-ampersand to separate the two arguments (for example, to specify V1 AND 3, you can simply type V1&&3).
Creates a new column named TEMP containing the value one (any non-zero number is treated as a one).
TEMP = V1 && 1
Creates a new column named TEMP with the value one for each value of column V1.
Unica Confidential
67
TEMP = V1 && V1
Creates a new column named TEMP with the value one for each non-zero value in column V1 and the value zero for each zero in column V1.
TEMP = V1 && V2
Creates a new column named TEMP, where each value is the row value of column V1 logically AND-ed with the corresponding row value of column V2.
TEMP = V1:V3 && V4:V6
Creates three new columns named TEMP, VX, and VY. The column TEMP contains the values in V1 logically AND-ed with the corresponding row values of column V4. The column VX contains the logically AND-ed values from columns V2 and V5. The column VY contains the logically AND-ed values from columns V3 and V6. TEMP = V1[10:20] && V2 or
TEMP = V1[10:20] && V2[1:11]
Creates a new column named TEMP, where the first 11 cells contain the logically AND-ed result of the values in rows 1020 of column V1 by the values in rows 111 of column V2. The other cells in TEMP are empty.
Related Functions
Function
NOT OR
Description
Computes the logical NOT of the contents of the specified data range Computes the logical OR between two specified data ranges
ASIN
Syntax
ASIN(data [, units_keyword])
68
Unica Confidential
ASIN
Parameters
data The numerical values to compute the arc sine of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters on page 34 or Chapter 2, Using Macros in Affinium Model, on page 37 for the format definition of data. units_keyword This optional keyword determines whether the input values and results are interpreted as degrees or radians. Select one of the following:
RADIANPerforms the calculations in radians (default) DEGREEPerforms the calculations in degrees
If this parameter is not specified, the default is radians. (To convert from radians to degrees, divide by PI and multiply by 180.) See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Description ASIN calculates the arcsine of the values in the specified data range. The arcsine is the angle whose sine is the contents of each cell. ASIN returns one new column
for each input column, each containing the arcsine of numbers in the corresponding input column. If the keyword RADIAN is used, ASIN returns values in the range -/2 to /2. If the keyword DEGREE is used, ASIN returns values in the range -90 to 90.
Note
The cell contents of each specified column must have values between -1.0 and 1.0 inclusive. Otherwise, ??? is returned for each invalid input.
Creates a new column named TEMP containing the value 0.524 ( 6 radians).
Unica Confidential
69
Creates a new column named TEMP, where each value is the arcsine (in radians) of the contents of column V1.
TEMP = ASIN(V1:V3, 1)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the arcsines of the contents of column V1, the values of the VX column are the arcsines of the contents of column V2, and the values of the VY column are the arcsines of the contents of column V3. All values are in degrees.
TEMP = ASIN(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain the arcsines of the values in rows 1020 of column V1 (in radians). The other cells in TEMP are empty.
TEMP = ASIN(V1[1:5]:V2)
Creates two new columns named TEMP and VX, each with values in rows 15 (the other cells are empty). The values in column TEMP are the arcsines of the corresponding rows of column V1, and the values in column VX are the arcsines of the corresponding rows of column V2. All values are in radians.
Related Functions
Function
ACOS ACOT ATAN SIN
Description
Computes the arc cosine of the contents of the specified data range Computes the arc cotangent of the contents of the specified data range Computes the arctangent of the contents of the specified data range Computes the sine of the contents of the specified data range
70
Unica Confidential
ASSIGNOFFER
ASSIGNOFFER
Syntax ASSIGNOFFER(offercode [, versioncode [,trackingcode [, score]]])
Parameters
offercode The offercode argument can be specified as a single delimited argument or it can consist of number of arguments that must matche the UACOfferCodeUsed parameter in unica_acsvr.cfg file. versioncode The versioncode argument... trackingcode score
Description
ASSIGNOFFER concatenates the data in the specified arguments and returns the same. The versioncode, trackingcode, and score parts are optional. So, the number of arguments cannot exceed the value of UACOfferCodeUsed plus 3.
Related Functions
Function
Description
Unica Confidential
71
ATAN
Syntax
ATAN(data [, units_keyword])
data The numerical values to compute the arc tangent of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters on page 34 or Chapter 2, Using Macros in Affinium Model, on page 37 for the format definition of data. units_keyword This optional keyword determines whether the input values and results are interpreted as degrees or radians. Select one of the following:
RADIANPerforms the calculations in radians (default) DEGREEPerforms the calculations in degrees
Parameters
If this parameter is not specified, the default is radians. (To convert from radians to degrees, divide by PI and multiply by 180.) See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Description ATAN calculates the arctangent of the values in the specified data range. The arctangent is the angle whose tangent is the contents of each cell. ATAN returns one
new column for each input column, each containing the arctangent of numbers in the corresponding input column. If the keyword RADIAN is used, ATAN returns values in the range -/2 to /2. If the keyword DEGREE is used, ATAN returns values in the range -90 to 90.
Examples TEMP = ATAN(1) or TEMP = ATAN(1, 0) or TEMP = ATAN(1, RADIAN)
Creates a new column named TEMP containing the value 0.785 ( 4 radians).
72
Unica Confidential
ATAN
Creates a new column named TEMP, where each value is the arctangent (in radians) of the contents of column V1.
TEMP = ATAN(V1:V3, 1)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the arctangents of the contents of column V1, the values of the VX column are the arctangents of the contents of column V2, and the values of the VY column are the arctangents of the contents of column V3. All values are in degrees.
TEMP = ATAN(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain the arctangents of the values in rows 1020 of column V1 (in radians). The other cells in TEMP are empty.
TEMP = ATAN(V1[1:5]:V2)
Creates two new columns named TEMP and VX, each with values in rows 15 (the other cells are empty). The values in column TEMP are the arctangents of the corresponding rows of column V1, and the values in column VX are the arctangents of the corresponding rows of column V2. All values are in radians.
Related Functions
Function
ACOS ASIN ATAN TAN
Description
Computes the arccosine of the contents of the specified data range Computes the arcsine of the contents of the specified data range Computes the arctangent of the contents of the specified data range Computes the tangent of the contents of the specified data range
Unica Confidential
73
AVG
Syntax
AVG(data [, keyword])
data The numerical values to compute the arithmetic mean of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters on page 34 or Chapter 2, Using Macros in Affinium Model, on page 37 for the format definition of data. keyword This optional keyword determines how the computation is performed over the input data range. Select one of the following:
ALLPerforms the computation on all cells in data (default) COLPerforms the computation separately for each column of data ROWPerforms the computation separately for each row of data
Parameters
See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Note
Many macro functions take the keyword parameters {ALL | COL | ROW}. These keywords do not apply in Affinium Campaign because the input data is always a single column or field. The macro will always behave as if the COL keyword were specified. Therefore, you do not need to specify these keywords when using Affinium Campaign.
AVG calculates the arithmetic mean or average of the cells in the specified data
Description
range. The arithmetic mean is calculated by summing the contents of all cells divided by the number of cells. The number of columns returned by AVG depends on keyword.
If keyword is ALL, AVG returns one new column, containing a single value (the average of all cells in data).
74
Unica Confidential
AVG
If keyword is COL, AVG returns a new column for each input column. Each new column contains one value (the average of all cells in the corresponding input column). If keyword is ROW, AVG returns one new column containing the average across each row of data.
Note
Tip
Creates a new column named TEMP containing a single value which is the arithmetic mean of the contents of column V1.
TEMP = AVG(V1:V3)
Creates a new column named TEMP containing a single value which is the arithmetic mean of the contents of columns V1, V2, and V3.
TEMP = AVG(V1[10:20])
Creates a new column named TEMP containing a single value which is the arithmetic mean of the cells in rows 1020 of column V1.
TEMP = AVG(V1[1:5]:V4)
Creates a new column named TEMP containing a single value which is the arithmetic mean of the cells in rows 15 of columns V1 through V4.
Unica Confidential
75
Creates three new columns named TEMP, VX, and VY. The single value in the TEMP column is the arithmetic mean of the contents of column V1, the single value in the VX column is the arithmetic mean of the contents of column V2, and the single value in the VY column is the arithmetic mean of the contents of column V3.
TEMP = AVG(MERGE(1,4), COL)
Creates two new columns named TEMP and VX. TEMP contains a single value of one; VX contains a single value of four.
TEMP = AVG(V1[1:5]:V3, COL)
Creates three new columns named TEMP, VX, and VY, each containing a single value. The value in column TEMP is the arithmetic mean of the cells in rows 15 of column V1, the value in column VX is the arithmetic mean of the cells in rows 15 of column V2, and the value in column VY is the arithmetic mean of the cells in rows 15 of column V3.
TEMP = AVG(V1, ROW)
Creates a new column named TEMP, containing the same values as column V1 (the arithmetic mean of any number is itself).
TEMP = AVG(V1:V3, ROW)
Creates a new column named TEMP where each cell entry is the arithmetic mean of the corresponding row across columns V1, V2, and V3.
TEMP = AVG(V1[1:5]:V3, ROW)
Creates a new column named TEMP, where the cells in rows 15 contain the arithmetic mean of the corresponding row across columns V1 through V3. The other cells in TEMP are empty.
Related Functions
Function
AVG_DEV SUM or TOTAL
Description
Computes the average deviation of a range of cells Computes the sum of a range of cells
76
Unica Confidential
AVG_DEV
AVG_DEV
Syntax
AVG_DEV(data [, keyword])
data The values to compute the average deviation of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above.See Macro Function Parameters on page 34 or Chapter 2, Using Macros in Affinium Model, on page 37 for the format definition of data. keyword This optional keyword determines how the computation is performed over the input data range. Select one of the following:
ALLPerforms the computation on all cells in data (default) COLPerforms the computation separately for each column of data ROWPerforms the computation separately for each row of data
Parameters
See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Description AVG_DEV calculates the average deviation of the values in the specified data range
from the mean. The arithmetic mean is calculated by summing the contents of all cells divided by the number of cells. The full equation for AVG_DEV is as follows:
x mean
i i
If keyword is ALL, AVG returns one new column, containing a single value (the average deviation of all cells in data). If keyword is COL, AVG returns a new column for each input column. Each new column contains one value (the average deviation of all cells in the corresponding input column).
Unica Confidential
77
If keyword is ROW, AVG returns one new column containing the average deviation across each row of data.
Note Examples
Creates a new column named TEMP containing a single value which is the average deviation of the contents of column V1.
TEMP = AVG_DEV(V1:V3)
Creates a new column named TEMP containing a single value which is the average deviation of the contents of columns V1, V2, and V3.
TEMP = AVG_DEV(V1[10: 20])
Creates a new column named TEMP containing a single value which is the average deviation of the cells in rows 1020 of column V1.
TEMP = AVG_DEV(V1[1:5]:V4)
Creates a new column named TEMP containing a single value which is the average deviation of the cells in rows 15 of columns V1 through V4.
TEMP = AVG_DEV(V1:V3, COL)
Creates three new columns named TEMP, VX, and VY. The single value in the TEMP column is the average deviation of the contents of column V1, the single value in the VX column is the average deviation of the contents of column V2, and the single value in the VY column is the average deviation of the contents of column V3.
TEMP = AVG_DEV(MERGE(1,4), COL)
Creates two new columns named TEMP and VX, both containing the single value 0.
78
Unica Confidential
BETWEEN
Creates three new columns named TEMP, VX, and VY, each containing a single value. The value in column TEMP is the average deviation of the cells in rows 15 of column V1, the value in column VX is the average deviation of the cells in rows 15 of column V2, and the value in column VY is the average deviation of the cells in rows 15 of column V3.
TEMP = AVG_DEV(V1, ROW)
Creates a new column named TEMP, containing a zero for each value of column V1 (the average deviation of any number is zero).
TEMP = AVG_DEV(V1:V3, ROW)
Creates a new column named TEMP where each cell entry is the average deviation of the corresponding row across columns V1, V2, and V3.
TEMP = AVG_DEV(V1[1:5]:V3, ROW)
Creates a new column named TEMP, where the cells in rows 15 contain the average deviation of the corresponding row across columns V1 through V3. The other cells in TEMP are empty.
Related Functions
Function
AVG or MEAN SUM or TOTAL
Description
Computes the arithmetic mean or average of a range of cells Computes the sum of a range of cells
BETWEEN
Syntax
Parameters Description
Unica Confidential
79
Note Examples
SELECT * FROM movie_titles WHERE our_cost BETWEEN 11.00 and 27.50 ; returns a list of movies that can be purchased for no less than $11.00, but cost no more than 27.50. 10 BETWEEN 5 AND 15
Is true, but:
10 BETWEEN 15 AND 5
Is false:
because the equivalent way of expressing BETWEEN (using AND) has a specific order that does not matter when you are using literals, but might matter a good deal if you provide value2 and value3 by using host variables, parameters, or even subqueries.
BIT_AND
Syntax
Parameters
80
Unica Confidential
BIT_AND
Description
BIT_AND performs a bitwise AND between the two specified data ranges. It
returns a new column for each input column, each containing the corresponding column in data1 bitwise AND-ed to the corresponding column of data2 (that is, the first column of data1 is bitwise AND-ed to the first column of data, the second column with the second column, and so on). If data2 is a constant, each value in data1 is bitwise AND-ed by that value. If data2 contains one or more columns, the calculations are performed on a row-by-row basis between one column from data2 and one column from data2. The first row of data1 is bitwise AND-ed to the first row value of data2, the second row with the second row, and so on. This row-by-row calculation produces a result for each row up to the last value of the shortest column.
Note
Precision for this macro function is limited to integer values less than 2 24 . No negative values are allowed.
Tip
The BIT_AND operator can be abbreviated with an ampersand (&). Use the ampersand to separate the two arguments (for example, to specify BIT_AND(V1, 3), you can simply type V1&3).
Creates a new column named TEMP containing the value three (bitwise AND of 011 and 111 equals 011).
TEMP = V1 & 8
Creates a new column named TEMP, where each value is the contents of column V1 bitwise AND-ed with the binary value 1000.
TEMP = V1 & V1
Creates a new column named TEMP containing the same contents as the column V1 (every value AND-ed with itself produces itself).
TEMP = V1 & V2
Creates a new column named TEMP, where each value is the row value of column V1 bitwise AND-ed with the corresponding row value of column V2.
Unica Confidential
81
Creates three new columns named TEMP, VX, and VY. The column TEMP contains the values in V1 bitwise AND-ed with the corresponding row values of column V4. The column VX contains the bitwise AND-ed values from columns V2 and V5. The column VY contains the bitwise AND-ed values from columns V3 and V6. TEMP = V1[10:20] & V2 or
TEMP = V1[10:20] & V2[1:11]
Creates a new column named TEMP, where the first 11 cells contain the bitwise AND-ed result of the values in rows 1020 of column V1 by the values in rows 111 of column V2. The other cells in TEMP are empty.
Related Functions
Function
BIT_NOT BIT_OR BIT_XOR or XOR
Description
Computes the bitwise NOT of the contents of the specified data range Computes the bitwise OR between two specified data ranges Computes the bitwise XOR between two specified data ranges
BIT_NOT
Syntax
Parameters
82
Unica Confidential
BIT_NOT
Description
BIT_NOT calculates the bitwise NOT of the values in the specified data range. It returns one new column for each input column, each containing the bitwise NOT of the values in the corresponding columns of data.
Note
Precision for this macro function is limited to integer values less than 2 24 . No negative values are allowed. Using a column containing the same number x in each row as data is the same as using the constant x as data.
Note
Tip
The BIT_NOT operator can be abbreviated with a tilda (~). Use the tilda before the data value (for example, to specify BIT_NOT(V1), you can simply type ~V1).
Creates a new column named TEMP containing the value four (bitwise NOT of 011 equals 100).
TEMP = ~V1
Creates a new column named TEMP, where each value is the bitwise NOT of the contents of column V1.
TEMP = ~V1:V3
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the bitwise NOT of the contents of column V1, the values of the VX column are the bitwise NOT of the contents of column V2, and the values of the VY column are the bitwise NOT of the contents of column V3.
TEMP = ~V1[100:200]
Creates a new column named TEMP, where the first 101 cells contain the bitwise NOT of the values in rows 150 of column V1.
Unica Confidential
83
Related Functions
Function
BIT_AND BIT_OR BIT_XOR or XOR
Description
Computes the bitwise AND between two specified data ranges Computes the bitwise OR between two specified data ranges Computes the bitwise XOR between two specified data ranges
BIT_OR
Syntax
Parameters
Description
BIT_OR performs a bitwise OR between the two specified data ranges. It returns
a new column for each input column, each containing the corresponding column in data1 bitwise OR-ed to the corresponding column of data2 (that is, the first column of data1 is bitwise OR-ed to the first column of data, the second column with the second column, and so on).
84
Unica Confidential
BIT_OR
If data2 is a constant, each value in data1 is bitwise OR-ed by that value. If data2 contains one or more columns, the calculations are performed on a rowby-row basis between one column from data2 and one column from data2. The first row of data1 is bitwise OR-ed to the first row value of data2, the second row with the second row, and so on. This row-by-row calculation produces a result for each row up to the last value of the shortest column.
Note
Precision for this macro function is limited to integer values less than 2 24 . No negative values are allowed.
Tip
The BIT_OR operator can be abbreviated with a vertical bar (|). Use the vertical bar to separate the two columns (for example, to specify BIT_OR(V1, 3), you can simply type V1|3). You also can use OR.
Creates a new column named TEMP containing the value seven (bitwise OR of 011 and 111 equals 111).
TEMP = V1 | 8
Creates a new column named TEMP, where each value is the contents of column V1 bitwise OR-ed with the binary value 1000.
TEMP = V1 | V1
Creates a new column named TEMP containing the same contents as the column V1 (every value OR-ed with itself produces itself).
TEMP = V1 | V2
Creates a new column named TEMP, where each value is the row value of column V1 bitwise OR-ed with the corresponding row value of column V2.
Unica Confidential
85
Creates three new columns named TEMP, VX, and VY. The column TEMP contains the values in V1 logically OR-ed with the corresponding row values of column V4. The column VX contains the logically OR-ed values from columns V2 and V5. The column VY contains the logically OR-ed values from columns V3 and V6. TEMP = V1[10:20] | V2 or
TEMP = V1[10:20] | V2[1:11]
Creates a new column named TEMP, where the first 11 cells contain the bitwise OR-ed result of the values in rows 1020 of column V1 by the values in rows 111 of column V2. The other cells in TEMP are empty.
Related Functions
Function
BIT_AND BIT_NOT BIT_XOR or XOR
Description
Computes the bitwise AND between two specified data ranges Computes the bitwise NOT of the contents of the specified data range Computes the bitwise XOR between two specified data ranges
BIT_XOR
Syntax
Parameters
86
Unica Confidential
BIT_XOR
be a constant value, a column, a cell range, or an expression evaluating to any of the above. The number of columns in data2 must equal the number of columns in data1, unless data2 is a constant. See Macro Function Parameters on page 34 or Chapter 2, Using Macros in Affinium Model, on page 37 for the format definition of data2.
Description BIT_XOR performs a bitwise XOR between the two specified data ranges. It
returns a new column for each input column, each containing the corresponding column in data1 bitwise XOR-ed to the corresponding column of data2 (that is, the first column of data1 is bitwise XOR-ed to the first column of data, the second column with the second column, and so on). If data2 is a constant, each value in data1 is bitwise XOR-ed by that value. If data2 contains one or more columns, the calculations are performed on a row-by-row basis between one column from data2 and one column from data2. The first row of data1 is bitwise XOR-ed to the first row value of data2, the second row with the second row, and so on. This row-by-row calculation produces a result for each row up to the last value of the shortest column.
Note
Precision for this macro function is limited to integer values less than 2 24 . No negative values are allowed.
Creates a new column named TEMP containing the value four (bitwise XOR of 011 and 111 equals 100).
TEMP = V1 BIT_XOR 8
Creates a new column named TEMP, where each value is the contents of column V1, bitwise XOR-ed with the binary value 1000.
TEMP = V1 BIT_XOR V1
Creates a new column named TEMP containing all zeros (every value XOR-ed with itself produces zero).
TEMP = V1 BIT_XOR V2
Creates a new column named TEMP, where each value is the row value of column V1 bitwise XOR-ed with the corresponding row value of column V2.
Unica Confidential
87
Creates three new columns named TEMP, VX, and VY. The column TEMP contains the values in V1 bitwise XOR-ed with the corresponding row values of column V4. The column VX contains the bitwise XOR-ed values from columns V2 and V5. The column VY contains the bitwise XOR-ed values from columns V3 and V6. TEMP = V1[10:20] BIT_XOR V2 or
TEMP = V1[10:20] BIT_XOR V2[1:11]
Creates a new column named TEMP, where the first 11 cells contain the bitwise XOR-ed result of the values in rows 1020 of column V1 by the values in rows 111 of column V2. The other cells in TEMP are empty.
Related Functions
Function
BIT_AND BIT_NOT BIT_OR
Description
Computes the bitwise AND between two specified data ranges Computes the bitwise NOT of the contents of the specified data range Computes the bitwise OR between two specified data ranges
BUFFER
Syntax
BUFFER(data)
data The values to copy as constants. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters on page 34 or Chapter 2, Using Macros in Affinium Model, on page 37 for the format definition of data.
BUFFER makes a static copy of the values in specified data range. These copied values change if the corresponding values in the input column(s) change. BUFFER
Parameters
Description
88
Unica Confidential
BUFFER
returns one new column for each input column, each containing a copy of the values in the corresponding input column.
Tip
Applying the BUFFER macro function can result in significant performance improvements in running experiments. If the input or output columns for an experiment are based on complex (slow) calculations in the spreadsheet, add the BUFFER macro function to each of the columns. This will calculate the values and store the calculated values. Otherwise, every time the experiment accesses the spreadsheet for pattern data, the values must be recomputed. If any of the input values change, the data in BUFFER will dynamically update like other macro functions in the spreadsheet.
Tip
If the data values will not ever change, use the CONSTANT macro function instead. This creates a static copy of the data range.
Note
If a user function is built from a function definition using the BUFFER macro function, the portion of the function definition enclosed in the BUFFER macro function is considered a constant. Any input variables will not be required to apply the user function.
Creates a new column named TEMP, where each value is a copy of the contents of column V1.
TEMP = BUFFER(V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are copies of the contents of column V1, the values of the VX column are copies of the contents of column V2, and the values of the VY column are copies of the contents of column V3.
Unica Confidential
89
TEMP = BUFFER(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain copies of the values in rows 1020 of column V1. The other cells in TEMP are empty.
TEMP = BUFFER(V1[50:99]:V2)
Creates two new columns named TEMP and VX, each with values in rows 150 (the other cells are empty). The values in column TEMP are copies of the rows of column V1, and the values in column VX are copies of the values in column V2.
TEMP = BUFFER(EXTRACT(!ISERROR(V1:V3), V1:V3))
Creates three new columns named TEMP, VX, and VY. The three columns contain the valid rows (that is, rows which do not contain any ??? cells) of columns V1V3. Wrapping the EXTRACT macro function inside CONSTANT prevents columns TEMP, VX, and VY from being recomputed if columns V1V3 change, thereby avoiding the computationally intensive EXTRACT macro function.
Related Functions
Function
CONSTANT
Description
Copies the input data range once (no dynamic update)
CEILING
Syntax
CEILING(data)
data The numerical values to compute the ceiling of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters on page 34 or Chapter 2, Using Macros in Affinium Model, on page 37 for the format definition of data.
CEILING calculates the ceiling of the values in the specified data range. The ceiling of a number is the smallest integer not less than the number. CEILING returns
Parameters
Description
90
Unica Confidential
CEILING
one new column for each input column, each containing the ceiling of numbers in the corresponding input column.
Examples TEMP = CEILING(4.3)
Creates a new column named TEMP, where each value is the ceiling of the contents of column V1.
TEMP = CEILING(V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the ceilings of the contents of column V1, the values of the VX column are the ceilings of the contents of column V2, and the values of the VY column are the ceilings of the contents of column V3.
TEMP = CEILING(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain the ceilings of the values in rows 1020 of column V1. The other cells in TEMP are empty.
TEMP = CEILING(V1[50:99]:V2)
Creates two new columns named TEMP and VX, each with values in rows 150 (the other cells are empty). The values in column TEMP are the ceilings of the rows of column V1, and the values in column VX are the ceilings of the values in column V2.
Related Functions
Function
FLOOR or INT FRACTION
Description
Computes the floor of each value in the specified data range Returns the fractional part of each value in the specified data range
Unica Confidential
91
Function
TRUNCATE
Description
Returns the non-fractional part of each value in the specified data range
COLUMN
Syntax
Parameters
Description
returns the same number of new columns as provided in each input parameter. An unlimited number of arguments can be provided. All arguments must be either numeric or ASCII text strings (that is, you cannot mix numeric and text values).
Tip
The COLUMN macro function can be abbreviated by listing the data arguments separated by commas inside parentheses (for example, (for example, TEMP = MEAN((1,2,3,4), ALL)). If not used inside another macro function, the pair of parentheses is not necessary (for example, V1=1,2,3 is equivalent to V1=COLUMN(1,2,3)).
92
Unica Confidential
COLUMN
Creates a new column named TEMP with the first three cells containing the values 3, 4, and 5.
TEMP = COLUMN(one,two, three)
Creates a new column named TEMP with the first three cells containing the values one, two, and three.
TEMP = AVG(V1), STDV(V1)
Creates a new column named TEMP with the average of column V1 in the first cell and the standard deviation of column V1 in the second cell.
TEMP = V1:V2, V3:V4
Creates two new columns named TEMP and VX where the column TEMP contains the values from column V1 followed by the values from column V3. The column VX contains the values from column V2 followed by the values from column V4.
TEMP = V1[1:10]:V2, V3:V4
Creates two new columns named TEMP and VX where the column TEMP contains the values from cells 110 of column V1 followed by all the values from column V3. The column VX contains the values from cells 110 of column V2 followed by all the values from column V4.
TEMP = AVG((V1, V2), (V3, V4), COL)
Creates two new columns named TEMP and VX, each containing a single value. The column TEMP contains the average of columns V1 and V2. The column VX contains the average of columns V3 and V4.
Related Functions
Function
MERGE TO
Description
Creates a data group by horizontally concatenating the input values Generate range operator
Unica Confidential
93
Function
TRANSPOSE
Description
Transposes a specified data range
CONSTANT
Syntax
CONSTANT(data)
data The values to copy as constants. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above.See Macro Function Parameters on page 34 or Chapter 2, Using Macros in Affinium Model, on page 37 for the format definition of data.
CONSTANT makes a static copy of the values in specified data range. These copied
Parameters
Description
values do not change if the corresponding values in the input column(s) change. The data values are copied once at the time the macro function is applied. CONSTANT returns one new column for each input column, each containing a static copy of the values in the corresponding input column.
Tip
Applying the CONSTANT macro function can result in significant performance improvements in running experiments. If the input or output columns for an experiment are based on complex (slow) calculations in the spreadsheet, add the CONSTANT macro function to each of the columns. This will calculate the values once and store the calculated values. Otherwise, every time the experiment accesses the spreadsheet for pattern data, the values must be recomputed.
Tip
If the data values may change, use the BUFFER macro function instead. This creates a dynamic copy of the data range, where the copied values will change if the corresponding input values change.
Note
If a user function is built from a function definition using the CONSTANT macro function, the portion of the function definition enclosed in the CONSTANT macro
94
Unica Confidential
CONSTANT
function is considered a constant. Any input variables will not be required to apply the user function.
Examples TEMP = CONSTANT(4.3)
Creates a new column named TEMP, where each value is a static copy of the contents of column V1.
TEMP = CONSTANT (V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are copies of the contents of column V1, the values of the VX column are copies of the contents of column V2, and the values of the VY column are copies of the contents of column V3.
TEMP = CONSTANT(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain copies of the values in rows 1020 of column V1. The other cells in TEMP are empty.
TEMP = CONSTANT(V1[50:99]:V2)
Creates two new columns named TEMP and VX, each with values in rows 150 (the other cells are empty). The values in column TEMP are copies of the rows of column V1, and the values in column VX are copies of the values in column V2.
TEMP = CONSTANT(EXTRACT(!ISERROR(V1:V3), V1:V3))
Creates three new columns named TEMP, VX, and VY. The three columns contain the valid rows (that is, rows which do not contain any ??? cells) of columns V1V3. Wrapping the EXTRACT macro function inside CONSTANT prevents columns TEMP, VX, and VY from being recomputed if columns V1V3 change, thereby avoiding the computationally intensive EXTRACT macro function.
Unica Confidential
95
Related Functions
Function
BUFFER
Description
Copies the input data range, and updates dynamically
COS
Syntax
COS(data [, units_keyword])
data The numerical values to compute the cosine of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters on page 34 or Chapter 2, Using Macros in Affinium Model, on page 37 for the format definition of data. units_keyword This optional keyword determines whether the input values and results are interpreted as degrees or radians. Select one of the following:
RADIANPerforms the calculations in radians (default) DEGREEPerforms the calculations in degrees
Parameters
If this parameter is not specified, the default is radians. (To convert from radians to degrees, divide by PI and multiply by 180.) See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Description COS calculates the cosine of the values in the specified data range. It returns one
new column for each input column, each containing the cosine of numbers in the corresponding input column.
Examples TEMP = COS(PI) or TEMP = COS(PI, 0) or TEMP = COS(PI, RADIAN)
96
Unica Confidential
COS
Returns a new column named TEMP containing a single value of zero. TEMP = COS(V1) or TEMP = COS(V1, 0) or
TEMP = COS(V1, RADIAN)
Creates a new column named TEMP, where each value is the cosine (in radians) of the contents of column V1.
TEMP = COS(V1:V3, 1)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the cosines of the contents of column V1, the values of the VX column are the cosines of the contents of column V2, and the values of the VY column are the cosines of the contents of column V3. All values are in degrees.
TEMP = COS(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain the cosines of the values in rows 1020 of column V1 (in radians). The other cells in TEMP are empty.
TEMP = COS(V1[1:5]:V2)
Creates two new columns named TEMP and VX, each with values in rows 15 (the other cells are empty). The values in column TEMP are the cosines of the corresponding rows of column V1, and the values in column VX are the cosines of the corresponding rows of column V2. All values are in radians.
Related Functions
Function
ACOS COSH SIN
Description
Computes the arccosine of the contents of the specified data range Computes the hyperbolic cosine of the contents of the specified data range Computes the sine of the contents of the specified data range
Unica Confidential
97
Function
TAN
Description
Computes the tangent of the contents of the specified data range
COSH
Syntax
COSH(data [, units_keyword])
data The numerical values to compute the hyperbolic cosine of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters on page 34 or Chapter 2, Using Macros in Affinium Model, on page 37 for the format definition of data. units_keyword This optional keyword determines whether the input values and results are interpreted as degrees or radians. Select one of the following:
RADIANPerforms the calculations in radians (default) DEGREEPerforms the calculations in degrees
Parameters
If this parameter is not specified, the default is radians. (To convert from radians to degrees, divide by PI and multiply by 180.) See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Description COSH calculates the hyperbolic cosine of the values in the specified data range.
where e is the natural number, 2.7182818. COSH returns one new column for each input column, each containing the hyperbolic cosine of numbers in the corresponding input column.
98
Unica Confidential
COSH
Note
If the value x is too large, an overflow error is returned. This occurs if cosh(x) exceeds the maximum 32-bit floating-point value.
Creates a new column named TEMP, where each value is the hyperbolic cosine (in radians) of the contents of column V1. TEMP = COSH(V1:V3, 1) or
TEMP = COSH(V1:V3, DEGREE)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the hyperbolic cosines of the contents of column V1, the values of the VX column are the hyperbolic cosines of the contents of column V2, and the values of the VY column are the hyperbolic cosines of the contents of column V3. All values are in degrees.
TEMP = COSH(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain the hyperbolic cosines of the values in rows 1020 of column V1 (in radians). The other cells in TEMP are empty.
TEMP = COSH(V1[1:5]:V2)
Creates two new columns named TEMP and VX, each with values in rows 15 (the other cells are empty). The values in column TEMP are the hyperbolic cosines of the corresponding rows of column V1, and the values in column VX are the hyperbolic cosines of the corresponding rows of column V2. All values are in radians.
Related Functions
Function
ACOS
Description
Computes the arccosine of the contents of the specified data range
Unica Confidential
99
Function
COS SINH TANH
Description
Computes the cosine of the contents of the specified data range Computes the hyperbolic sine of the contents of the specified data range Computes the hyperbolic tangent of the contents of the specified data range
COT
Syntax
COT(data [, units_keyword])
data The numerical values to compute the cotangent of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters on page 34 or Chapter 2, Using Macros in Affinium Model, on page 37 for the format definition of data. units_keyword This optional keyword determines whether the input values and results are interpreted as degrees or radians. Select one of the following:
RADIANPerforms the calculations in radians (default) DEGREEPerforms the calculations in degrees
Parameters
If this parameter is not specified, the default is radians. (To convert from radians to degrees, divide by PI and multiply by 180.) See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Description COT calculates the cotangent of values in the specified data range. The cotangent is the reciprocal of the tangent. COT returns one new column for each input column, each containing the cotangent of numbers in the corresponding input column.
100
Unica Confidential
COT
Note
If a cell contains a value whose tangent is zero, then the arccotangent is infinity. In this case, COT returns the largest 32-bit floating-point number.
Returns a new column named TEMP containing the value MAX_FLOAT_32. TEMP = COT(V1, 1) or
TEMP = COT(V1, DEGREE)
Creates a new column named TEMP, where each value is the cotangent of the contents (in degrees) of the column V1.
TEMP = COT(V1:V3, 1)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the cotangents of the contents of column V1, the values of the VX column are the cotangents of the contents of column V2, and the values of the VY column are the cotangents of the contents of column V3. All values are in degrees.
TEMP = COT(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain the cotangents of the values in rows 1020 of column V1 (in radians). The other cells in TEMP are empty.
TEMP = COT(V1[1:5]:V2)
Creates two new columns named TEMP and VX, each with values in rows 15 (the other cells are empty). The values in column TEMP are the cotangents of the corresponding rows of column V1, and the values in column VX are the cotangents of the corresponding rows of column V2. All values are in radians.
Unica Confidential
101
Related Functions
Function
ACOT COS SIN TAN
Description
Computes the arccotangent of the contents of the specified data range Computes the cosine of the contents of the specified data range Computes the sine of the contents of the specified data range Computes the tangent of the contents of the specified data range
COUNT
Syntax
COUNT(data)
data The cell range to count the number of cells in. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
COUNT counts the number of values in the specified data range. It returns a new
Parameters
Description
column containing a single value representing the number of cells containing values within the specified data range.
Note Examples TEMP = COUNT(AVG(V1:V5))
Creates a new column named TEMP containing a single value of one (the function AVG returns a single cell in the default mode).
102
Unica Confidential
COUNT_DIFF
TEMP = COUNT(V1)
Creates a new column named TEMP containing a single value indicating the number of cells containing values in column V1.
TEMP = COUNT(V1:V3)
Creates a new column named TEMP containing a single value indicating the number of cells containing values in columns V1, V2, and V3.
TEMP = COUNT(V1[10:20])
Creates a new column named TEMP containing the value 11 (ranges are inclusive), given that the cells all contain values.
TEMP = COUNT(V1[1:5]:V4)
Creates a new column named TEMP containing the value 20 (5 cells in each column times 4 columns = 20 cells), given that all the cells contain values.
TEMP = COUNT(V1[1:10])
Creates a new column named TEMP containing the value 3, given that rows 13 of column V1 contain values and rows 410 are empty.
Related Functions
Function
COUNT_DIFF OFFSET SUM or TOTAL
Description
Returns each unique value in the input with a count of the number of times that value appeared Returns the offset of each value in the input column from the top of the stream Computes the sum of a range of cells
COUNT_DIFF
Syntax
COUNT_DIFF(data)
Unica Confidential
103
Parameters
data The cell range to count the unique values and the frequency of their occurrence. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
COUNT_DIFF finds the number of different values in the specified data range and
Description
counts the number of times each value appears. It returns two new columns. The first column contains each unique value. The second column contains the number of times the corresponding value appeared in the data range. COUNT_DIFF ignores case when comparing text strings. For example, Aaa and aAa and AAA are all counted as the same class.
Note
The COUNT_DIFF macro function may take a long time to compute when data is large. A Computing progress bar will be displayed until the computation is complete. If you decide to cancel the computation, click on the X in the progress bar and delete the function definition containing the COUNT_DIFF macro function.
Creates two new columns named TEMP and VX. TEMP contains the values 1, 2, and 3. VX contains the counts 2, 1, and 1.
TEMP = COUNT_DIFF(COLUMN(x, a, a, b))
Creates two new columns named TEMP and VX. TEMP contains the values x, a, and b. VX contains the counts 1, 2, and 1.
TEMP = COUNT_DIFF(V1)
Creates two new columns named TEMP and VX, where TEMP contains all of the unique values in column V1, and VX contains a count for each corresponding row of TEMP.
TEMP = COUNT_DIFF(V1:V3)
Creates two new columns named TEMP and VX, where TEMP contains all of the unique values in columns V1V3, and VX contains a count for each corresponding row of TEMP.
104
Unica Confidential
COV
TEMP = COUNT_DIFF(V1[10:20])
Creates two new columns named TEMP and VX, where TEMP contains all of the unique values in rows 1020 of column V1, and VX contains a count for each corresponding row of TEMP.
TEMP = COUNT_DIFF(V1[1:5]:V4)
Creates two new columns named TEMP and VX, where TEMP contains all of the unique values in rows 15 of columns V1V4, and VX contains a count for each corresponding row of TEMP.
Related Functions
Function
COUNT HISTOGRAM
Description
Counts the number of cells containing values in the specified data range Computes the histogram of a specified data range using provided bin boundaries
COV
Syntax
COV(data1, data2)
data1 The first data set. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data1. data2 The second data set. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
Parameters
Unica Confidential
105
Chapter 3: Affinium Macros Reference COV counts the covariance of the two specified data ranges.1 It outputs as many columns as the minimum dimension of the inputs (both width and height). COV is
Description
calculated as follows:
COV ( x, y ) =
i=1
-----------------------------------------N
( xi x ) ( yi y )
where x and y are columns containing the same number of values N, x is the mean of x, and y is the mean of y.
Examples TEMP = COV(COLUMN(1,2), COLUMN(1,3))
Creates a new column named TEMP containing the covariance between data in column V1 and data in column V2.
TEMP = COV(V1:V2, V3:V4)
Creates two new column named TEMP and VX. The column TEMP will contain the covariance between columns V1 and V3. The column VX will contain the covariance between columns V2 and V4.
TEMP = COV(V1[1:50]:V2,V3[100:200]:V4)
Creates two new column named TEMP and VX. The column TEMP will contain the covariance between rows 150 of column V1 and rows 100200 of column V3. The column VX will contain the covariance between rows 150 of column V2 and rows 100200 of column V4.
CURRENT_DATE
Syntax
CURRENT_DATE([format])
106
Unica Confidential
CURRENT_DAY
Parameters
format One of the keywords in the following table specifying the date format of date_string.
Description
CURRENT_DATE returns the current date in format. The date is determined by the clock on the Affinium server. If no format keyword is supplied, the default of DELIM_M_D_Y is used. See Valid Format Keywords on page 117 for more information on available date formats. If the date today is the 7th of September, 2000, CURRENT_DATE()returns 09/07/00. Function
DATE_FORMAT DATE_JULIAN DATE_STRING DATE
Note
Examples
Related Functions
Description
Converts dates from one format to another. Returns the Julian date of the input. Returns the date string of the Julian date. Converts a date string to Julian date.
CURRENT_DAY
Syntax
CURRENT_DAY()
CURRENT_DAY returns the current day of the month as a number between 131.
Description
If the date today is the 19th of June, CURRENT_DAY() will return the number 19.
Unica Confidential
107
Related Functions
Function
CURRENT_JULIAN CURRENT_MONTH CURRENT_TIME CURRENT_WEEKDAY CURRENT_YEAR
Description
Returns the Julian number for the current date. Returns the current month as a number. Returns the current time as a string. Returns the current weekday as a number. Returns the current year as a number.
CURRENT_JULIAN
Syntax
CURRENT_JULIAN()
CURRENT_JULIAN() returns the Julian number for the current date (the number
Description
of days elapsed since January, 1, 0000). This is equivalent to the macro DATE(CURRENT_DATE()).
Examples
If the date today is the 31st of August, 2000, CURRENT_JULIAN() returns the number 730729. Function
CURRENT_DAY CURRENT_MONTH CURRENT_TIME CURRENT_WEEKDAY CURRENT_YEAR
Related Functions
Description
Returns the current day as a number. Returns the current month as a number. Returns the current time as a string. Returns the current weekday as a number. Returns the current year as a number.
108
Unica Confidential
CURRENT_MONTH
CURRENT_MONTH
Syntax
CURRENT_MONTH()
CURRENT_MONTH returns the current month of the year as a number between 112.
If the date today is the 19th of June, CURRENT_MONTH() will return the number 6. Function
CURRENT_DAY CURRENT_JULIAN CURRENT_TIME CURRENT_WEEKDAY CURRENT_YEAR
Description
Returns the current day as a number. Returns the current Julian number. Returns the current time as a string. Returns the current weekday as a number. Returns the current year as a number.
CURRENT_TIME
Syntax
CURRENT_TIME()
CURRENT_TIME returns the current time as a string. The time is determined by the
Description
Unica Confidential
109
All referenced files are installed by the web application installer unless specifically noted.
Important webapphome refers to the directory where the Campaign web application was installed. language_code refers to the language setting(s) you choose for
your system.
1
Edit the webapphome/conf/campaign_config.xml file to ensure that language_code is present in the comma-separated list in the <supportedLocales> tag, as shown below:
<supportedLocales>en_US, language_code </supportedLocales>
In the webapphome/webapp directory, copy the entire directory tree en_US to language_code (case sensitive). In webapphome/webapp/WEB-INF/classes/resources, copy StaticMessages_en_US.properties to StaticMessages_ language_code.properties. Also copy ErrorMessages_en_US.properties to ErrorMessages_ language_code.properties. Edit the StaticMessages_ language_code.properties: search for DatePattern and change it to read DatePattern=dd/MM/yyyy (case sensitive). This format is defined by Java. Complete detail about the format can be found in Java documentation for java.text.SimpleDateFormat at http://java.sun.com. The StaticMessages.properties file does not need to be modified.
Note
110
Unica Confidential
CURRENT_WEEKDAY
Ensure that the web browser's language setting has language_code set to the first priority. For more details, see the sections below, To set your web browser for the correct language and To set your computer to display a specific language. Be sure to use a hyphen, as opposed to an underscore, in language_code. The web application configuration is the only place where a hyphen is used instead of an underscore.
Note
Login to Campaign. Dates should be displayed in Campaign in the format specified in StaticMessages_language_code.properties. For information on how to configure the time for Affinium Campaign, see Configuring Campaign for a specific language in the Affinium Compaign 5.2 Installation Guide.
If the time is 10:54 a.m., CURRENT_TIME() will return the string . Function
CURRENT_DAY CURRENT_JULIAN CURRENT_WEEKDAY CURRENT_YEAR
Description
Returns the current day as a number. Returns the current Julian number. Returns the current weekday as a number. Returns the current year as a number.
CURRENT_WEEKDAY
Syntax
CURRENT_WEEKDAY()
Unica Confidential
111
Description
Description
Returns the current day as a number. Returns the current Julian number. Returns the current month as a number. Returns the current time as a string. Returns the current year as a number.
CURRENT_YEAR
Syntax
CURRENT_YEAR()
CURRENT_YEAR returns the current year as a number.
If the current year is 2000, CURRENT_YEAR() will return the number: 2000. Function
CURRENT_DAY CURRENT_JULIAN CURRENT_MONTH CURRENT_TIME CURRENT_WEEKDAY MONTHOF WEEKDAYOF
Description
Returns the current day as a number. Returns the current Julian number. Returns the current month as a number. Returns the current time as a string. Returns the current weekday as a number. Returns the month of the year as a number. Returns the weekday of the week as a number.
112
Unica Confidential
CV_FOLDS
Function
YEAROF
Description
Returns the year as a number.
CV_FOLDS
Syntax
Parameters
If class_data is a single column, CV_FOLDS assumes that the specified column contains values for multiple output classes (that is, each distinct value is considered a separate class). If class_data is a data range, each output column is considered a different class. (With a data range, the values in each column would be one if a pattern belongs to that class, or zero if the pattern does not belong to that class.) See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of class_data (same as data).
seed A seed value to use for the random-number generator. This must be an integer.
Unica Confidential
113
Description
CV_FOLDS evenly divides the input data into the specified number of folds. Each
fold will contain the same number of input patterns.1 It places each row of the input data range into a fold by returning a new column containing fold numbers ranging in value between one and num_folds. If the optional parameter class_data is provided, the output class information is used to create cross-validation folds such that output class probabilities are maintained. That is, within each fold, the probability of each output class will be the same.2
Examples TEMP = CV_FOLDS(3, V1, 0)
Creates a new column named TEMP containing a value for each row of column V1. The column TEMP will contain the values 1, 2, and 3 for the three different folds. No class probabilities are maintained. The value zero is used as the seed for the random number generator.
TEMP = CV_FOLDS(100, V1:V15)
Creates a new column named TEMP containing a value for each row of the shortest column in V1V15. The column TEMP will contain the values 1100 for the 100 different folds. No class probabilities are maintained. A random seed is selected.
TEMP = CV_FOLDS(50, V1:V10, V11)
Creates a new column named TEMP containing a value for each row of the shortest column in V1V10. The column TEMP will contain the values 150 for the 50 different folds. The column V11 contains the output classes. Each fold will have the same output class probabilities. A random seed is selected.
1. The number of input patterns in each fold will differ by at most one. 2. The number of patterns for a specific output class in any fold will differ by at most one.
114
Unica Confidential
DATALINK
Creates a new column named TEMP containing a value for each row of the shortest column in V1V10. The column TEMP will contain the values 110 for the 10 different folds. Each of the output columns V11V15 represents an output class. Each fold will have the same output class probabilities. The value 96 is used as a seed for the random number generator.
DATALINK
Syntax
DATALINK([spreadsheet,] cells)
spreadsheet The name of the spreadsheet in the current Affinium Model work session to link with (for example, Sheet1). If no value is specified, the current spreadsheet is used. cells The specific cells within spreadsheet to link with. The cells parameter specifies the column(s) and row(s) to link with and can be specified as any of the following:
Parameters
Cn Cn:Cm RnCm | CmRn RnCm:RNCM | CmRn:CMRN The characters C and R specify column and row, respectively. The variables n, m, N, and M are the row and column numbers.
Description DATALINK creates an internal link with data in the current Affinium Model work ses-
sion. It returns the number of columns specified in the cells parameter. Changes in the source data columns will automatically be reflected.
Unica Confidential
115
Creates a new column named TEMP containing the values in column one of the current spreadsheet.
TEMP = DATALINK(Sheet2, C1:C3)
Creates three new columns named TEMP, VX, and VY, containing the values in columns 13 of the Sheet2 spreadsheet. TEMP = DATALINK(Sheet4, C5R10) or
TEMP = DATALINK(Sheet4, R10C5)
Creates a new column named TEMP containing the cell value in the 5th column, 10th row of the Sheet4 spreadsheet. TEMP = DATALINK(Sheet1, C1R1:C3R500) or
TEMP = DATALINK(Sheet1, R1C1:R500C3)
Creates three new columns named TEMP, VX, and VY, containing the values in rows 1500 of columns 13 of the Sheet2 spreadsheet.
Related Functions
Function
DDELINK
Description
Creates an external link to data from another Windows application
DATE
Syntax
DATE(date_string [, format])
date_string A text representing a valid date. format One of the keywords in the table under Valid Format Keywords on page 117, specifying the date format of date_string.
Parameters
Description
DATE converts a date string into a Julian date (the number of days elapsed since
January 1, 0000). Virtually any date format is supported via the optional for-
116
Unica Confidential
DATE
mat keyword, which specifies how the date is represented. If no format keyword is supplied, the default of DELIM_M_D_Y is used. Date formats are either fixed-width (for example, the date February 28, 1970 is represented as 02281970 in MMDDYYYY format), or delimited (for example, February 28, 1970, 2-28-1970, or 02/28/1970). All of the previous examples are variants of DELIM_M_D_YY format. In delimited formats, delimiters are slash (/), dash(-), space ( ), comma (,), or colon (:); years can be represented by either 2 or 4 digits; and months can be fully spelled out (for example, February), abbreviated (for example, Feb), or numeric (for example, 2 or 02). For all years specified as two-digits:
Two-digit years less than the Year 2000 threshold (default is 20, but can be set by the user) are considered to be in the 2000's. Two-digit years greater than or equal to the threshold are considered to be in the 1900's.
Description 2-digit month 2-digit month and 2-digit day 2-digit month, 2-digit day, and 2-digit year 2-digit month, 2-digit day, and 4-digit year Any delimited month followed by day Any delimited month, day, and year Any delimited year followed by month
Example(s) 01, 02, 03, ..., 12 March 31 is 0331 March 31, 1970 is 033170 March 31, 1970 is 03311970 March 31, 3/31, or 03-31 March 31, 1970 or 3/31/70 March, 70; 3-70; or 3/1970
Unica Confidential
117
Keyword DELIM_Y_M_D YYMMM YYMMMDD YY YYMM YYMMDD YYYYMMM YYYYMMMDD YYYY YYYYMM YYYYMMDD DELIM_M_Y DELIM_D_M DELIM_D_M_Y DD DDMMM DDMMMYY
Description Any delimited year, month, and day 2-digit year and 3-letter month 2-digit year, 3-letter month, and 2-digit day 2-digit year 2-digit year and 2-digit month 2-digit year, 2-digit month, and 2-digit day 4-digit year and 3-letter month 4-digit year, 3-letter month, and 2-digit day 4-digit year 4-digit year and 2-digit month 4-digit year, 2-digit month, and 2-digit day Any delimited month followed by year Any delimited day followed by month Any delimited day, month, and year 2-digit day 2-digit day and 3-letter month 2-digit day, 3-letter month, and 2-digit year
Example(s) 1970 Mar 31 or 70/3/31 70MAR 70MAR31 70 7003 700331 1970MAR 1970MAR31 1970 197003 19700331 3-70, 3/70, Mar 70, March 1970 31-3, 31/3, 31 March 31-MAR-70, 31/3/1970, 31 03 70 31 31MAR 31MAR70
118
Unica Confidential
DATE
Keyword DDMMMYYYY DDMM DDMMYY DDMMYYYY MMYY MMYYYY MMM MMMDD MMMDDYY MMMDDYYYY MMMYY MMMYYYY
Description 2-digit day, 3-letter month, and 4-digit year 2-digit day and 2-digit month 2-digit day, 2-digit month, and 2-digit year 2-digit day, 2-digit month, and 4-digit year 2-digit month and 2-digit year 2-digit month and 4-digit year 3-letter month 3-letter month and 2-digit day 3-letter month, 2-digit day, and 2-digit year 3-letter month, 2-digit day, and 4-digit year 3-letter month and 2-digit year 3-letter month and 4-digit year Month of the year
Example(s) 31MAR1970 3103 310370 31031970 0370 031970 MAR MAR31 MAR3170 MAR311970 MAR70 MAR1970 January, February, March, and so on or Jan, Feb, Mar, and so on Sunday, Monday, Tuesday, and so on (Sunday = 0) Sun, Mon, Tues, and so on (Sun = 0)
MONTH
WEEKDAY
WKD
Unica Confidential
119
Related Functions
Function
DATE_FORMAT DATE_JULIAN DATE_STRING CURRENT_DATE
Description
Converts dates from one format to another. Returns the Julian date of the input. Returns the date string of the Julian date. Returns the current date in a specified format.
DATE_FORMAT
Syntax
Parameters
Description
120
Unica Confidential
DATE_JULIAN
If the date is delimited (any delimiter can be used including SPACE, DASH, SLASH), it must be set to one of these values:
Examples Note Related Functions
See DATE on page 116 for additional information on valid date formats.
Function
DATE DATE_JULIAN DATE_STRING
Description
Converts a date string to a Julian date. Returns the Julian date of the input. Returns the date string of the Julian date.
DATE_JULIAN
Syntax
Parameters
Description
DATE_JULIAN returns the Julian date of the specified input. The Julian date is
Unica Confidential
121
Related Functions
Function
DATE DATE_FORMAT DATE_STRING
Description
Converts a date string to a Julian date. Converts dates from one format to another. Returns the date string of the Julian date.
DATE_STRING
Syntax
Parameters
Code
%a %A %b %B %c
Description
Abbreviated weekday name Full weekday name Abbreviated month name Full month name Date and time representation appropriate for locale
122
Unica Confidential
DATE_STRING
Code
%d %H %I %j %m %M %p %S %U %w %W %x %X %y %Y %z, %Z %% Description
Description
Day of month (01 - 31) Hour in 24-hour format (00 - 23) Hour in 12-hour format (01 - 12) Day of year (001 - 366) Month (01 - 12) Minute (00 - 59) Current locale's AM/PM indicator for 12-hour clock Second (00 - 59) Week of year, with Sunday as first day of week (00 - 51) Weekday (0 - 6; Sunday is 0) Week of year, with Monday as first day of week (00 - 51) Date representation for current locale Time representation for current locale 2-digit year (00 - 99) 4-digit year Time zone name or abbreviation; no output if time zone is unknown Percent sign
DATE_STRING returns the date string of the Julian date. If output_format is not provided, the default keyword DELIM_M_D_Y will be used. DATE_STRING(730729) returns the string 08/31/00.
Examples Note
See DATE on page 116 for additional information on valid date formats.
Unica Confidential
123
Related Functions
Function
DATE DATE_JULIAN DATE_FORMAT
Description
Converts a date string to a Julian date. Returns the Julian date of the input. Converts dates from one format to another.
DAY_BETWEEN
Syntax
Parameters
Description
DAY_BETWEEN returns the number of days between from_date_string and to_date_string. If input_format is not provided, the default keyword DELIM_M_D_Y will be used. DAY_BETWEEN(08/25/00,08/31/00) returns the number 6.
Examples Note
See DATE on page 116 for additional information on valid date formats.
124
Unica Confidential
DAY_FROMNOW
Related Functions
Function
DAY_FROMNOW DAY_INTERVAL
Description
Returns the number of days between the current day and a specified date. Returns the number of days between two specified dates.
DAY_FROMNOW
Syntax
Parameters
Description
DAY_FROMNOW returns the number of days between the current day and the date
specified by to_year/to_month/to_day.
Note Examples
If the specified date is in the past, the returned value will be negative.
If todays date is the 31st of August, 2000, DAY_FROMNOW(2000,12,31) returns the number 122.
Related Functions
Function
DAY_BETWEEN DAY_INTERVAL
Description
Returns the number of days between two specified date strings. Returns the number of days between two specified dates.
Unica Confidential
125
DAY_INTERVAL
Syntax
Parameters
Description
DAY_INTERVAL returns the number of days between the specified from date
Function
DAY_BETWEEN DAY_FROMNOW
Description
Returns the number of days between two specified date strings. Returns the number of days between the current day and a specified date.
126
Unica Confidential
DAYOF
DAYOF
Syntax
DAYOF(date_string [, input_format])
date_string A text representing a valid date. input_format One of the keywords in the table below, specifying the date format of date_string.
Parameters
Description
DAYOF returns the day of the month as a number for the date represented by the
See DATE on page 116 for additional information on valid date formats.
DDELINK
Syntax
Parameters
Unica Confidential
127
Description
DDELINK creates a Dynamic Data Exchange (DDE) link with data in an external
Windows application. It returns the number of columns specified in the items parameter. Changes in the source application will automatically be reflected in the Affinium Model spreadsheet.
Examples TEMP = DDELINK(Excel, c:\excel\data.xls, C1:C2)
Creates two new columns named TEMP and VX, containing the values in columns 12 of the c:\excel\data.xls spreadsheet.
TEMP = DDELINK(Excel, c:\excel\data.xls, R1:R10)
Creates as many new columns as needed to accommodate rows 1 10 of the c:\excel\data.xls spreadsheet.
TEMP = DDELINK(Excel, c:\excel\data.xls, R1C1:R100C3)
Creates three new columns named TEMP, VX and VY containing rows 1100 of the c:\excel\data.xls spreadsheet.
TEMP = DDELINK(123W, c:\lotsuite\sample.wk4, A:A1..A:C8)
Creates three new columns named TEMP, VX and VY containing rows 18 of columns AC of spreadsheet A in the Lotus file sample.wk4.
Related Functions
Function
DATALINK
Description
Creates an internal link to data in a Affinium Model spreadsheet
DECIMATE
Syntax
DECIMATE(column, max_value)
column The column of values to decimate. All values within this column must be positive integers less than max_value.
Parameters
128
Unica Confidential
DECIMATE
max_value The number of columns to return. This must be a positive integer greater than or equal to the maximum value in column.
Description DECIMATE converts a positive integer value into a binary pattern of max_value
columns in length. If the value is n, the n-th column contains a one; all other columns contain zeros. This macro function returns max_value columns.
Note Examples TEMP = DECIMATE(COLUMN(1,2,3), 3) DECIMATE is the opposite of the MAXINDEX macro function.
Creates new columns named TEMP, VX, and VY with a row for each corresponding row of input. The first row contains 1 0 0, the second contains 0 1 0, and the third contains 0 0 1.
TEMP = DECIMATE(COLUMN(1,1,2), 3)
Creates new columns named TEMP, VX, and VY with a row for each corresponding row of input. The first row contains 1 0 0, the second contains 1 0 0, and the third contains 0 1 0.
TEMP = DECIMATE(V1, 10)
Creates ten new columns with a row for each corresponding row of input. Each row contains a single one in the column representing the corresponding input value. All other columns contain zeros.
Related Functions
Function
MAX MAXINDEX MIN
Description
Computes the maximum of a range of cells Returns the input column(s) values lagging by a specified number of time steps Computes the minimum of a range of cells
Unica Confidential
129
DELAY
Syntax
DELAY(delay, data)
delay The number of time steps to delay. This value must be a positive integer. data The values to delay. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
Parameters
Description
DELAY returns values in the input data range, delayed by the specified number of
time steps. It views each input column as a data series in time. and returns one new column for each input column. Each new column contains the time stepdelayed values (delayed by delay number of time steps) of the numbers in the corresponding input column.
Note
The DELAY macro function returns a column with values such that the cell VY[x] = data[x + delay].
Tip
This function is useful in creating patterns from time-series data. To create multiple delays, use the SLIDE_WINDOW macro function.
Creates a new column named TEMP containing the values 2, 3, and 4 in cells 13, respectively.
TEMP = DELAY(2, V1)
Creates a new column named TEMP, where each value is the contents of column V1 delayed by two time steps.
130
Unica Confidential
DERIVATIVE
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the contents of column V1 delayed by ten time steps, the values of the VX column are the contents of column V2 delayed by ten time steps, and the values of the VY column are the contents of column V3 delayed by ten time steps.
TEMP = DELAY(1, V1[10:20])
Creates a new column named TEMP, where the first 10 cells contain the values in column V1 delayed by one time step (that is, rows 11 20 of column V1). The other cells in TEMP are empty.
TEMP = DELAY(2, V1[1:5]:V2)
Creates two new columns named TEMP and VX, each with values in rows 13 (the other cells are empty). The values in column TEMP are the corresponding rows of column V1 delayed by two time steps, and the values in column VX are the corresponding rows of column V2 delayed by two time steps (that is, rows 35 of columns V1 and V2).
Related Functions
Function
LAG SLIDE_WINDOW
Description
Returns the input column(s) values lagging by a specified number of time steps Creates a pattern from a specified window and slides it down to create the next pattern
DERIVATIVE
Syntax
DERIVATIVE(data [, divisor])
data The numerical values to compute the derivative of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign
Parameters
Unica Confidential
131
or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
divisor A value to divide each value in data by. This can be a constant value or an expression evaluating to a constant.
Description DERIVATIVE calculates the derivative of the values in a time-series. Each value
is the difference between the current value and the value from the next time-step. If a value is provided for divisor, each value is divided by the specified value. DERIVATIVE returns one new column for each input column, each containing derivative of the values in the corresponding input column.
Note
The length of the returned column will be one less than the length of the source data column (data).
Creates a new column named TEMP containing all blank cells (at least two cell values are required to generate a result).
TEMP = DERIVATIVE(COLUMN(1, 2, 5))
Creates a new column named TEMP, where each value is the derivative of the contents of column V1.
TEMP = DERIVATIVE(V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the derivatives of the contents of column V1, the values of the VX column are the derivatives of the contents of column V2, and the values of the VY column are the derivatives of the contents of column V3.
TEMP = DERIVATIVE(V1[10:20])
Creates a new column named TEMP, where the cells in rows 1020 contain the derivatives of the corresponding rows of column V1. The other cells in TEMP are empty.
132
Unica Confidential
DISTINCT
TEMP = DERIVATIVE(V1[1:5]:V2)
Creates two new columns named TEMP and VX, each with values in rows 15 (the other cells are empty). The values in column TEMP are the derivatives of the corresponding rows of column V1, and the values in column VX are the derivatives of the corresponding rows of column V2.
Related Functions
Function
INTEGRAL
Description
Computes the integral of the values in the specified data range
DISTINCT
Syntax
DISTINCT(data)
data
Parameters
strings. For example, \042Aaa\042 and \042aAa\042 and \042AAA\042 are all counted as the same value. The DISTINCT macro function may take a long time to compute when data is large. A \042Computing...\042 progress bar will be displayed until the computation is complete. If you decide to cancel the computation, click on the \042X\042 in the progress bar and delete the function definition containing the DISTINCT macro function.
Examples
Unica Confidential
133
Related Functions
Function
Description
DIV
Syntax
Parameters
134
Unica Confidential
DIV
Description
DIV divides the specified data range by the divisor value. It returns a new column
for each input column, each containing the corresponding column in data1 divided by the corresponding column of data2 (that is, the first column of data1 is divided by to the first column of data, the second column with the second column, and so on). If data2 is a constant, each value in data1 is divided by that value. If data2 contains one or more columns, the calculations are performed on a row-by-row basis between one column from data2 and one column from data2. The first row of data1 is divided by the first row value of data2, the second row with the second row, and so on. This row-by-row calculation produces a result for each row up to the last value of the shortest column.
Note
Using a column containing the same number x in each row as divisor is the same as using the constant x as divisor.
Tip
Creates a new column named TEMP, where each value is the contents of column V1 divided by eight.
TEMP =V1:V3/2
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the contents of column V1 divided by two, the values of the VX column are the contents of column V2 divided by two, and the values of the VY column are the contents of column V3 divided by two.
TEMP = V1/V1
Creates a new column named TEMP containing all ones (since any number divided by itself is one).
Unica Confidential
135
TEMP = V1/V2
Creates a new column named TEMP, where each value is the row value of column V1 divided by the corresponding row value of column V2.
TEMP = V1:V3/V4:V6
Creates three new columns named TEMP, VX, and VY. The column TEMP contains the values in V1 divided by the corresponding row values of column V4. The column VX contains the division of column V2 by V5. The column VY contains the division of column V3 by V6. TEMP = V1[10:20] / V2 or
TEMP = V1[10:20] / V2[1:11]
Creates a new column named TEMP, where the first 11 cells contain the result of dividing the values in rows 1020 of column V1 by the values in rows 111 of column V2. The other cells in TEMP are empty.
Related Functions
Function
MOD MULT POW
Description
Computes the modulo of the contents of the specified data range Multiplies the contents of two data ranges Computes a base value raised to the specified exponential power(s)
EQ
Syntax
Parameters
136
Unica Confidential
EQ
or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data1.
data2 The number(s) to compare all values in the specified column against. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. The number of columns in data2 must equal the number of columns in data1, unless data2 is a constant. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data2.
Description EQ compares the two specified data ranges, returning a one if the values are equal
or a zero if they are not equal. It returns a new column for each input column, each containing the corresponding column in data1 compared to the corresponding column of data2 (that is, the first column of data1 is compared to the first column of data, the second column with the second column, and so on). If data2 is a constant, each value in data is compared to that value. If data2 is a column, the calculations are performed on a row-by-row basis. The values in data1 are compared to the first row value of data2, the second row with the second row, and so on. This row-by-row calculation produces a result for each row up to the last value of the shortest column. When comparing strings, case does not matter (that is, Yes, YES, yes, and yeS are all considered equal).
Tip
The EQ operator can be abbreviated with a double equal sign (==). Inside parentheses, a single equal sign (=) also can be used for the EQ macro function (outside parentheses, the equal sign is interpreted as the assignment operator).
Creates a new column named TEMP containing the value zero (since three is not equal to four).
Unica Confidential
137
TEMP = No == NO
Creates a new column named TEMP containing the value one (string compares are case insensitive).
TEMP = V1 == 8
Creates a new column named TEMP, where each value is one if the corresponding row value of the column V1 is equal to the number eight, otherwise zero.
TEMP = V1==V1
Creates a new column named TEMP containing all ones (since every number is equal to itself).
TEMP = V1==V2
Creates a new column named TEMP, where each value is the row value of column V1 compared to the corresponding row value of column V2.
TEMP = V1:V3 == V4:V6
Creates three new columns named TEMP, VX, and VY. The column TEMP contains the values in V1 compared to the corresponding row values of column V4. The column VX compares columns V2 and V5. The column VY compares columns V3 and V6. TEMP = V1[10:20] == V2 or
TEMP = V1[10:20] == V2[1:11]
Creates a new column named TEMP, where the first 11 cells contain the results of comparing the values in rows 1020 of column V1 to rows 111 of column V2. The other cells in TEMP are empty.
Related Functions
Function
EQ GE GT LE
Description
Returns TRUE if one data range is equal to another Returns TRUE if one data range is greater than or equal to another Returns TRUE if one data range is greater than another Returns TRUE if one data range is less than or equal to another
138
Unica Confidential
EXP
Function
LT NE
Description
Returns TRUE if one data range is less than another Returns TRUE if one data range is not equal to another
EXP
Syntax
EXP(data)
data The numerical values used as an exponent to the natural number, e. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 2, Using Macros in Affinium Model or in Chapter 1, Using Macros in Affinium Campaign for the format definition of data. for the format definition of data.
EXP raises the natural number, e, by each of the values in the specified data range (that is, calculates e x ). The constant e equals 2.7182818. EXP returns one new column for each input column, each containing the result ex for each value x in the corresponding input column(s). EXP is the inverse of the LN macro function.
Parameters
Description
Note
If the value x is too large or too small, an overflow error is returned. This occurs if ex exceeds the maximum or minimum 32-bit floating-point value.
Creates a new column named TEMP, where each value is result of raising e to the contents of column V1.
Unica Confidential
139
TEMP = EXP(V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the results of raising e to the column V1, the values of the VX column are the results of raising e to the contents of column V2, and the values of the VY column are the results of raising e to the contents of column V3.
TEMP = EXP(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain the results of raising e to the values in rows 1020 of column V1. The other cells in TEMP are empty.
TEMP = EXP(V1[1:5]:V2)
Creates two new columns named TEMP and VX, each with values in rows 15 (the other cells are empty). The values in column TEMP are the results of raising e to the corresponding row values of column V1, and the values in column VX are the results of raising e to the corresponding row values of column V2.
Related Functions
Function
LN or LOG LOG2 LOG10 POW
Description
Computes the natural log of the contents of the specified data range Computes the log base-2 of the contents of the specified data range Computes the log base-10 of the contents of the specified data range Exponential power
EXTRACT
Syntax
EXTRACT(predicate_col, data)
140
Unica Confidential
EXTRACT
Parameters
predicate_col A column of boolean values or an expression evaluating to a single column of boolean values. Boolean values are interpreted as zero or non-zero. This column should contain at least as many rows as the data range from which data is being extracted. Otherwise, predicate_col will be a limit to the number of rows processed by the EXTRACT macro function (see Description below). data The values to extract. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
Description
EXTRACT returns the rows in the specified data range that have a value of one in
the corresponding row of the predicate column. This macro function reduces data by throwing out all rows where the corresponding value in predicate_col is zero. EXTRACT returns one new column for each input column, each containing the values in the corresponding input column for which the corresponding value in predicate_col is one. The extracted rows of data will occupy the first n cells of the output columns where n is the number of ones in predicate_col. Since EXTRACT operates on a row-by-row basis, it produces a result for each row up to the last value of the shortest column (that is, the shortest column out of predicate_col and the columns in the data range data). All non-zero values in predicate_col are evaluated as one.
Tip
Generally, you will want to create a predicate column using one of the comparison macro functions (for example, ==, >, <, ISEVEN, ISODD, etc.). You can then extract the rows of interest from a specified data range using the EXTRACT macro function. This can be useful to weed out bad data points (for example, when a particular value exceeds the maximum or minimum value for a data variable). It also can be used to consolidate all examples of a particular class (for example, if the column V3 contains ones and zeros for one of the output classes, use V4=EXTRACT(V3, V1:V2) to extract the inputs V1 and V2). Since EXTRACT condenses all the extracted rows as a block of data (that
Unica Confidential
141
is, it fills the cell range VX[1:n}:VY), where n is the number of extracted rows, it is a useful function for copying a range of cells from their current row locations to rows 1n of the spreadsheet.
Examples TEMP = EXTRACT(1, V1)
Creates two new columns named TEMP and VX with values in the first 51 cells. The values in the TEMP column are the cells 50100 of column V1, and the values in the VX column are the cells 50100 of column V2.
TEMP = EXTRACT(V3, V1:V2)
Creates two new columns named TEMP and VX. For each row where the value in column V3 is one, the corresponding row across columns V1 and V2 are extracted into columns TEMP and VX, respectively.
TEMP = EXTRACT(V1>V2, V1)
Creates a new column named TEMP containing all the values in column V1 that were greater than the corresponding values in column V2.
TEMP = EXTRACT(V3[10:20], V1[10:20]:V2)
Creates two new columns named TEMP and VX. For rows 1020 where the value in column V3 is one, the corresponding row across columns V1 and V2 is extracted into columns TEMP and VX, respectively.
Related Functions
Function
IF SELECT SUBSAMPLE
Description
Begins a conditional statement if-then-else statement Returns the specified column(s) from a data range Reduces data by returning every n-th row value
142
Unica Confidential
FACTORIAL
Function
SUBSTITUTE
Description
Substitutes values in a column with a value specified in a conversion table
FACTORIAL
Syntax
FACTORIAL(data)
data The integer values to compute the factorial for. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
FACTORIAL calculates the factorial of the values in the specified data range. All
Parameters
Description
inputs must be integers. The factorial of an integer less or equal to one is one. For integers x 2 , the factorial x! = x(x-1)(x-2)(x-(x-1)). FACTORIAL returns one new column for each input column, each containing the factorial of numbers in the corresponding input column.
Note Examples TEMP = FACTORIAL(3)
Any value greater than 34 will produce ??? (floating-point overflow error).
Creates a new column named TEMP containing the value 1 (the factorial of any negative number, zero, or one is 1).
TEMP = FACTORIAL(V1)
Creates a new column named TEMP, where each value is the factorial of the contents of column V1.
Unica Confidential
143
TEMP = FACTORIAL(V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the factorials of the contents of column V1, the values of the VX column are the factorials of the contents of column V2, and the values of the VY column are the factorials of the contents of column V3.
TEMP = FACTORIAL(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain the factorials of the values in rows 1020 of column V1. The other cells in TEMP are empty.
TEMP = FACTORIAL(V1[50:99]:V2)
Creates two new columns named TEMP and VX, each with values in rows 150 (the other cells are empty). The values in column TEMP are the factorials of the rows of column V1, and the values in column VX are the factorials of the values in column V2.
FLOOR
Syntax
FLOOR(data)
data The numerical values to compute the floor of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
FLOOR calculates the floor of the values in the specified data range. The floor of a number is the greatest integer less than the number. FLOOR returns one new col-
Parameters
Description
umn for each input column, each containing the floor of numbers in the corresponding input column.
Note
144
Unica Confidential
FLOOR
Creates a new column named TEMP, where each value is the floor of the contents of column V1.
TEMP = FLOOR(V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the floors of the contents of column V1, the values of the VX column are the floors of the contents of column V2, and the values of the VY column are the floors of the contents of column V3.
TEMP = FLOOR(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain the floors of the values in rows 1020 of column V1. The other cells in TEMP are empty.
TEMP = FLOOR(V1[50:99]:V2)
Creates two new columns named TEMP and VX, each with values in rows 150 (the other cells are empty). The values in column TEMP are the floors of the rows of column V1, and the values in column VX are the floors of the values in column V2.
Related Functions
Function
CEILING FRACTION TRUNCATE
Description
Computes the ceiling of each value in the specified data range Returns the fractional part of each value in the specified data range Returns the non-fractional part of each value in the specified data range
Unica Confidential
145
FORMAT
Syntax Format has two forms, one for numeric datatypes and one for text/character
datatypes. For numeric datatypes: FORMAT(colName, width [, precision [, format_type [, alignment [, padding]]]]) For text/character datatypes: FORMAT(colName, width [, alignment])
Parameters
colName The macro examines colName and determines its datatype, then imposes the appropriate rules for subsequent parameters accordingly. width Width should be large enough to hold the complete result, otherwise the result will be truncated. Acceptable values are from 1 to 29 if colName is numeric, otherwise from 1 to 255. precision Precision is number of digits after the decimal point. Acceptable values are from 0 to 15. If it's zero, then the result is integer. Default precision value is 2. format_type Valid keywords for format_type are:
PERIOD COMMA PERIOD_COMMA Period(.) is used as decimal symbol. No digit grouping symbol is used. This is the default value. Comma(,) is used as decimal symbol. No digit grouping symbol is used. Period as decimal symbol and comma as digit grouping symbol.
146
Unica Confidential
FORMAT
COMMA_PERIOD
alignment Valid keywords for alignment are LEFT and RIGHT. Default value is RIGHT for numeric datatypes and LEFT for text/character datatypes. padding Valid keywords for padding are SPACE and ZERO. Default value is SPACE. ZERO is ignored (and instead SPACE is used) if alignment is LEFT. Note that numeric strings held within a text/character datatype are treated as text/character. Also note that the numeric form takes multiple optional keywords, each with a default value. However, to override the default of second or subsequent optional keywords you MUST code the defaults for the preceding optional keywords (in effect they become required). For example: to override alignment to be LEFT you must code: FORMAT(myNumCol, 10, 2, PERIOD, LEFT).
Description FORMAT converts numeric data to a string form with various formatting options to
control and define the output string. This will be especially useful for creating Snapshot files with specific formats for mailing file purposes.
Examples
The following examples show the same field, AvgMthPayment, in three formats.
Unica Confidential
147
Unformatted:
148
Unica Confidential
FRACTION
FRACTION
Syntax
FRACTION(data)
data The numerical values to compute the fraction of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
FRACTION calculates the fractional part of the values in the specified data range.
Parameters
Description
It returns one new column for each input column, each containing the fractional part of the numbers in the corresponding input column.
Note
The FRACTION macro function and the TRUNCATE macro function are complementary in that they sum to the original values.
Creates a new column named TEMP, where each value is the fractional part of the contents of column V1.
TEMP = FRACTION(V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the fractional parts of the contents of column V1, the values of the VX column are the fractional parts of the contents of column V2, and the values of the VY column are the fractional parts of the contents of column V3.
Unica Confidential
149
TEMP = FRACTION(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain the fractional parts of the values in rows 1020 of column V1. The other cells in TEMP are empty.
TEMP = FRACTION(V1[50:99]:V2)
Creates two new columns named TEMP and VX, each with values in rows 150 (the other cells are empty). The values in column TEMP are the fractional parts of the rows of column V1, and the values in column VX are the fractional parts of the values in column V2.
Related Functions
Function
CEILING FLOOR TRUNCATE
Description
Computes the ceiling of each value in the specified data range Computes the floor of each value in the specified data range Returns the non-fractional part of each value in the specified data range
GAUSS
Syntax
Parameters
150
Unica Confidential
GAUSS
Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of mean (same as data).
std The standard deviation of the Gaussian. If this parameter is not provided, the default is one. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. The number of columns in std must equal the number of columns in data, unless std is a constant or a single column. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of std (same as data).
Description GAUSS computes the Gaussian value of the numbers in the specified data range.
It returns one new column for each input column, each containing the Gaussian value of the corresponding input. GAUSS is computed as follows:
1 ---------- e 2
( x )2 -----------------2 2
If no mean and standard deviation are provided, zero and one are used, respectively. If mean and std are constants, these values are used to specify the Gaussian for all values in data. If mean and std are single columns, the corresponding row values are used for each row of data. If mean and std are column ranges (both must be the same number of columns as data), each cell in data uses its individual pair of corresponding cells in mean and std.
Unica Confidential
151
TEMP = GAUSS(V1)
Creates a new column named TEMP, where each value is the Gaussian of the corresponding row of column V1, using a zero-mean, unit-variant Gaussian.
TEMP = GAUSS(V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the Gaussians of column V1, the values of the VX column are the Gaussians of column V2, and the values of the VY column are the Gaussians of column V3. The Gaussian is zeromean and unit-variant.
TEMP = GAUSS(V1[1:50]:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the Gaussians of rows 150 column V1, the values of the VX column are the Gaussians of rows 150 column V2, and the values of the rows of the VY column are the Gaussians of column V3. The Gaussian is zero-mean and unit-variant.
TEMP = GAUSS(V1, 0, 3.5)
Creates a new column named TEMP, where each value is the Gaussian of the corresponding row of column V1. The Gaussian has a mean of 0 and a standard deviation of 3.5.
TEMP = GAUSS(V1, V2, V3)
Creates a new column named TEMP, where each value is the Gaussian of column V1, using the corresponding row value of column V2 as the mean and the corresponding row value of column V3 as the standard deviation.
TEMP = GAUSS(V1:V2, V3:V4, V5:V6)
Creates two new columns named TEMP and VX. The column TEMP contains the Gaussians of the values in V1 using the corresponding rows of column V3 as the mean and the corresponding rows of column V5 as the standard deviation. The column VX contains the Gaussians of the values in V2 using the corresponding rows of column V4 as the mean and the corresponding rows of column V6 as the standard deviation.
152
Unica Confidential
GAUSS_AREA
Related Functions
RANDOM_GAUSS
GAUSS_AREA
Syntax
Parameters
Description
GAUSS_AREA computes the area under the Gaussian (from to the specified
data value X) of the numbers in the specified data range (see Figure 3-1). It returns one new column for each input column, each containing the area under the Gaussian of the corresponding input.
Unica Confidential
153
If no mean and standard deviation are provided, zero and one are used, respectively. If mean and std are constants, these values are used to specify the Gaussian for all values in data. If mean and std are single columns, the corresponding row values are used for each row of data. If mean and std are column ranges (both must be the same number of columns as data), each cell in data uses its individual pair of corresponding cells in mean and std.
Note
In the last case above, when mean and std are column ranges, the length of each column determines how many rows will be present in the corresponding output column. If a column of mean or std is a single cell, that value will be used for all row values of data. If mean or std contain multiple rows, the corresponding rows are calculated. Rows of data for which there are no corresponding values in mean and std are not computed.
154
Unica Confidential
GAUSS_AREA
TEMP = GAUSS_AREA(V1)
Creates a new column named TEMP, where each value is the area under the Gaussian of the corresponding row of column V1, using a zero-mean, unit-variant Gaussian.
TEMP = GAUSS_AREA(V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the areas under the Gaussians of column V1, the values of the VX column are the areas under the Gaussians of column V2, and the values of the VY column are the areas under the Gaussians of column V3. The Gaussian is zero-mean and unit-variant.
TEMP = GAUSS_AREA(V1[1:50]:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the areas under the Gaussians of rows 150 column V1, the values of the VX column are the areas under the Gaussians of rows 150 column V2, and the values of the rows of the VY column are the areas under the Gaussians of column V3. The Gaussian is zero-mean and unit-variant.
TEMP = GAUSS_AREA(V1, 0, 3.5)
Creates a new column named TEMP, where each value is the area under the Gaussian of the corresponding row of column V1. The Gaussian has a mean of 0 and a standard deviation of 3.5.
TEMP = GAUSS_AREA(V1, V2, V3)
Creates a new column named TEMP, where each value is the area under the Gaussian of column V1, using the corresponding row value of column V2 as the mean and the corresponding row value of column V3 as the standard deviation.
TEMP = GAUSS_AREA(V1:V2, V3:V4, V5:V6)
Creates two new columns named TEMP and VX. The column TEMP contains the areas under the Gaussians of the values in V1 using the corresponding rows of column V3 as the mean and the corresponding rows of column V5 as the standard deviation. The column VX contains the areas under the Gaussians of the values in V2 using the corresponding rows of column V4 as the mean and the corresponding rows of column V6 as the standard deviation.
Unica Confidential
155
GE
Syntax
Parameters
Description
GE compares the two specified data ranges, returning a one if the values in the
first data set are greater than or equal to the values in the second data set or a zero otherwise. It returns a new column for each input column, each containing the corresponding column in data1 compared to the corresponding column of data2 (that is, the first column of data1 is compared to the first column of data, the second column with the second column, and so on). If data2 is a constant, each value in data is compared to that value. If data2 is a column, the calculations are performed on a row-by-row basis. The values in data1 are compared to the first row value of data2, the second row with the second row, and so on. This row-by-row calculation produces a result for each row up to the last value of the shortest column.
Tip
The GE operator can be abbreviated with a greater than sign followed by an equal sign (>=).
156
Unica Confidential
GE
Creates a new column named TEMP containing the value one (since nine is greater than four).
TEMP = V1 >= 8
Creates a new column named TEMP, where each value is one if the corresponding row value of the column V1 is greater than or equal to the number eight, otherwise zero.
TEMP = V1:V3 >= 2
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the contents of column V1 compared to the value two, the values of the VX column are the contents of column V2 compared to the value two, and the values of the VY column are the contents of column V3 compared to the value two.
TEMP = V1 >= V1
Creates a new column named TEMP containing all ones (since every number is equal to itself).
TEMP = V1 >= V2
Creates a new column named TEMP, where each value is the row value of column V1 compared to the corresponding row value of column V2.
TEMP = V1:V3 >= V4:V6
Creates three new columns named TEMP, VX, and VY. The column TEMP contains the values in V1 compared to the corresponding row values of column V4. The column VX compares columns V2 and V5. The column VY compares columns V3 and V6. TEMP = V1[10:20] >= V2 or
TEMP = V1[10:20] >= V2[1:11]
Creates a new column named TEMP, where the first 11 cells contain the results of comparing the values in rows 1020 of column V1 to the values in rows 111 of column V2. The other cells in TEMP are empty.
Unica Confidential
157
Related Functions
NE
GRID
Syntax
GRID(col1 [, col2])
col1 The first column to produce the grid from. This can be a constant, a column, a single-column cell range, or any expression evaluating to one of the above. col2 One or more additional columns to use in producing the grid. This can be a constant, a column, a single-column cell range, or any expression evaluating to one of the above.
Parameters
Description
GRID generates a grid of all possible combinations of values using cells in each
of the input columns. It returns a new column for each input column. If any of the inputs are constants, each value in the other input columns are paired with the that constant value. Using the notation V1[1] for the first cell in column V1, V1[2] for the second cell, and so on, the expression GRID(V1, V2) would produce:
V1[1]V2[1] V1[1]V2[2] V1[1]V2[3] : : V1[2]V2[1] V1[2]V2[2] V1[2]V2[3] : : : :
All cells in column V1 are paired against each cell in column V2. GRID behaves similarly for more than two input columns. The number of rows generated is equal to the product of the length of the input columns.
158
Unica Confidential
GRID
Note
Creates two new columns named TEMP and VX, containing the values 1 and 2, respectively.
TEMP = GRID(COLUMN(1, 2), COLUMN(3, 4))
Creates two new columns named TEMP and VX. The rows across these two columns are:
1 1 2 2 3 4 3 4
TEMP = GRID(V1)
Creates a new column named TEMP containing a copy of the values in column V1.
TEMP = GRID(V1, 3)
Creates two new columns named TEMP and VX. The column TEMP is a copy of column V1, and column VX contains the value 3 for each row of column V1.
TEMP = GRID(V1, V2)
Creates two new columns named TEMP and VX, where each row represents one of the possible cell combinations (see description).
TEMP = GRID(V1, V3, V7)
Creates three new columns named TEMP, VX, and VY, where each row represents one of the possible cell combinations (see description).
Unica Confidential
159
Related Functions
Function
SLIDE_WINDOW
Description
Creates a pattern from a specified window and slides it down to create the next pattern
GROUPBY
Syntax GROUPBY(group_field, keyword, rolled_field
[,output_field])
Parameters
group_field Specifies the variable over which records are grouped (that is, all the same values of the specified variable are grouped together). keyword Specifies the summary roll-up function to perform on the rolled-field. rolled_field Specifies the variable to be summarized or rolled up. Identifies an alternate variable to be returned for a single row of a group and can be used only with the keywords MinOf, MaxOf, and MedianOf.
output_field
Description
GROUPBY summarizes across multiple rows of data within a group. The output of
this function is a single column. The output is the result of the operation specified by keyword on the rolled_field over the homogeneous group specified by the group_field. If there is more than one answer satisfying a specified condition, the first one encountered is returned. If the optional output_field is not supplied, then the output is the result of the operation on rolled_field. If output_field is supplied, then the result is the output_field of the row within the group. If there are multiple rows within a group that satisfy the specified condition (for example, there are ties for the max value), the output-field associated with the first row satisfying the condition is returned.
160
Unica Confidential
GROUPBY
Tip
To work with grouping over multiple columns, you can enclose a list of field names, separated by commas, within a set of curly brackets { } and using this as the first parameter in the GROUPBY macro call.
Supported keywords are as follows (case insensitive): String ? Keyword Description Yes/N o
CountOf Yes Returns the number of records in each group (rolled_field can be numeric or string; the returned value is the same regardless of the value of rolled_field). Returns the minimum value of rolled_field in each group (rolled_field can be numeric or string; if rolled_field is a string, the value closest to the beginning of the alphabet where alphabetically sorted is returned). Returns the maximum value of rolled_field in each group (rolled_field can be numeric or string; if rolled_field is a string, the value closest to the end of the alphabet when alphabetically sorted is returned). Returns the number of distinct values of rolled_field in each group (rolled_field can be numeric or string). Returns the average value of rolled_field in each group (rolled_field must be numeric). Returns the modal value (that is, the most commonly occurring value) of rolled_field in each group (rolled_field can be numeric or string). Returns the median value (that is, the middle value when sorted by rolled_field) of rolled_field in each group (rolled_field can be numeric or string; if rolled_field is a string, the values are sorted alphabetically). Returns the order of rolled_field in each group (rolled_field must be numeric). If multiple records have the same value, they all receive the same value.
MinOf
Yes
MaxOf
Yes
DiffOf AvgOf
Yes No
ModeOf
Yes
MedianOf
Yes
OrderOf
Yes
Unica Confidential
161
Keyword
String ? Yes/N o
No No
Description
SumOf StdevOf
Returns the sum of rolled_field in each group (rolled_field must be numeric). Returns the standard deviation of rolled_field in each group (rolled_field must be numeric). Returns the 1-based index (ordered by rolled_field) of each record (rolled_field can be numeric or string). The sort order is ascending.
IndexOf
Yes
Note: For numeric fields, the sort order of RankOf and IndexOf can be made descending by putting a minus sign (-) in front of the sort field. Returns the 1-based category (ordered by rolled_field) in which each record lies (rolled_field can be numeric or string). The sort order is ascending. Note: For numeric fields, the sort order of RankOf and IndexOf can be made descending by putting a minus sign (-) in front of the sort field.
RankOf
Yes
GROUPBY_WHERE
Syntax GROUPBY_WHERE(group_field, keyword, rolled_field,
where_value [,output_field])
162
Unica Confidential
GROUPBY_WHERE
Parameters
group_field Specifies the variable over which records are grouped (that is, all the same values of the specified variable are grouped together). keyword Specifies the summary roll-up function to perform. rolled_field Specifies the variable to be summarized or rolled up. where_value An expression that evaluate to a one or zero value that specifies which rows are to be included in the roll-up operation. output_field Identifies an alternate variable to be returned for a single row of a group and can be used only with the keywords MinOf, MaxOf, and MedianOf.
Description
output of this function is a single column. The output is the result of the operation specified by keyword on the rolled_field over the homogeneous group specified by the group_field, filtered by the where_value. Only rows with a where_value of one are included in the calculation. If the optional output_field is not supplied, then the result is the result of the operation on rolled_field. If output_field is supplied, then the result is the output_field of the row within the group.
Note
See GROUPBY on page 160 for more information on valid values for keyword.
Computes the sum of all accounts with positive balances for each household.
GROUPBY_WHERE (Cust_ID, AvgOf, Purchase_Amt, Date(Current_Date)-Date(Purchase_Date)<90)
Computes the average purchase amount for each customer for purchases in the last 90 days.
Unica Confidential
163
GT
Syntax
Parameters
Description
GT compares the two specified data ranges, returning a one if the values in the
first data set are greater than the values in the second data set or a zero otherwise. It returns a new column for each input column, each containing the corresponding column in data1 compared to the corresponding column of data2 (that is, the first column of data1 is compared to the first column of data, the second column with the second column, and so on). If data2 is a constant, each value in data is compared to that value. If data2 is a column, the calculations are performed on a row-by-row basis. The values in data1 are compared to the first row value of data2, the second row with the second row, and so on. This row-by-row calculation produces a result for each row up to the last value of the shortest column.
Tip
164
Unica Confidential
GT
Creates a new column named TEMP containing the value zero (since three is not greater than four).
TEMP = V1 > 8
Creates a new column named TEMP, where each value is one if the corresponding row value of the column V1 is greater than the number eight, otherwise zero.
TEMP = V1:V3 > 2
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the contents of column V1 compared to the value two, the values of the VX column are the contents of column V2 compared to the value two, and the values of the VY column are the contents of column V3 compared to the value two.
TEMP = V1 > V1
Creates a new column named TEMP containing all zeros (since no number is greater than itself).
TEMP = V1 > V2
Creates a new column named TEMP, where each value is the row value of column V1 compared to the corresponding row value of column V2.
TEMP = V1:V3 > V4:V6
Creates three new columns named TEMP, VX, and VY. The column TEMP contains the values in V1 compared to the corresponding row values of column V4. The column VX compares columns V2 and V5. The column VY compares columns V3 and V6. TEMP = V1[10:20] > V2 or
TEMP = V1[10:20] > V2[1:11]
Creates a new column named TEMP, where the first 11 cells contain the results of comparing the values in rows 1020 of column V1 to the values in rows 111 of column V2. The other cells in TEMP are empty.
Unica Confidential
165
Related Functions
Function
EQ GE LE LT NE
Description
Returns TRUE if one data range is equal to another Returns TRUE if one data range is greater than or equal to another Returns TRUE if one data range is less than or equal to another Returns TRUE if one data range is less than another Returns TRUE if one data range is not equal to another
HISTOGRAM
Syntax
HISTOGRAM(data, bin_col)
data The cell range to compute the histogram of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. All columns in data must be the same data type (that is, numeric or text string). See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data. bin_col The values for the bin boundaries. This can be a constant value, a column, a single-column cell range, or an expression evaluating to any of the above. The data type of bin_col must be the same as data. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
Parameters
Description
HISTOGRAM computes the histogram (that is, frequency of occurrence of data val-
ues in various bins) of the values in the specified data range. It returns a single column with the number of data values in data that fall within the corresponding bin range specified by bin_col.
166
Unica Confidential
HISTOGRAM
For numerical values, each two adjacent rows of bin_col form a bin. Any value in data that falls within a bin is accumulated for that bin. The output column contains the final count of the number of data values within each bin. The first boundary value is included in the bin; the second boundary value is excluded. For example, the pair of boundary values 1 and 2 will contain a count of all values in data are greater than or equal to 1 and less than 2. The length of the output column is one less than the length of bin_col. For text strings, only exact matches of the text string in bin_col is counted in that bin. The length of the output column is the length of bin_col. For numerical data, if bin_col is scalar (that is, contains a single cell value), than the number of items in data is counted.
Note
The HISTOGRAM macro function places data points into bins differently than Affinium Models histogram graph. The histogram graph exclude the minimum (except for the leftmost bin) and include the maximum of each bin boundary.
Creates a new column named TEMP containing four values. The first value is the number of values in column V1 greater than or equal to 1 and less than 25. The second value is the number of values in column V1 greater than or equal to 25 and less than 50. The third and fourth values contain the counts in the third and fourth quartiles, respectively.
TEMP = HISTOGRAM(V1:V3, V4)
Creates a new column named TEMP, where each value a count of the number of values in columns V1V3 that fall within the bin boundaries specified by column V4.
Unica Confidential
167
Creates a new column named TEMP containing 10 values. Each value is the number of data values in rows 50100 of columns V1 V5 that fall within the bin boundaries specified by rows 110 of column V6.
Related Functions
Function
COUNT
Description
Counts the number of cells containing values in the specified data range
IF
Syntax
Parameters
168
Unica Confidential
IF
Chapter 2, Using Macros in Affinium Model for the format definition of else_value (same as data).
Description IF evaluates the expression in predicate_col and returns then_value if
the expression is true, or else_value if the expression is false. It returns the same number of columns in then_value and else_value. The new column(s) will contain the corresponding row value(s) from then_value if the value of predicate_col is non-zero. If else_value is provided, it is returned when the value of predicate_col is zero. If else_value is not provided, zero is returned. Since IF operates on a row-by-row basis, it produces a result for each row up to the last value of the shortest column (that is, the shortest column out of predicate_col, then_value, and else_value).
Tip
Generally, you will want to create a predicate column using one of the comparison macro functions (for example, ==, >, <, ISEVEN, ISODD, and so on).
Creates a new column named TEMP, where each value is one if the corresponding value of column V1 is non-zero, otherwise zero.
TEMP = IF(V3, V1, V2)
Creates a new column named TEMP, where each value is copied from column V1 if the corresponding value of column V3 is nonzero; otherwise the value is copied from column V2.
TEMP = IF(ABS(V1-AVG(V1)) < STDV(V1), V1)
Creates a new column named TEMP containing each value in column V1 that is less than one standard deviation away from the mean.
Unica Confidential
169
Creates a new column named TEMP containing values for rows 10 20. Each value is copied from column V1 (cells 1020) if the corresponding value of column V3 (cells 3040) is non-zero; otherwise the value is copied from column V2 (cells 111).
Related Functions
Function
EXTRACT SELECT
Description
Extracts rows given the values in a predicate column Returns the specified column(s) from a data range
IN
Syntax
valuet IN (value1 AND value2 . . . .) or valuet IN subquery The first form permits using a list of values instead of a subquery. The second form uses a subquery that is evaluated to produce an intermediate result, against which further processing can be performed.
Parameters
Description
The IN predicate lets you use a list of values instead of a subquery, or will introduce a subquery. IN differs from ISMEMBER because IN is performed on the database (if possible), while ISMEMBER is computed on the server. The IN predicate has a negative version, NOT IN. The format for this is identical to IN. NOT IN is true only if the provided value is not found in the values returned by the subquery.
Note
Note
170
Unica Confidential
IN
Creates a new column named TEMP, where each value is a one if the corresponding row of column V1 contains a value in column V2, else a zero.
Examples SELECT title, current_rental_price FROM movie_titles WHERE our_cost IN (14.95, 24.95, 29.95 ) ; means that all movies that cost either $14.95, $24.95, or $29.95 will evaluate as TRUE to the IN predicate and will, in turn, produce a list of titles and accompanying current rental prices for those movies. UPDATE movie_titles
SET current_rental_price =
(regular_rental_price * .9) WHERE title IN ( SELECT movie_title FROM movie_stars
WHERE
actor_last_name = Stewart AND actor_first_name = James ) ; After the subquery produces its list of movie titles, the list is processed against the MOVIE_TITLES table and the appropriate rental prices are discounted for Philadelphia Story, Its a Wonderful Life, and so on.
Unica Confidential
171
INIT
Syntax
Parameters
Description
INIT specifies the initial values for a recursive function definition. The first pro-
vided value is assigned to the time step (t-1), the second to (t-2), and so on. If a time step is not initialized using INIT, its value is assumed to be zero. For example, given the statement
V1 = INIT(1, 2, 3)
the value for time step (t-4) is zero (as are all other time steps further back in time). An INIT statement is required before defining any recursive function.
Note
To initialize all values to zero, you can simply specify INIT() without any arguments. The INIT macro function does not return any values. If used alone in a function definition, it returns a blank column.
172
Unica Confidential
INT
Creates a new column named TEMP containing the values 2, 4, 8, 16, 32, and so on. The first 100 cells of TEMP will contain values.
TEMP = INIT(1, 2, 3, 4, 5) t = 1 to 500 TEMP = TEMP[t-5]
Creates a column named TEMP containing the sequence of values 5, 4, 3, 2, 1 repeated 100 times.
TEMP = INIT(1, 2, 3) t = 1 to 1000 TEMP = 2*TEMP[t-1] + 4*TEMP[t-2]^2 - TEMP[t-3]
Creates a new column named TEMP containing values for the cursive function:
TEMP = 2*TEMP ( t 1 ) + 4*TEMP ( t 2 ) 2 TEMP ( t 2 )
Function
TO
Description
Generate range operator
INT
Syntax
INT(data)
data The numerical values to round down to an integer value. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
Parameters
Unica Confidential
173
Description
INT calculates the greatest integer less than the values (also known as the floor) in the specified data range. INT returns one new column for each input column,
Creates a new column named TEMP, where each value is the largest integer less than or equal to the contents of column V1.
TEMP = V1 - INT(V1)
Creates a new column named TEMP containing the decimal portion of each value in column V1.
TEMP = INT(V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the largest integers less than or equal to the contents of column V1, the values of the VX column are the largest integers less than or equal to the contents of column V2, and the values of the VY column are the largest integers less than or equal to the contents of column V3.
TEMP = INT(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain the largest integers less than or equal to the corresponding values in rows 1020 of column V1. The other cells in TEMP are empty.
174
Unica Confidential
INTEGRAL
TEMP = INT(V1[1:5]:V2)
Creates two new columns named TEMP and VX, each with values in rows 15 (the other cells are empty). The values in column TEMP are the largest integers less than or equal to the corresponding row values of column V1, and the values in column VX are the largest integers less than or equal to the corresponding row values of column V2.
Related Functions
Function
ROUND TRUNCATE
Description
Computes the rounded value of the contents of the specified data range Returns the non-fractional part of each value in the specified data range
INTEGRAL
Syntax
INTEGRAL(data [, multiplier])
data The numerical values to compute the integral of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data. multiplier A value to multiply each value in data by. This can be a constant value or an expression evaluating to a constant.
Parameters
Description
INTEGRAL calculates the integral of the values in a time-series. Each value is the
sum of all previous values in time. If a value is provided for multiplier, each value is multiplied by the specified value. INTEGRAL returns one new column for each input column, each containing integral of the values in the corresponding input column.
Unica Confidential
175
Creates a new column named TEMP containing the values 2, 6, and 12.
TEMP = INTEGRAL(V1)
Creates a new column named TEMP, where each value is the sum of all previous cells in column V1.
TEMP = INTEGRAL(V1, 10)
Creates a new column named TEMP, where each value is the sum of all previous cells in column V1 times 10.
TEMP = INTEGRAL(V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the integrals of column V1, the values of the VX column are the integrals of column V2, and the values of the VY column are the integrals of column V3.
TEMP = INTEGRAL(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain the integrals of the corresponding values in rows 1020 of column V1. The other cells in TEMP are empty.
TEMP = INTEGRAL(V1[1:5]:V2)
Creates two new columns named TEMP and VX, each with values in rows 15 (the other cells are empty). The values in column TEMP are the integrals of the corresponding row values of column V1, and the values in column VX are the integrals of the corresponding row values of column V2.
176
Unica Confidential
INVERSE
Related Functions
Function
DERIVATIVE SUM or TOTAL
Description
Computes the derivative of the values in the specified data range Computes the sum of a range of cells
INVERSE
Syntax
INVERSE(data)
data The numerical values to compute the inverse of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
INVERSE calculates the negative of the values in the specified data range. It
Parameters
Description
returns -x (that is, negative values are returned as positive values, and positive values are returned as negative values). INVERSE returns one new column for each input column, each containing the inverse of the values in the corresponding input column.
Tip
To invert a value or a column, precede it with a minus sign (-). For example, V2 = -V1 is the same as V2 = INVERSE(V1).
Creates a new column named TEMP, where each value is the negative of the values in column V1.
Unica Confidential
177
TEMP = INVERSE(V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the negatives of values in column V1, the values of the VX column are the negatives of the values in column V2, and the values of the VY column are the negatives of the values in column V3.
TEMP = INVERSE(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain the negatives of the values of the values in rows 1020 of column V1. The other cells in TEMP are empty.
TEMP = INVERSE(V1[1:5]:V2)
Creates two new columns named TEMP and VX, each with values in rows 15 (the other cells are empty). The values in column TEMP are the negatives of the values of the corresponding rows of column V1, and the values in column VX are the negatives of the values of the corresponding rows of column V2.
Related Functions
Function
ABS NOT SIGN
Description
Computes the absolute value of the contents of the specified data range Computes the logical NOT of the contents of the specified data range Computes the sign (positive or negative) of the values in the specified data range
IS
IS keyword
Parameters
178
Unica Confidential
ISERROR
Description
IS is used in complex search conditions. The more complex the search, the more
useful the IS condition can be. These Boolean search conditions provide an alternative way of expressing the basic search conditions.
Examples SELECT customer FROM customer_table1 WHERE (last_name = Smith AND first_name = John) IS TRUE ;
will produce a list of all customers having the name John Smith.
SELECT customer FROM customer_table1 WHERE (last_name = X AND first_name = X) IS UNKNOWN ;
lists all values from the cost table that are not $200.
ISERROR
Syntax
ISERROR(data)
data The values to test if any of the rows contain an error (that is, a ??? cell). This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
Parameters
Unica Confidential
179
Description
ISERROR checks if any cell of each row of the specified data range contains an error (that is, a ??? cell). It returns one new column, each row containing a one
if the corresponding row of data contains an error. Otherwise, it contains a zero. This row-by-row calculation produces a result for each row up to the last value of the longest column.
Tip
This function is useful for detecting errors in a column and then using the EXTRACT macro function to pull out the good rows of data.
Creates one new columns named TEMP, where each value is a one if the corresponding row of column V1 contains ???, otherwise, a zero.
TEMP = ISERROR(V1:V3)
Creates one new columns named TEMP, where each value is a one if any of the cells in the corresponding rows of column V1V3 contains ???, otherwise, a zero.
TEMP = ISERROR(V1[50:100]:V10)
Creates one new columns named TEMP, with values in rows 150. Each value is a one if any of the cells in rows 50100 of columns V1V10 contains ???, otherwise, a zero.
Related Functions
Function
EXTRACT
Description
Extracts rows given the values in a predicate column
ISEVEN
Syntax
ISEVEN(data)
180
Unica Confidential
ISEVEN
Parameters
data The numerical values to test if they are even. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
ISEVEN tests each value in the specified data set for evenness. It returns one new
Description
column for each input column, each containing a one for all even values (that is, the value modulo two is zero) or a zero for all non-even values (that is, odd values).
Note
For non-integer values, the macro function INT is applied first. For example, ISEVEN(2.5) = 1, since 2 is even.
Creates three new columns named TEMP, VX, and VY. TEMP contains the value 0, VX contains the value 1, and VY contains the value 1.
TEMP = ISEVEN(V1)
Creates a new column named TEMP, where each value is the result of testing the contents of column V1 for evenness.
TEMP = ISEVEN(V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the results of testing the contents of column V1 for evenness, the values of the VX column are the results of testing the contents of column V2 for evenness, and the values of the VY column are the results of testing the contents of column V3 for evenness.
TEMP = ISEVEN(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain the results of testing the values in rows 1020 of column V1 for evenness. The other cells in TEMP are empty.
Unica Confidential
181
TEMP = ISEVEN(V1[1:5]:V2)
Creates two new columns named TEMP and VX, each with values in rows 15 (the other cells are empty). The values in column TEMP are the results of testing the corresponding rows of column V1 for evenness, and the values in column VX are the results of testing the corresponding rows of column V2 for evenness.
Related Functions
Function
ISODD ISMEMBER
Description
Tests if input values are odd (that is, not divisible by two) Tests an input range against a table of values, returning one if a value is contained in the table, else zero
ISMEMBER
Syntax
ISMEMBER(data, table)
data The values to test if they members of a table. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. If data contains more than one column, all columns must be the same data type (either numeric or text strings). See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data. table The table values to compare against. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. If table contains more than one column, all columns must be the same data type as data (either numeric or text strings). The number of data values in table cannot exceed 16 million. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of table (same as data).
Parameters
182
Unica Confidential
ISMEMBER
Note
ISMEMBER differs from IN because ISMEMBER is computed on the server while IN is performed on the database whenever possible.
ISMEMBER compares the data values in the specified data range to a table of data
Description
values. It returns one new column for each input column in data, each containing a one if the corresponding input value is a member of table, else a zero.
Examples TEMP = ISMEMBER(25, COLUMN(1...10))
Creates a new column named TEMP, where each value is a one if the corresponding row of column V1 contains a value in column V2, else a zero.
TEMP = ISMEMBER(V1:V2, V5:V10)
Creates two new columns named TEMP and VX. The column TEMP contains a one if the corresponding row of column V1 is a member of columns V5V10, else a zero. The column VX P contains a one if the corresponding row of column V2 is a member of columns V5 V10, else a zero.
TEMP = ISMEMBER(V1[10:15]:V2, V3[1:100]:V6)
Creates two new columns named TEMP and VX, each with values in rows 16 (the other cells are empty). The values in column TEMP are one if the contents of rows 1015 of column V1 are members of rows 1100 of columns V3V6. The values in column VX are one if the contents of rows 1015 of column V2 are members of rows 1100 of columns V3V6.
Unica Confidential
183
Related Functions
Function
ISEVEN ISODD
Description
Tests if input values are even (that is, divisible by two) Tests if input values are odd (that is, not divisible by two).
ISODD
Syntax
ISODD(data)
data The numerical values to test if they are odd. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
ISODD tests each value in the specified data set for oddness. It returns one new column for each input column, each containing a one for all odd values (that is, the value modulo two is one) or a zero for all non-odd values (that is, even values).
Parameters
Description
Note
For non-integer values, the macro function INT is applied first. For example, ISODD(2.5) = 0, since 2 is not odd.
Creates three new columns named TEMP, VX, and VY. TEMP contains the value 1, VX contains the value 0, and VY contains the value 0.
TEMP = ISODD(V1)
Creates a new column named TEMP, where each value is the result of testing the contents of column V1 for oddness.
184
Unica Confidential
KURTOSIS
TEMP = ISODD(V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the results of testing the contents of column V1 for oddness, the values of the VX column are the results of testing the contents of column V2 for oddness, and the values of the VY column are the results of testing the contents of column V3 for oddness.
TEMP = ISODD(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain the results of testing the values in rows 1020 of column V1 for oddness. The other cells in TEMP are empty.
TEMP = ISODD(V1[1:5]:V2)
Creates two new columns named TEMP and VX, each with values in rows 15 (the other cells are empty). The values in column TEMP are the results of testing the corresponding rows of column V1 for oddness, and the values in column VX are the results of testing the corresponding rows of column V2 for oddness.
Related Functions
Function
ISEVEN ISMEMBER
Description
Tests if input values are even (that is, divisible by two) Tests an input range against a table of values, returning one if a value is contained in the table, else zero
KURTOSIS
Syntax
KURTOSIS(data [, keyword])
data The numerical values to compute the kurtosis of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in
Parameters
Unica Confidential
185
Chapter 2, Using Macros in Affinium Model for the format definition of data. There must be at least four values in data.
keyword This optional keyword determines how the computation is performed over the input data range. Select one of the following:
ALLPerforms the computation on all cells in data (default) COLPerforms the computation separately for each column of data ROWPerforms the computation separately for each row of data
See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Description KURTOSIS calculates the kurtosis of the values in the specified data range. Kur-
tosis is a measurement of the relative peakedness or flatness of a distribution compared to a normal distribution. The more negative the kurtosis is, the flatter the distribution. The more positive the kurtosis is, the sharper the peak of the distribution. The kurtosis is calculated as follows:
n 2 n(n + 1) 3(n 1) x j mean ------------------------------------------------------- ------------------------------------------------- ( n 1 )( n 2 )( n 3) j = 1 (n 2)(n 3 )
where n is the number of samples in the distribution, mean is the average, and is the standard deviation of the distribution. A minimum of three data values must be provided to compute kurtosis.
Examples TEMP = KURTOSIS(MERGE(3, 4, 5)) or TEMP = KURTOSIS(MERGE(3, 4, 5), ALL)
Creates a new column named TEMP containing a single value which is the kurtosis of the contents of column V1.
186
Unica Confidential
KURTOSIS
TEMP = KURTOSIS(V1:V3)
Creates a new column named TEMP containing a single value which is the kurtosis of the contents of columns V1, V2, and V3.
TEMP = KURTOSIS(V1[10:20])
Creates a new column named TEMP containing a single value which is the kurtosis of the cells in rows 1020 of column V1.
TEMP = KURTOSIS(V1[1:5]:V4)
Creates a new column named TEMP containing a single value which is the kurtosis of the cells in rows 15 of columns V1 through V4.
TEMP = KURTOSIS(V1:V3, COL)
Creates three new columns named TEMP, VX, and VY. The single value in the TEMP column is the kurtosis of the contents of column V1, the single value in the VX column is the kurtosis of the contents of column V2, and the single value in the VY column is the kurtosis of the contents of column V3.
TEMP = KURTOSIS(MERGE(1,4), COL)
Creates two new columns named TEMP and VX, each containing the value -3. TEMP = KURTOSIS(V1[1:5]:V3, COL) or
TEMP = KURTOSIS(V1[1:5]:V3[1:5], COL)
Creates three new columns named TEMP, VX, and VY, each containing a single value. The value in column TEMP is the kurtosis of the cells in rows 15 of column V1, the value in column VX is the kurtosis of the cells in rows 15 of column V2, and the value in column VY is the kurtosis of the cells in rows 15 of column V3.
TEMP = KURTOSIS(V1:V3, ROW)
Creates a new column named TEMP where each cell entry is the kurtosis of the corresponding row across columns V1, V2, and V3. TEMP = KURTOSIS(V1[1:5]:V3],ROW) or
TEMP = KURTOSIS(V1[1:5]:V3[1:5], ROW)
Creates a new column named TEMP, where the cells in rows 15 contain the kurtosis of the corresponding row across columns V1 through V3. The other cells in TEMP are empty.
Unica Confidential
187
Related Functions
Function
STAT SKEW STDV or STDEV VARIANCE
Description
Computes the first through fourth moments of the specified data range Computes the skew of the distribution of a range of cells Computes the standard deviation of a range of cells Computes the variance of a range of cells
LAG
Syntax
LAG(lag, data)
lag The number of time steps to lag. This value must be a positive integer. data The values to lag. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
Parameters
Description
LAG returns values in the input data range, lagging by the specified number of
time steps. It views each input column as a data series in time. and returns one new column for each input column. Each new column contains the time steplagged values (lagging by lag number of time steps) of the numbers in the corresponding input column. The first lag values in the returned column(s) are zero. The length of the returned column(s) are the lengths of in the corresponding input column(s) + lag.
Note
The LAG macro function returns a column with values such that the cell VY[x] = data[x - lag] for x lag, else 0.
188
Unica Confidential
LAG
Creates a new column named TEMP containing the values 0, 1, 2, 3, and 4 in cells 15, respectively.
TEMP = LAG(2, V1)
Creates a new column named TEMP, where each value is the contents of column V1 lagging by two time steps.
TEMP = LAG(10, V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the contents of column V1 lagging by ten time steps, the values of the VX column are the contents of column V2 lagging by ten time steps, and the values of the VY column are the contents of column V3 lagging by ten time steps.
TEMP = LAG(5, V1[10:20])
Creates a new column named TEMP, where the first 5 cells contain 0, followed by rows 1020 of column V1. The other cells in TEMP are empty.
TEMP = LAG(2, V1[1:5]:V2)
Creates two new columns named TEMP and VX, each with values in rows 17 (the other cells are empty). The values in rows 12 of each column are zeros. The remaining values in TEMP are the values in rows 15 of column V1. The remaining values in column VX are rows 15 of column V2.
Related Functions
Function
DELAY SLIDE_WINDOW
Description
Returns the input column(s) values delayed by a specified number of time steps Creates a pattern from a specified window and slides it down to create the next pattern
Unica Confidential
189
LE
Syntax
Parameters
Description
LE compares the two specified data ranges, returning a one if the values in the
first data set are less than or equal to the values in the second data set or a zero otherwise. It returns a new column for each input column, each containing the corresponding column in data1 compared to the corresponding column of data2 (that is, the first column of data1 is compared to the first column of data, the second column with the second column, and so on). If data2 is a constant, each value in data is compared to that value. If data2 is a column, the calculations are performed on a row-by-row basis. The values in data1 are compared to the first row value of data2, the second row with the second row, and so on. This row-by-row calculation produces a result for each row up to the last value of the shortest column.
Tip
The LE operator can be abbreviated with a less than sign followed by an equal sign (<=).
190
Unica Confidential
LE
Creates a new column named TEMP containing the value one (since four is equal to itself).
TEMP = V1 <= 8
Creates a new column named TEMP, where each value is one if the corresponding row value of the column V1 is less than or equal to the number eight, otherwise zero.
TEMP = V1:V3 <= 2
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the contents of column V1 compared to the value two, the values of the VX column are the contents of column V2 compared to the value two, and the values of the VY column are the contents of column V3 compared to the value two.
TEMP = V1 <= V1
Creates a new column named TEMP containing all ones (since every number is equal to itself).
TEMP = V1 <= V2
Creates a new column named TEMP, where each value is the row value of column V1 compared to the corresponding row value of column V2. TEMP = V1[10:20] <= V2 or
TEMP = V1[10:20] <= V2[1:11]
Creates a new column named TEMP, where the first 11 cells contain the results of comparing the values in rows 1020 of column V1 with the values in rows 111 of column V2. The other cells in TEMP are empty.
Related Functions
Function
EQ GE
Description
Returns TRUE if one data range is equal to another Returns TRUE if one data range is greater than or equal to another
Unica Confidential
191
Function
GT LT NE
Description
Returns TRUE if one data range is greater than another Returns TRUE if one data range is less than another Returns TRUE if one data range is not equal to another
LIKE
Syntax
Parameters
An underscore (_) in data2 represents a wildcard character that will match any single character in data1. A percent sign (%) will match zero or more characters in data1.
Description LIKE compares the two specified data ranges, returning a one if the strings match
or a zero if they do not. It returns a new column for each input column, each containing the corresponding column in data1 compared to the corresponding column of data2 (that is, the first column of data1 is compared to the first column of data2, the second column with the second column, and so on). If data2 is a string constant, each string in data1 is compared to that string. If data2 is a column, the calculations are performed on a row-by-row basis. The first row string in data1 is compared to the first row string of data2, the sec-
192
Unica Confidential
LIKE
ond row with the second row, and so on. This row-by-row calculation produces a result for each row up to the last string in the shortest column. When comparing strings, case does not matter (that is, Yes, YES, yes, and yeS are all considered equal).
Note
The LIKE macro has a negative version, NOT LIKE. The format for this is identical to LIKE. NOT LIKE returns a one if the string in data1 does not match the template defined by data2.
Creates a new column named TEMP containing the value one (since the two strings match).
TEMP = No LIKE NO
Creates a new column named TEMP containing the value one (string compares are case insensitive).
TEMP = V1 LIKE gold%
Creates a new column named TEMP, where each value is one if the corresponding row value of the column V1 is equal to the string gold followed by any number of characters. Otherwise, each value is zero.
TEMP = V1 LIKE g_ld
Creates a new column named TEMP, where each value is one if the corresponding row value of the column V1 is equal to the string g followed by any character, followed by ld. Otherwise, each value is zero.
TEMP = V1 LIKE V1
Creates a new column named TEMP containing all ones (since every number is equal to itself).
TEMP = V1 LIKE V2
Creates a new column named TEMP, where each value is the row value of column V1 compared to the corresponding row value of column V2.
Unica Confidential
193
Creates three new columns named TEMP, VX, and VY. The column TEMP contains the strings in V1 compared to the corresponding row strings of column V4. The column VX compares columns V2 and V5. The column VY compares columns V3 and V6. TEMP = V1[10:20] LIKE V2 or
TEMP = V1[10:20] LIKE V2[1:11]
Creates a new column named TEMP, where the first 11 cells contain the results of comparing the strings in rows 1020 of column V1 to rows 111 of column V2. The other cells in TEMP are empty.
Related Functions
Function
EQ GE GT LE LT NE
Description
Returns TRUE if one data range is equal to another Returns TRUE if one data range is greater than or equal to another Returns TRUE if one data range is greater than another Returns TRUE if one data range is less than or equal to another Returns TRUE if one data range is less than another Returns TRUE if one data range is not equal to another
LN or LOG
Syntax
LN(data) or LOG(data)
data The numerical values to compute the natural logarithm of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above.See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign
Parameters
194
Unica Confidential
LN or LOG
or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
Description LN or LOG calculates the natural log of each value in the specified data range. It
returns one new column for each input column, each containing the natural logarithm of numbers in the corresponding input column. Natural logarithms are based on the constant e = 2.7182818. LN is the inverse of the EXP macro function.
Note
All values in the specified data range must be greater than zero. Otherwise, a blank cell is returned for each invalid input.
Creates a new column named TEMP, where each value is the natural log of the contents of column V1.
TEMP = LN(V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the natural logs of the contents of column V1, the values in the VX column are the natural logs of the contents of column V2, and the values in the VY column are the natural logs of the contents of column V3.
TEMP = LN(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain the natural logs of the values in rows 1020 of column V1. The other cells in TEMP are empty.
TEMP = LN(V1[1:5]:V2)
Creates two new columns named TEMP and VX, each with values in rows 15 (the other cells are empty). The values in column TEMP are the natural logs of the corresponding rows of column V1, and the values in column VX are the natural logs of the corresponding rows of column V2.
Unica Confidential
195
Related Functions
Function
EXP LOG2 LOG10 POW
Description
Computes the natural number (e) raised to the contents of each cell in the specified data range Computes the log base-2 of the contents of the specified data range Computes the log base-10 of the contents of the specified data range Computes a base value raised to the specified exponential power(s)
LOG2
Syntax
LOG2(data)
data The numerical values to compute the base-2 logarithm of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
LOG2 calculates the base-2 logarithm of values in the specified data range. It
Parameters
Description
returns one new column for each input column, each containing the base-2 logarithm of numbers in the corresponding input column.
Note
All values in the specified data range must be greater than zero. Otherwise, a blank cell is returned for each invalid input.
196
Unica Confidential
LOG10
TEMP = LOG2(V1)
Creates a new column named TEMP, where each value is the base-2 log of the contents of column V1.
TEMP = LOG2(V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the base-2 logs of the contents of column V1, the values of the VX column are the base-2 logs of the contents of column V2, and the values of the VY column are the base-2 logs of the contents of column V3.
TEMP = LOG2(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain the base-2 logs of the values in rows 1020 of column V1. The other cells in TEMP are empty.
TEMP = LOG2(V1[1:5]:V2)
Creates two new columns named TEMP and VX, each with values in rows 15 (the other cells are empty). The values in column TEMP are the base-2 logs of the corresponding rows of column V1, and the values in column VX are the base-2 logs of the corresponding rows of column V2.
Related Functions
Function
LN or LOG LOG10 POW
Description
Computes the natural log of the contents of the specified data range Computes the log base-10 of the contents of the specified data range Exponential power
LOG10
Syntax
LOG10(data)
Unica Confidential
197
Parameters
data The numerical values to compute the base-10 logarithm of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
LOG10 calculates the base-10 logarithm of the values in the specified data range.
Description
It returns one new column for each input column, each containing the base-10 logarithm of numbers in the corresponding input column.
Note
All values in the specified data range must be greater than zero. Otherwise, a blank cell is returned for each invalid input.
Creates a new column named TEMP, where each value is the base-10 log of the contents of column V1.
TEMP = LOG10(V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the base-10 logs of the contents of column V1, the values of the VX column are the base-10 logs of the contents of he column V2, and the values of the VY column are the base-10 logs of the contents of column V3.
TEMP = LOG10(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain the base-10 logs of the values in rows 1020 of column V1. The other cells in TEMP are empty.
198
Unica Confidential
LOWER
TEMP = LOG10(V1[1:5]:V2)
Creates two new columns named TEMP and VX, each with values in rows 15 (the other cells are empty). The values in column TEMP are the base-10 logs of the corresponding rows of column V1, and the values in column VX are the base-10 logs of the corresponding rows of column V2.
Related Functions
Function
LN or LOG LOG2 POW
Description
Computes the natural log of the contents of the specified data range Computes the log base-2 of the contents of the specified data range Exponential power
LOWER
Syntax LOWER(data)
Parameters
data
returns a new column with each cell containg the lowercased string of the corresponding input cell.
Examples Temp = LOWER GOLD
Creates a new column named TEMP, which contains the ASCII text string jan 15, 1997.
Unica Confidential
199
Creates a new column named TEMP, which contains the ASCII text string pressure.
TEMP = LOWER(V1)
Creates a new column named TEMP containing lowercase characters of each string in column V1.
Related Functions
Function
Description
LT
Syntax
Parameters
200
Unica Confidential
LT
Description
LT compares the two specified data ranges, returning a one if the values in the
first data set are less than the values in the second data set or a zero otherwise. It returns a new column for each input column, each containing the corresponding column in data1 compared to the corresponding column of data2 (that is, the first column of data1 is compared to the first column of data, the second column with the second column, and so on). If data2 is a constant, each value in data is compared to that value. If data2 is a column, the calculations are performed on a row-by-row basis. The values in data1 are compared to the first row value of data2, the second row with the second row, and so on. This row-by-row calculation produces a result for each row up to the last value of the shortest column.
Tip
Creates a new column named TEMP containing the value one (since three is less than four).
TEMP = V1 < 8
Creates a new column named TEMP, where each value is one if the corresponding row value of the column V1 is less than the number eight, otherwise zero.
TEMP = V1:V3 < 2
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the contents of column V1 compared to the value two, the values of the VX column are the contents of column V2 compared to the value two, and the values of the VY column are the contents of column V3 compared to the value two.
TEMP = V1 < V1
Creates a new column named TEMP containing all zeros (since no number is less than itself).
Unica Confidential
201
TEMP = V1 < V2
Creates a new column named TEMP, where each value is the row value of column V1 compared to the corresponding row value of column V2. TEMP = V1[10:20] < V2 or
TEMP = V1[10:20] < V2[1:11]
Creates a new column named TEMP, where the first 11 cells contain the results of comparing the values in rows 1020 of column V1 to rows 111 of column V2. The other cells in TEMP are empty.
Related Functions
Function
EQ GE GT LE
Description
Returns TRUE if one data range is equal to another Returns TRUE if one data range is greater than or equal to another Returns TRUE if one data range is greater than another Returns TRUE if one data range is less than or equal to another
LTRIM
Syntax LTRIM(data)
Parameters
data
data range, returning the converted string. It returns one new column for each input column.
202
Unica Confidential
MAX
Related Functions
Function
Description
MAX
Syntax
MAX(data [, keyword])
data The numerical values to compute the maximum of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data. keyword This optional keyword determines how the computation is performed over the input data range. Select one of the following:
ALLPerforms the computation on all cells in data (default) COLPerforms the computation separately for each column of data ROWPerforms the computation separately for each row of data
Parameters
Unica Confidential
203
See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Note
Many macro functions take the keyword parameters {ALL | COL | ROW}. These keywords do not apply in Affinium Campaign because the input data is always a single column or field. The macro will always behave as if the COL keyword were specified. Therefore, you do not need to specify these keywords when using Affinium Campaign.
MAX calculates the maximum of the values in the specified data range. It returns
Description
Creates a new column named TEMP containing a single value which is the maximum of columns V1, V3, and V5.
TEMP = MAX(V1)
Creates a new column named TEMP containing a single value which is the maximum value of the contents of column V1.
TEMP = MAX(V1:V3)
Creates a new column named TEMP containing a single value which is the maximum of the columns V1, V2, and V3.
TEMP = MAX(V1[10:20])
Creates a new column named TEMP containing a single value which is the maximum of the cells in rows 1020 of column V1.
TEMP = MAX(V1[1:5]:V4)
Creates a new column named TEMP containing a single value which is the maximum of the cells in rows 15 of columns V1 through V4.
204
Unica Confidential
MAXINDEX
Creates three new columns named TEMP, VX, and VY. The single value in the TEMP column is the maximum of the contents of column V1, the single value in the VX column is the maximum of the contents of column V2, and the single value in the VY column is the maximum of the contents of column V3.
TEMP = MAX(V1[1:5]:V3, COL)
Creates three new columns named TEMP, VX, and VY, each containing a single value. The value in column TEMP is the maximum of the cells in rows 15 of column V1, the value in column VX is the maximum of the cells in rows 15 of column V2, and the value in column VY is the maximum of the cells in rows 15 of column V3.
TEMP = MAX(V1:V3, ROW)
Creates a new column named TEMP where each cell entry is the maximum of the corresponding row across columns V1, V2, and V3.
TEMP = MAX(V1[10:20]:V3, ROW)
Creates a new column named TEMP, where the first 11 cells contain the maximum of the values in rows 1020 across columns V1 through V3. The other cells in TEMP are empty.
Related Functions
Function
DECIMATE
Description
Decimates a column of numbers into multiple columns where a one indicates the index value Returns the column index of the nth (first, second, third, etc.) maximum value for each row of the specified column Computes the minimum of a range of cells
MAXINDEX MIN
MAXINDEX
Syntax
MAXINDEX(data [, n])
Unica Confidential
205
Parameters
data The start of a data range for which to compute the index of the nth maximum value for each row. This can be a column, or an expression evaluating to a column. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
n Number, greater than zero. The default value is one, which returns the index of the highest value for each row. (Two returns the index for the second highest value, three the index for the third highest value, etc.)
Description MAXINDEX finds the nth maximum value in each row of the specified data range
and returns a column index for its location. It returns a new column containing a single value representing the index of the nth maximum value for each row. A value of one indicates the first cell in the first column. If there is more than one maximum value, the first column containing the nthmaximum is returned.
Tip
If you have multiple columns, each one representing a separate output class, you can use MAXINDEX to select the winning class. You can then train with a single output column rather than multiple output columns. For example, V4 = MAXINDEX(V1:V3) would do the following:
V1 0 1 0 V2 1 0 0 V3 0 0 1 V4 2 1 3
Creates a new column named TEMP containing the value two (since the maximum value is five, which occurs in the second column).
206
Unica Confidential
MEAN
TEMP = MAXINDEX(V1)
Creates a new column named TEMP containing a one for each row of column V1.
TEMP=MAXINDEX (V6:V8,3) Creates a new column named TEMP with each value representing the index of the minimum value (in this case 3rd highest of 3) of the corresponding row across the columns V6, V7 and V8. A one is retuned if the minimum is in column V6, a two if the minimum is in column V7, and a three is the minimum is in column V8 TEMP = MAXINDEX(V6:V8)
Creates a new column named TEMP with each value representing the index of the maximum value of the corresponding row across the columns V6, V7, and V8. A one is returned if the maximum is in column V6, a two if the maximum is in column V7, and a three if the maximum is in column V8.
TEMP = MAXINDEX(V1[1:5]:V3]
Creates a new column named TEMP, where the cells in rows 15 contain a value representing the index of the maximum value of the corresponding row across columns V1 through V3. The other cells in TEMP are empty.
Related Functions
Function
DECIMATE MAX MIN
Description
Decimates a column of numbers into multiple columns where a one indicates the index value Computes the maximum of a range of cells Computes the minimum of a range of cells
MEAN
Syntax
MEAN(data [, keyword])
Unica Confidential
207
Parameters
data The numerical values to compute the arithmetic mean of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data. keyword This optional keyword determines how the computation is performed over the input data range. Select one of the following:
ALLPerforms the computation on all cells in data (default) COLPerforms the computation separately for each column of data ROWPerforms the computation separately for each row of data
Many macro functions take the keyword parameters {ALL | COL | ROW}. These keywords do not apply in Affinium Campaign because the input data is always a single column or field. The macro will always behave as if the COL keyword were specified. Therefore, you do not need to specify these keywords when using Affinium Campaign.
MEAN calculates the arithmetic mean or average of the cells in the specified data
Description
range. The arithmetic mean is calculated by summing the contents of all cells divided by the number of cells. The number of columns returned by MEAN depends on keyword.
If keyword is ALL, MEAN returns one new column, containing a single value (the average of all cells in data). If keyword is COL, MEAN returns a new column for each input column. Each new column contains one value (the average of all cells in the corresponding input column). If keyword is ROW, MEAN returns one new column containing the average across each row of data.
Note
208
Unica Confidential
MEAN
Note Examples
Creates a new column named TEMP containing a single value which is the arithmetic mean of the contents of column V1.
TEMP = MEAN(V1:V3)
Creates a new column named TEMP containing a single value which is the arithmetic mean of the contents of columns V1, V2, and V3.
TEMP = MEAN(V1[10:20])
Creates a new column named TEMP containing a single value which is the arithmetic mean of the cells in rows 1020 of column V1.
TEMP = MEAN(V1[1:5]:V4)
Creates a new column named TEMP containing a single value which is the arithmetic mean of the cells in rows 15 of columns V1 through V4.
TEMP = MEAN(V1:V3, COL)
Creates three new columns named TEMP, VX, and VY. The single value in the TEMP column is the arithmetic mean of the contents of column V1, the single value in the VX column is the arithmetic mean of the contents of column V2, and the single value in the VY column is the arithmetic mean of the contents of column V3.
TEMP = MEAN(MERGE(1,4),COL)
Creates two new columns named TEMP and VX. TEMP contains a single value of one; VX contains a single value of four.
Unica Confidential
209
Creates three new columns named TEMP, VX, and VY, each containing a single value. The value in column TEMP is the arithmetic mean of the cells in rows 1020 of column V1, the value in column VX is the arithmetic mean of the cells in rows 1020 of column V2, and the value in column VY is the arithmetic mean of the cells in rows 1020 of column V3.
TEMP = MEAN(V1:V3, ROW)
Creates a new column named TEMP where each cell entry is the arithmetic mean of the corresponding row across columns V1, V2, and V3.
TEMP = MEAN(V1[1:5]:V3,ROW)
Creates a new column named TEMP, where the cells in rows 15 contain the arithmetic mean of the corresponding row across columns V1 through V3. The other cells in TEMP are empty.
Related Functions
Function
AVG_DEV SUM or TOTAL
Description
Computes the average deviation of a range of cells Computes the sum of a range of cells
MERGE
Syntax
Parameters
210
Unica Confidential
MERGE
Description
MERGE horizontally concatenates its input into a new group. It returns as many new columns as provided as input. An unlimited number of arguments can be provided. Tip
The MERGE macro function can be specified using braces ({}). Simply insert the arguments within braces separated by commas (for example, TEMP = {1,2,3} is equivalent to TEMP = MERGE(1,2,3)).
Creates three new columns named TEMP, VX, and VY, containing the values 3, 4, and five respectively. TEMP = V1:V3 or
TEMP = MERGE(V1:V3)
Creates three new columns named TEMP, VX, and VY, where TEMP is a copy of the column V1, VX is a copy of the column V2, and VY is a copy of the column V3.
TEMP = MERGE(V1, V3, V5:V7)
Creates five new columns named TEMP, VW, VX, VY, and VZ. TEMP is a copy of column V1; VW is a copy of column V3; VX through VZ are copies of columns V5 through V7.
TEMP = AVG(MERGE(V1,V3,V5), ROW)
Creates one new column named TEMP, where each row is the average of the corresponding row across columns V1, V3, and V5. An average is only computed up to the last row of the shortest input column.
TEMP = MERGE(V1[10:50],V3, V5:V7[1:30])
Creates five new columns named TEMP, VW, VX, VY, and VZ. TEMP is a copy of the values in rows 1050 of column V1; VW is a copy of the values column V3; VX through VZ are copies of the values in rows 130 of columns V5 through V7.
Unica Confidential
211
Creates one new column named TEMP containing the average of all cells in columns V1, V5, and V6.
Related Functions
Function
COLUMN SELECT TRANSPOSE
Description
Creates new column(s), vertically concatenating the input values in each column Returns the specified column(s) from a data range Transposes a specified data range
MIN
Syntax
MIN(data [, keyword])
data The numerical values to compute the minimum of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data. keyword This optional keyword determines how the computation is performed over the input data range. Select one of the following:
ALLPerforms the computation on all cells in data (default) COLPerforms the computation separately for each column of data ROWPerforms the computation separately for each row of data
Parameters
212
Unica Confidential
MIN
Note
Many macro functions take the keyword parameters {ALL | COL | ROW}. These keywords do not apply in Affinium Campaign because the input data is always a single column or field. The macro will always behave as if the COL keyword were specified. Therefore, you do not need to specify these keywords when using Affinium Campaign.
MIN calculates the minimum of all the cells in the specified data range. It returns
Description
Creates a new column named TEMP containing a single value which is the minimum value of column V1.
TEMP = MIN(V1:V3)
Creates a new column named TEMP containing a single value which is the minimum of columns V1, V2, and V3.
TEMP = MIN(V1[10:20])
Creates a new column named TEMP containing a single value which is the minimum of the cells in rows 1020 of column V1.
TEMP = MIN(V1[1:5]:V4)
Creates a new column named TEMP containing a single value which is the minimum of the cells in rows 15 of columns V1 through V4.
TEMP = MIN(V1:V3, COL)
Creates three new columns named TEMP, VX, and VY. The single value in the TEMP column is the minimum of column V1, the single value in the VX column is the minimum of column V2, and the single value in the VY column is the minimum of column V3.
Unica Confidential
213
Creates three new columns named TEMP, VX, and VY, each containing a single value. The value in column TEMP is the minimum of the cells in rows 15 of column V1, the value in column VX is the minimum of the cells in rows 15 of column V2, and the value in column VY is the minimum of the cells in rows 15 of column V3.
TEMP = MIN(V1:V3, ROW)
Creates a new columns named TEMP where each cell entry is the minimum of the corresponding row across columns V1, V2, and V3.
TEMP = MIN(V1[10:20]:V3, ROW)
Creates a new column named TEMP, where the first 11 cells contain the minimum of the values in rows 15 across columns V1 through V3. The other cells in TEMP are empty.
Related Functions
Function
DECIMATE MAX MAX_TO_INDEX
Description
Decimates a column of numbers into multiple columns where a one indicates the index value Computes the maximum of a range of cells Returns the column index of the maximum value for each row of the specified column
MINUS
Syntax
Parameters
214
Unica Confidential
MINUS
subtrahend The number(s) to subtract from all values in the specified column. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. The number of columns in subtrahend must equal the number of columns in data, unless subtrahend is a constant. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of subtrahend (same as data).
Description MINUS subtracts subtrahend from the specified data range data. It returns a
new column for each input column, each containing the corresponding column in data minus the corresponding column of subtrahend (that is, the first column of data subtracts the first column of subtrahend, the second column with the second column, and so on). If subtrahend is a constant, each value in data is subtracts that value. If subtrahend contains one or more columns, the calculations are performed on a row-by-row basis between one column from data and one column from subtrahend. The first row of data subtracts the first row value of subtrahend, the second row with the second row, and so on. This row-by-row calculation produces a result for each row up to the last value of the shortest column.
Tip
The MINUS operator can be abbreviated with a minus sign or hyphen (-).
Creates a new column named TEMP, where each value is the contents of column V1 minus eight.
TEMP = V1:V3 - 2
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the contents of column V1 minus two, the values of the VX column are the contents of column V2 minus two, and the values of the VY column are the contents of column V3 minus two.
Unica Confidential
215
TEMP = V1 - V1
Creates a new column named TEMP containing all zeros (since any number minus itself is zero).
TEMP = V1 - V2
Creates a new column named TEMP, where each value is the row value of column V1 minus the corresponding row value of column V2.
TEMP = V1:V3 -V4:V6
Creates three new columns named TEMP, VX, and VY. The column TEMP contains the values in V1 minus the corresponding row values of column V4. The column VX subtracts column V5 from V2. The column VY subtracts column V6 from V3. TEMP = V1[10:20] - V2 or
TEMP = V1[10:20] - V2[1:11]
Creates a new column named TEMP, where the first 11 cells contain the values in rows 1020 of column V1 minus the values in rows 111 of column V2. The other cells in TEMP are empty.
Related Functions
Function
PLUS SUM or TOTAL
Description
Adds the contents of two data ranges Computes the sum of a range of cells
MOD
Syntax
Parameters
216
Unica Confidential
MOD
divisor The non-zero base integer to compute the modulo in respect to. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. The number of columns in divisor must equal the number of columns in data, unless divisor is a constant. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of divisor (same as data).
Description MOD calculates the remainder of dividing the specified data range by a specified value. This is computed by dividing divisor into each value and returning the remainder. It returns one new column for each input column, each containing the numbers in data modulo divisor. The remainder will have the same sign (positive or negative) as data.
If divisor is a constant, each value in the specified column is calculated modulo that value. If divisor is a column, the calculations are performed on a rowby-row basis. The values in data are calculated modulo the first row value of divisor, the second row with the second row, and so on. This row-by-row calculation produces a result for each row up to the last value of the shortest column.
Note
Tip
The MOD operator can be abbreviated with the percent sign (%). For example, TEMP = 5 % 3 is equivalent to TEMP = 5 MOD 3.
Creates a new column named TEMP, where each value is the contents of column V1, modulo eight.
Unica Confidential
217
TEMP = V1:V3 % 2
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the values modulo two of the contents of column V1, the values of the VX column are the values modulo two of the contents of column V2, and the values of the VY column are the values modulo two of the contents of column V3.
TEMP = V1 % V1
Creates a new column named TEMP, containing a zero for each entry in the column V1. This is because every number modulo itself is zero.
TEMP = V1 % V2
Creates a new column named TEMP, where each value is the row value of column V1 modulo the corresponding row value of column V2. Note that if V2=V1, then all zeros are returned, as in the previous example.
TEMP = V1:V3 % V4:V6
Creates three new columns named TEMP, VX, and VY. The column TEMP contains the values in V1 modulo the corresponding row values of column V4. The column VX contains the results of column V2 modulo V5. The column VY contains the results of column V3 modulo V6. TEMP = V1[10:20] % V2 or
TEMP = V1[10:20] % V2[1:11]
Creates a new column named TEMP, where the first 11 cells are the values of the values in rows 1020 of column V1 modulo the values in rows 111 of column V2. The other cells in TEMP are empty.
Related Functions
Function
DIV MOD
Description
Divides one specified data range by another Computes the modulo of the contents of the specified data range
218
Unica Confidential
MONTHOF
MONTHOF
Syntax MONTHOF(date_string [, input_format])
Parameters
date_string A text representing a valid date. input_format One of the keywords in the table below, specifying the date format of date_string.
Description
MONTHOF returns the month as a number for the date specified by the
See DATE on page 116 for additional information on valid date formats.
Function
DAYOF WEEKDAYOF YEAROF
Description
Returns the day of the week as a number. Returns the weekday of the week as a number. Returns the year as a number.
MULT
Syntax
Parameters
Unica Confidential
219
Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
multiplier The number to multiply all values in the specified column by. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. The number of columns in multiplier must equal the number of columns in data, unless multiplier is a constant. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of multiplier (same as data).
Description MULT multiplies the values in the two specified data ranges. It returns one new
column for each input column, each containing the numbers in data multiplied by multiplier. If multiplier is a constant, each value in data is multiplied by that value. If multiplier is a column, the calculations are performed on a row-by-row basis. The values in data are multiplied by the first row value of multiplier, the second row with the second row, and so on. This row-byrow calculation produces a result for each row up to the last value of the shortest column.
Note
Using a column containing the same number x in each row as multiplier is the same as using the constant x as multiplier.
Tip
Creates a new column named TEMP, where each value is the contents of column V1 multiplied by eight.
220
Unica Confidential
MULT
TEMP = V1:V3 * 2
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are two times the contents of column V1, the values of the VX column are two times the contents of column V2, and the values of the VY column are two times the contents of column V3.
TEMP = V1 * V1
Creates a new column named TEMP containing the square of each value in column V1.
TEMP = V1 * V2
Creates a new column named TEMP, where each value is the row value of column V1 multiplied by the corresponding row value of column V2.
TEMP = V1:V3 * V4:V6
Creates three new columns named TEMP, VX, and VY. The column TEMP contains the values in V1 times the corresponding row values of column V4. The column VX multiplies column V2 by V5. The column VY multiplies column V3 by V6. TEMP = V1[10:20] * V2 or
TEMP = V1[10:20] * V2[1:11]
Creates a new column named TEMP, where the first 11 cells contain the values in rows 1020 of column V1 times the values in rows 1 11 of column V2. The other cells in TEMP are empty.
Related Functions
Function
DIV EXP POW
Description
Divides one specified data range by another Computes the natural number (e) raised to the contents of each cell in the specified data range Computes a base value raised to the specified exponential power(s)
Unica Confidential
221
NE
Syntax
Parameters
Description
NE compares the two specified data ranges, returning a one if the values are not
equal or a zero if they are equal. It returns a new column for each input column, each containing the corresponding column in data1 compared to the corresponding column of data2 (that is, the first column of data1 is compared to the first column of data, the second column with the second column, and so on). If data2 is a constant, each value in data1 is compared to that value. If data2 is a column, the calculations are performed on a row-by-row basis. The values in the first row of data1 are compared to the first row value of data2, the second row with the second row, and so on. This row-by-row calculation produces a result for each row up to the last value of the shortest column.
Note
Using a column containing the same number x in each row as data2 is the same as using the constant x as data2.
222
Unica Confidential
NE
Tip
The NE operator can be abbreviated with an exclamation point followed by an equal sign (!=) or by a less-than sign followed by a greater-than sign (<>).
Creates a new column named TEMP containing the value one (since three is not equal to four).
TEMP = V1 != 8
Creates a new column named TEMP, where each value is one if the corresponding row value of the column V1 is not equal to the number eight, otherwise zero.
TEMP = V1:V3 != 2
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the contents of column V1 compared to the value two, the values of the VX column are the contents of column V2 compared to the value two, and the values of the VY column are the contents of column V3 compared to the value two.
TEMP = V1 != V1
Creates a new column named TEMP containing all zeros (since every number is equal to itself).
TEMP = V1 != V2
Creates a new column named TEMP, where each value is the row value of column V1 compared to the corresponding row value of column V2.
TEMP = V1:V3 != V4:V6
Creates three new columns named TEMP, VX, and VY. The column TEMP contains the values in V1 compared to the corresponding row values of column V4. The column VX compares columns V2 and V5. The column VY compares columns V3 and V6.
Unica Confidential
223
Creates a new column named TEMP, where the first 11 cells contain the results of comparing the values in rows 1020 of column V1 and rows 111 of column V2. The other cells in TEMP are empty.
Related Functions
Function
EQ GE GT LE LT
Description
Returns TRUE if one data range is equal to another Returns TRUE if one data range is greater than or equal to another Returns TRUE if one data range is greater than another Returns TRUE if one data range is less than or equal to another Returns TRUE if one data range is less than another
NORM_MINMAX
Syntax
Parameters
224
Unica Confidential
NORM_MINMAX
base_data This parameter specifies a data range to use for computing the maximum and minimum to use for normalization. The number of columns provided in base_data must be the same number of columns as provided for data. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of base_data (same as data). keyword This optional keyword determines how the computation is performed over the input data range. Select one of the following:
ALLPerforms the computation on all cells in data (default) COLPerforms the computation separately for each column of data ROWPerforms the computation separately for each row of data
See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Description NORM_MINMAX calculates the normalized values of the specified data range. All
returned values will be between zero and one, inclusive.The min/max normalization is performed as follows:
VX [ y ] min VX [ y ] = -------------------------------max min
If min and max are provided, these values are used for the minimum and maximum, respectively. If these parameters are provided with the ROW keyword, min and max can be columns, specifying a min and max value for each row of data. If min and max are columns, the columns must be either the same length as data or scalar (that is, contain a single value which is used as a constant applied to all values in the corresponding column of data). If base_data is provided, the minimum and maximum of this data range are calculated and used to normalize data. The columns in base_data must contain two or more cell values.
Unica Confidential
225
If neither of the above mutually exclusive options are provided, the minimum and maximum values are automatically computed from data.
Note
Since all returned values are between 0.0 and 1.0, any values computed using Equation (above) less than 0.0 are returned as 0.0. Similarly, any values greater than 1.0 are returned as 1.0.
NORM_MINMAX always returns a data range with the same dimensions as the input data range. The ALL keyword specifies to compute the mean and standard deviation over the entire input data range. The COL keyword specifies to compute a mean and standard deviation for each input column and to use those values for normalizing that column. The ROW keyword specifies to compute a mean and standard deviation for each row in the specified data range and to use those values for normalizing that row.
Note Examples
If the minimum and maximum are equal, then all zeros are returned.
TEMP = NORM_MINMAX(3)
Creates a new column named TEMP containing the values 0, 0.5, and 1. (The minimum and maximum [3 and 5] are calculated from the data range automatically.)
TEMP = NORM_MINMAX(COLUMN(3, 4, 5), 0, 10)
Creates a new column named TEMP containing the values 0.3, 0.4, and 0.5. (This time the minimum and maximum [0 and 10] are provided as arguments.)
TEMP = NORM_MINMAX(V1)
Creates a new column named TEMP containing normalized values of the contents of column V1. The minimum and maximum values used for normalization are calculated over the column V1.
226
Unica Confidential
NORM_MINMAX
TEMP = NORM_MINMAX(V1:V3)
Creates three new columns named TEMP, VX, and VY. Each contains the normalized values of the contents of columns V1, V2, and V3, respectively. The minimum and maximum values used for normalization are calculated over columns V1, V2, and V3.
TEMP = NORM_MINMAX(V1[1:5]:V3)
Creates three new columns named TEMP, VX, and VY, each with values in rows 15. The contents of column TEMP are the normalized values of the corresponding rows in column V1, the contents of column VX are the normalized values of the corresponding rows of column V2, and the contents of column VY are the normalized values of the corresponding rows of column V3. The minimum and maximum for normalization purposes are calculated over rows 1 5 of columns V1V3.
TEMP = NORM_MINMAX(V1:V3, V4:V6)
Creates three new columns named TEMP, VX, and VY. Each contains the normalized values of the contents of columns V1, V2, and V3, respectively. The minimum and maximum values used for normalization are calculated over columns V4, V5, and V6.
TEMP = NORM_MINMAX(V1:V3, COL)
Creates three new columns named TEMP, VX, and VY. Each contains the normalized values of the contents of columns V1, V2, and V3, respectively. The minimum and maximum values used for normalization are calculated for each column independently (that is, a min/max is calculated for column V1, a separate min/max is calculated for column V2, etc.).
TEMP = NORM_MINMAX(V1[10:50]:V3, COL)
Creates three new columns named TEMP, VX, and VY, each with values in the first 41 rows. The contents of column TEMP are the normalized values of rows 1050 of column V1, the contents of column VX are the normalized values of rows 1050 of column V2, and the contents of column VY are the normalized values of rows 1050 of column V2. The minimum and maximum for normalization purposes are calculated independently across rows 1050 for each column.
Unica Confidential
227
Creates three new columns named TEMP, VX, and VY. Each contains the normalized values of the contents of columns V1, V2, and V3, respectively. The minimum and maximum values used for normalization are calculated for each column independently using columns V4V6 (that is, a min/max is calculated over column V4 for normalizing column V1, a separate min/max is calculated over column V5 for normalizing column V2, etc.).
TEMP = NORM_MINMAX(V1:V3, ROW)
Creates three new columns named TEMP, VX, and VY. Each contains the normalized values of the contents of columns V1, V2, and V3, respectively. The minimum and maximum values used for normalization are calculated over independently over each row across columns V1, V2, and V3.
TEMP = NORM_MINMAX(V1[10:20]:V3, ROW)
Creates three new columns named TEMP, VX, and VY, each with values in the first 11 rows. The contents of column TEMP are the normalized values of rows 1020 in column V1, the contents of column VX are the normalized values of rows 1020 of column V2, and the contents of column VY are the normalized values of rows 1020 of column V3. The minimum and maximum for normalization purposes are calculated over each of the rows 1020 of columns V1V3.
TEMP = NORM_MINMAX(V1:V3, V8:V10, ROW)
Creates three new columns named TEMP, VX, and VY. Each contains the normalized values of the contents of columns V1, V2, and V3, respectively. The minimum and maximum values used for normalization are calculated independently for each row across columns V8V10.
Related Functions
Function
NORM_SIGMOID NORM_ZSCORE
Description
Computes the sigmoidal normalization of a data range Computes the z-score normalization of a data range
228
Unica Confidential
NORM_SIGMOID
NORM_SIGMOID
Syntax
Parameters
See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Description NORM_SIGMOID calculates the normalized values of the specified data range. A
sigmoidal normalization redistributes data along a sigmoid curve, returning values between -1.0 and +1.0, inclusive. Essentially, all data within a standard deviation of the mean is linearly distributed in the middle range of the sigmoid. Outliers are represented along the tails of the sigmoid. This allows you to keep
Unica Confidential
229
very large outlier data points without sacrificing discrimination ability among points near the mean. The sigmoidal normalization is performed as follows:
1 e VX [ y ] = ---------------1 + e
where
VX [ y ] mean = -----------------------------------std
If mean and std are provided, these values are used for the mean and standard deviation, respectively. If these parameters are provided with the ROW keyword, mean and std can be columns, specifying a mean and standard deviation for each row of data. If min and max are columns, the columns must be either the same length as data or scalar (that is, contain a single value which is used as a constant applied to all values in the corresponding column of data). If base_data is provided, the mean and standard deviation of this data range are calculated and used to normalize data. The columns in base_data must contain two or more cell values. If neither of the above mutually exclusive options are provided, the mean and standard deviation are automatically computed from data.
NORM_SIGMOID always returns a data range with the same dimensions as the input data range. The ALL keyword specifies to compute the mean and standard deviation over the entire input data range. The COL keyword specifies to compute a mean and standard deviation for each input column and to use those values for normalizing that column. The ROW keyword specifies to compute a mean and standard deviation for each row in the specified data range and to use those values for normalizing that row. Note
230
Unica Confidential
NORM_SIGMOID
Tip
To normalize data using the same base_data range (for example, in wrapped user functions), make mean and std constants (this can be done using the CONSTANT macro function).
Creates a new column named TEMP containing the values -0.55, 0, and 0.55. (The mean and standard deviation [4 and 0.816] are calculated from the data range automatically.)
TEMP = NORM_SIGMOID(COLUMN(3, 4, 5), 3.5, 1.2)
Creates a new column named TEMP containing the values -0.21, 0.21, and 0.55. (This time the mean and standard deviation [3.5 and 1.2] are provided as arguments.) TEMP = NORM_SIGMOID(V1) or
TEMP = NORM_SIGMOID(V1,ALL)
Creates a new column named TEMP containing normalized values of the contents of column V1. The mean and standard deviation used for normalization are calculated over column V1.
TEMP = NORM_SIGMOID(V1:V3)
Creates three new columns named TEMP, VX, and VY. Each contains the normalized values of the contents of columns V1, V2, and V3, respectively. The mean and standard deviation used for normalization are calculated over columns V1, V2, and V3.
TEMP = NORM_SIGMOID(V1[10:50]:V3)
Creates three new columns named TEMP, VX, and VY, each with values in rows 141. The contents of column TEMP are the normalized values of rows 1050 of column V1, the contents of column VX are the normalized values of rows 1050 of column V2, and the contents of column VY are the normalized values of rows 1050 of column V3. The mean and standard deviation for normalization purposes are calculated over rows 1050 of columns V1V3.
Unica Confidential
231
Creates three new columns named TEMP, VX, and VY. Each contains the normalized values of the contents of columns V1, V2, and V3, respectively. The mean and standard deviation used for normalization are calculated over column V4.
TEMP = NORM_SIGMOID(V1:V3, V4:V8)
Creates three new columns named TEMP, VX, and VY. Each contains the normalized values of the contents of columns V1, V2, and V3, respectively. The mean and standard deviation used for normalization are calculated over columns V4V8.
TEMP = NORM_SIGMOID(V1:V3, COL)
Creates three new columns named TEMP, VX, and VY. Each contains the normalized values of the contents of columns V1, V2, and V3, respectively. The mean and standard deviation used for normalization are calculated for each column independently (that is, a mean and standard deviation is calculated for column V1, a separate mean and standard deviation is calculated for column V2, etc.).
TEMP = NORM_SIGMOID(V1[10:50]:V3, COL)
Creates three new columns named TEMP, VX, and VY, each with values in rows 141. The contents of column TEMP are the normalized values of rows 1050 of column V1, the contents of column VX are the normalized values of rows 1050 of column V2, and the contents of column VY are the normalized values of rows 1050 of column V3. The mean and standard deviation for normalization purposes are calculated over rows 1050 of columns V1V3. The mean and standard deviation for normalization purposes are calculated independently for each column.
TEMP = NORM_SIGMOID(V1:V3, V4:V6, COL)
Creates three new columns named TEMP, VX, and VY. Each contains the normalized values of the contents of columns V1, V2, and V3, respectively. The mean and standard deviation used for normalization are calculated for each column independently using columns V4V6 (that is, a mean and standard deviation is calculated over column V4 for normalizing column V1, a separate mean and standard deviation is calculated over column V5 for normalizing column V2, etc.).
232
Unica Confidential
NORM_ZSCORE
Creates three new columns named TEMP, VX, and VY. Each contains the normalized values of the contents of columns V1, V2, and V3, respectively. The mean and standard deviation used for normalization are calculated over independently over each row across columns V1, V2, and V3.
TEMP = NORM_SIGMOID(V1[10:50]:V3, ROW)
Creates three new columns named TEMP, VX, and VY, each with values in rows 141. The contents of column TEMP are the normalized values of rows 1050 of column V1, the contents of column VX are the normalized values of rows 1050 of column V2, and the contents of column VY are the normalized values of rows 1050 of column V3. The mean and standard deviation for normalization purposes are calculated over rows 1050 of columns V1V3. The mean and standard deviation for normalization purposes are calculated over each row of columns V1V3.
TEMP = NORM_SIGMOID(V1:V3, V4:V10, ROW)
Creates three new columns named TEMP, VX, and VY. Each contains the normalized values of the contents of columns V1, V2, and V3, respectively. The mean and standard deviation used for normalization are calculated independently for each row across columns V4 V10.
Related Functions
Function
NORM_MINMAX NORM_ZSCORE
Description
Computes the min/max normalization of a data range Computes the z-score normalization of a data range
NORM_ZSCORE
Syntax
Unica Confidential
233
Parameters
data The numerical values to normalize. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data. mean, std These two parameters provide the mean and the standard deviation to use for normalization. They must be constants, except with the ROW keyword, where they can be constants or columns. base_data This parameter specifies a data range to use for computing the mean and standard deviation to use for normalizing data. keyword This optional keyword determines how the computation is performed over the input data range. Select one of the following:
ALLPerforms the computation on all cells in data (default) COLPerforms the computation separately for each column of data ROWPerforms the computation separately for each row of data
See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Description NORM_ZSCORE calculates the normalized values of the specified data range. The
If mean and std are provided, these values are used for the mean and standard deviation, respectively. If these parameters are provided with the ROW keyword, mean and std can be columns, specifying a mean and standard deviation for each row of data. If min and max are columns, the columns must be either the same length as data or scalar (that is, contain a single value which is used as a constant applied to all values in the corresponding column of data).
234
Unica Confidential
NORM_ZSCORE
If base_data is provided, the mean and standard deviation of this data range are calculated and used to normalize data. The columns in base_data must contain two or more cell values. If neither of the above mutually exclusive options are provided, the mean and standard deviation are automatically computed from data.
NORM_ZSCORE always returns a data range with the same dimensions as the input data range. It computes a mean and standard deviation for each input column and uses those values for normalizing that column. Note Examples TEMP = NORM_ZSCORE(COLUMN(3, 4, 5))
Creates a new column named TEMP containing the values -1.22, 0, and 1.22. (The mean and standard deviation [4 and 0.816] are calculated from the data range automatically.)
TEMP = NORM_ZSCORE(COLUMN(3, 4, 5), 3.5, 1.2)
Creates a new column named TEMP containing the values -0.42, 0.42, and 1.25. (This time the mean and standard deviation [3.5 and 1.2] are provided as arguments.)
TEMP = NORM_ZSCORE(V1)
Creates a new column named TEMP containing normalized values of the contents of column V1. The mean and standard deviation used for normalization are calculated over the column V1.
TEMP = NORM_ZSCORE(V1:V3)
Creates three new columns named TEMP, VX, and VY. Each contains the normalized values of the contents of columns V1, V2, and V3, respectively. The mean and standard deviation used for normalization are calculated for each column independently (that is, a mean and standard deviation is calculated for column V1, a separate mean and standard deviation is calculated for column V2, etc.).
Unica Confidential
235
TEMP = NORM_ZSCORE(V1[10:50]:V3)
Creates three new columns named TEMP, VX, and VY, each with values in rows 141. The contents of column TEMP are the normalized values of rows 1050 of column V1, the contents of column VX are the normalized values of rows 1050 of column V2, and the contents of column VY are the normalized values of rows 1050 of column V3. The mean and standard deviation for normalization purposes are calculated over rows 1050 of columns V1V3. The mean and standard deviation for normalization purposes are calculated independently for each column.
TEMP = NORM_ZSCORE(V1:V3, V4:V6)
Creates three new columns named TEMP, VX, and VY. Each contains the normalized values of the contents of columns V1, V2, and V3, respectively. The mean and standard deviation used for normalization are calculated for each column independently using columns V4V6 (that is, a mean and standard deviation is calculated over column V4 for normalizing column V1, a separate mean and standard deviation is calculated over column V5 for normalizing column V2, etc.).
TEMP = NORM_ZSCORE(V1:V3, COL)
Creates three new columns named TEMP, VX, and VY. Each contains the normalized values of the contents of columns V1, V2, and V3, respectively. The mean and standard deviation used for normalization are calculated for each column independently (that is, a mean and standard deviation is calculated for column V1, a separate mean and standard deviation is calculated for column V2, etc.).
TEMP = NORM_ZSCORE(V1[10:50]:V3, COL)
Creates three new columns named TEMP, VX, and VY, each with values in rows 141. The contents of column TEMP are the normalized values of rows 1050 of column V1, the contents of column VX are the normalized values of rows 1050 of column V2, and the contents of column VY are the normalized values of rows 1050 of column V3. The mean and standard deviation for normalization purposes are calculated over rows 1050 of columns V1V3. The mean and standard deviation for normalization purposes are calculated independently for each column.
236
Unica Confidential
NORM_ZSCORE
Creates three new columns named TEMP, VX, and VY. Each contains the normalized values of the contents of columns V1, V2, and V3, respectively. The mean and standard deviation used for normalization are calculated for each column independently using columns V4V6 (that is, a mean and standard deviation is calculated over column V4 for normalizing column V1, a separate mean and standard deviation is calculated over column V5 for normalizing column V2, etc.).
TEMP = NORM_ZSCORE(V1:V3, ROW)
Creates three new columns named TEMP, VX, and VY. Each contains the normalized values of the contents of columns V1, V2, and V3, respectively. The mean and standard deviation used for normalization are calculated over independently over each row across columns V1, V2, and V3.
TEMP = NORM_ZSCORE(V1[10:50]:V3, ROW)
Creates three new columns named TEMP, VX, and VY, each with values in rows 141. The contents of column TEMP are the normalized values of rows 1050 of column V1, the contents of column VX are the normalized values of rows 1050 of column V2, and the contents of column VY are the normalized values of rows 1050 of column V3. The mean and standard deviation for normalization purposes are calculated over rows 1050 of columns V1V3. The mean and standard deviation for normalization purposes are calculated over each row of columns V1V3.
TEMP = NORM_ZSCORE(V1:V3, V4:V10, ROW)
Creates three new columns named TEMP, VX, and VY. Each contains the normalized values of the contents of columns V1, V2, and V3, respectively. The mean and standard deviation used for normalization are calculated independently for each row across columns V4 V10.
Related Functions
Function
NORM_MINMAX
Description
Computes the min/max normalization of a data range
Unica Confidential
237
Function
NORM_SIGMOID
Description
Computes the sigmoidal normalization of a data range
NOT
Syntax
NOT(data) ! data
data The numerical values to compute the logical NOT of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
NOT returns the logical NOT of the values in the specified data range. It returns
Parameters
Description
one new column for each input column, each containing the logical NOT of the values in the corresponding input column. This function returns zero for nonzero values and one for zero values.
Tip
The NOT operator can be abbreviated with an exclamation mark (!). Use the exclamation mark before the data value (for example, to specify NOT(V1), you can simply type !V1).
Creates a new column named TEMP containing the value zero. TEMP = !0 or TEMP = !(2+2=3) Creates a new column named TEMP containing the value one.
TEMP = !V1
Creates a new column named TEMP, where each value is the logical NOT of the values in column V1.
238
Unica Confidential
NPV
TEMP = !V1:V3
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the logical NOTs of values in column V1, the values of the VX column are the logical NOTs of the values in column V2, and the values of the VY column are the logical NOTs of the values in column V3.
TEMP = !V1[10:20]
Creates a new column named TEMP, where the first 11 cells contain the logical NOTs of the values in rows 1020 of column V1. The other cells in TEMP are empty.
TEMP = !V1[1:5]:V2
Creates two new columns named TEMP and VX, each with values in rows 15 (the other cells are empty). The values in column TEMP are the logical NOTs of the values of the corresponding rows of column V1, and the values in column VX are the logical NOTs of the values of the corresponding rows of column V2.
Related Functions
Function
AND INVERSE OR SIGN
Description
Computes the logical AND between two specified data ranges Computes the negative of the contents of the specified data range Computes the logical OR between two specified data ranges Computes the sign (positive or negative) of the values in the specified data range
NPV
Syntax
Unica Confidential
239
Parameters
data The numerical values representing the expected net cash flow used to compute the net present value. This can be a row, a column, a cell range, or an expression evaluating to any of the above. rate The numerical value representing the rate of discount over the length of one period. keyword This optional keyword determines how the computation is performed over the input data range. If no keyword is provided, ROW is used as the default. Select one of the following:
COLPerforms the computation separately for each column of data ROWPerforms the computation separately for each row of data
Description
NPV calculates the net present value of an investment based on a series of periodic cash flows and a discount rate. The net present value of an investment is todays value of a series of future payments (negative values) and income (positive values). NPV is calculated by the formula:
n
NPV =
t=1
------------------------( 1 + rate )
data t
where n is the number of cash flows (data values). The order of the data values is used to interpret the order of the cash flows. The NPV investment begins one period before the date of the first cash flow value and ends with the last cash flow in the list.
Note
If your first cash flow occurs at the beginning of the first period, the first value must be added to the NPV result, not included in the data values. The number of columns returned by NPV depends on keyword.
If keyword is COL, NPV returns a new column for each input column. Each new column contains one value (the net present value of all cells in the corresponding input column).
240
Unica Confidential
NUMBER
If keyword is ROW, NPV returns one new column containing the net present value across each row of data.
Note Examples
Creates a new column named TEMP containing a single value which is the NPV of the values of columns V1, V2, and V3. The discount rate used is 10%.
TEMP = NPV(V1, .10, COL)
Creates a new column named TEMP containing a single value which is the NPV of the contents of column V1 using a discount rate of 10%.
TEMP = NPV(V1:V3, .10) - 1000
Creates a new column named TEMP containing a single value which is the NPV of the contents of columns V1, V2, and V3 with an initial payment of 1000. The discount rate is 10%.
TEMP = NPV(V1[10:20], .10L, COL)
Creates a new column named TEMP containing a single value which is the NPV of the cells in rows 1020 of column V1. The discount rate is 10%.
TEMP = NPV(V1[1:5]:V4, .10)
Creates a new column named TEMP containing a single value which is the NPV of the cells in rows 15 of columns V1 through V4.
NUMBER
Syntax
NUMBER(data [, conversion_keyword])
data The ASCII text data to convert to numerical values. This can be ASCII text in
Parameters
Unica Confidential
241
quotes, a column of text, a cell range containing text, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
conversion_keyword This optional keyword specifies how to interpret text formats for dates and times. Select one of the keywords in the following table.
Note
Format
##### $ (default) % mm/dd/yy hh:mm dd-mmm-yy
Description
Converts the first 5 characters of each text string into a unique number Converts dollar values to numerics (for example, $123.45 to 123.45) Converts a percentage value to numerics (for example, 50% to 0.5) Converts a date and time to the number of days elapsed since January 1, 0000 (1900 is automatically added to the yy year) Converts a date to the number of days elapsed since January 1, 0000 (1900 is automatically added to the yy year) Converts a date to the number of days elapsed since January 1, 0000 (1900 is automatically added to the yy year) Converts a date to the number of days elapsed between the first of the specified month and January 1, 0000 (1900 is automatically added to the yy year) Converts a date to the number of days since the beginning of the year (for example, 01-FEB to 32) Converts a 3-letter month abbreviation to a value between 112 (for example, DEC to 12)
mm/dd/yy
mmm-yy
7 8
dd-mmm
mmm
242
Unica Confidential
NUMBER
Conversion Keyword
9
Format
{January | February | March } {Sun | Mon | Tue }
Description
Converts a fully spelled-out month name to a value between 112 (for example, March to 3) Converts a 3-day weekday abbreviation to a value between 06, where Sunday marks the beginning of the week (for example, Sun to 0)
10
11
{Sunday | Converts a fully spelled-out weekday name to a value Monday | between 06, where Sunday marks the beginning of Tuesday } the week (for example, Monday to 1) hh:mm:ss {AM | PM} hh:mm:ss Converts the time to the number of seconds elapsed since 00:00:00 AM (midnight) (for example, 01:00:00 AM to 3600) Converts the time to the number of seconds elapsed since 00:00:00 AM (midnight) (for example, 01:00:00 to 3600) Converts the time to the number of minutes elapsed since 00:00:00 AM (midnight) (for example, 01:00 AM to 60) Converts the time to the number of minutes elapsed since 00:00:00 AM (midnight) (for example, 01:00 to 60) Converts the time to the number of seconds elapsed since 00:00:00 AM (midnight) (for example, 30:00 to 1800) Converts a date to the number of days since the beginning of the year (for example, 3101 to 31) Converts a date to the number of days since the beginning of the year (for example, 31JAN to 31) Converts a date to the number of days elapsed since January 1, 0000 (1900 is automatically added to the year if yy is less than or equal to 20; otherwise 2000 is added)
12
13
14
15
16
mm:ss
17 18 19
Unica Confidential
243
Conversion Keyword
20 21
Format
ddmmmyyyy ddmmyy
Description
Converts a date to the number of days elapsed since January 1, 0000 (for example, 31JAN0000 to 31) Converts a date to the number of days elapsed since January 1, 0000 (1900 is automatically added to the year if yy is less than or equal to 20; otherwise 2000 is added) Converts a date to the number of days elapsed since January 1, 0000 (for example, 31010000 to 31) Converts a date to the number of days since the beginning of the year (for example, 0131 to 31) Converts a date to the number of days elapsed since January 1, 0000 (1900 is automatically added to the year if yy is less than or equal to 20; otherwise 2000 is added) Converts a date to the number of days elapsed since January 1, 0000 (for example, 01010001 to 366) Converts a 3-letter month abbreviation to a value between 112 (for example, MAR to 3) [Note this is the same as conversion keyword 8] Converts a date to the number of days since the beginning of the year (for example, JAN31 to 31) Converts a date to the number of days elapsed since January 1, 0000 (1900 is automatically added to the year if yy is less than or equal to 20; otherwise 2000 is added) Converts a date to the number of days elapsed since January 1, 0000 (for example, FEB010001 to 32) Converts a date to the number of days elapsed between the first of the specified month and January 1, 0000 (1900 is automatically added to the year if yy is less than or equal to 20; otherwise 2000 is added)
22 23 24
25 26
mmddyyyy mmm
27 28
mmmdd mmmddyy
29 30
mmmddyyyy mmmyy
244
Unica Confidential
NUMBER
Conversion Keyword
31
Format
mmmyyyy
Description
Converts a date to the number of days elapsed between the first of the specified month and January 1, 0000 (for example, FEB0001 to 32) Converts a date to the number of days elapsed between the first of the specified month and January 1, 0000 (1900 is automatically added to the year if yy is less than or equal to 20; otherwise 2000 is added) Converts a date to the number of days elapsed between the first of the specified month and January 1, 0000 (for example, 020001 to 32) Converts a date to the number of days elapsed between the first of the specified month and January 1, 0000 (1900 is automatically added to the year if yy is less than or equal to 20; otherwise 2000 is added) Converts a date to the number of days elapsed since January 1, 0000 (1900 is automatically added to the year if yy is less than or equal to 20; otherwise 2000 is added) Converts a date to the number of days elapsed between the first of the specified month and January 1, 0000 (1900 is automatically added to the year if yy is less than or equal to 20; otherwise 2000 is added) Converts a date to the number of days elapsed since January 1, 0000 (1900 is automatically added to the year if yy is less than or equal to 20; otherwise 2000 is added) Converts the year the number of years elapsed since the year 0000 (for example, 1998 to 1998) Converts a date to the number of days elapsed between the first of the specified month and January 1, 0000 (for example, 000102 to 32) Converts a date to the number of days elapsed since January 1, 0000 (for example, 00010201 to 32)
32
mmyy
33
mmyyyy
34
yymm
35
yymmdd
36
yymmm
37
yymmmdd
38 39
yyyy yyyymm
40
yyyymmdd
Unica Confidential
245
Conversion Keyword
41
Format
yyyymmm
Description
Converts a date to the number of days elapsed between the first of the specified month and January 1, 0000 (for example, 000102 to 32) Converts a date to the number of days elapsed since January 1, 0000 (for example, 0001FEB01 to 32) Converts any delimited date with day followed by month to the number of days elapsed since the beginning of the year (for example, 15-JAN to 15) Converts any delimited date with day appearing before month followed by year to the number of days elapsed since January 1, 0000 (for example, 1/1/0001 to 366) Converts any delimited date with month followed by day to the number of days since the beginning of the year (for example, JAN 31 to 31) Converts any delimited date with month followed by day followed by year to the number of days elapsed since January 1, 0000 (for example, JAN 1, 0001 to 366) Converts any delimited date with month followed by year to the number of days elapsed between the first of the specified month and January 1, 0000 Converts any delimited date with year followed by month to the number of days elapsed between the first of the specified month and January 1, 0000 Converts any delimited date with month followed by day followed by year to the number of days elapsed since January 1, 0000 (for example, 0001/01/01 to 366) Converts the year to the number of years elapsed since the year 0000 (for example, 97 to 97) Converts the month to a value between 112 (for example, SEP to 9)
42 43
yyyymmmdd
<day>* <month> <day>* <month>* <year> <month>* <day> <month>* <day>* <year> <month>* <year> <year>* <month> <year>* <month>* <day>
44
45
46
47
48
49
50 51
yy mm
246
Unica Confidential
NUMBER
Conversion Keyword
52 53
Format
dd
{January | February | March }
Description
Converts the day to a value between 131 (for example, 28 to 28) Converts a fully spelled-out month name to a value between 112 (for example, March to 3) [Note this is the same as conversion keyword 9]
54
{Sunday | Converts a fully spelled-out weekday name to a value Monday | between 17, where Sunday marks the beginning of Tuesday } the week (for example, Sunday to 1) {Sun | Mon | Tue } Converts a 3-day weekday abbreviation to a value between 17, where Sunday marks the beginning of the week (for example, Sun to 1)
55
Description
NUMBER converts text values in the specified data range into numerical values
using the specified format for converting dates and times. If a text string cannot be parsed using the specified conversion_keyword, NUMBER will generate an error. Format 0 converts the first five characters of each text string into different number for each unique text string. This is an easy way to change a column of text into unique classes for outputs to a classifier. The delimited formats (conversion keywords 4349) support any of the following as delimiters:
Months can be represented as mm or mmm; days can be represented as d or dd; years can be represented as yy or yyyy.
Note
In support of year 2000 compliance, all years in dates may be designated as yyyy instead of yy.
Unica Confidential
247
For backwards compatibility, conversion keywords 116, yy (2-digit years) automatically have 1900 added. For conversion keywords 1755, yy < threshold automatically have 2000 added; yy threshold automatically have 1900 added.
Note
The year 2000 threshold value is set in the Data Cleaning tab of the Advanced Settings window (invoke using Options > Settings > Advanced Settings). If you change the value year 2000 threshold value, you must update all macro functions using the NUMBER macro function to manipulate date values with 2digit years. To force an update of a macro function, you can make any edit (for example, adding a space and deleting it) and clicking the check mark icon to accept the change.
Note
Important When using format 0, only the first five characters of each text string are used to
generate a unique number. All strings with the same first five characters will be translated to the same numeric value. The same text string will produce the same numerical value every time, even across different spreadsheets. If required, use string macros to manipulate strings so that the first five characters uniquely define a class. Note that the resulting numerical values may be very small. Use the Display Formats window to either increase the number of decimal places displayed, or change the format to exponential mode (00E+00).
Examples TEMP = NUMBER($1.23) or TEMP = NUMBER(123%, 2)
248
Unica Confidential
NUMBER
Creates a new column named TEMP containing the numbers 1, 3, and 12.
TEMP = NUMBER(1:52 PM, 14)
Creates a new column named TEMP containing the numeric values of the text strings in column V1. Any dollar values are correctly converted into numerical values. ???s returned for text strings that cannot be parsed using the $ format.
TEMP = NUMBER(V1:V3, 4)
Creates three new columns named TEMP, VX, and VY. The column TEMP contains the numerical values of text strings in column V1. The column VX contains the numerical values of text strings in column V2. The column VY contains the numerical values of text strings in column V3. Any dates in the format dd-mmm-yy are converted into the number of days offset from January 1, 0000. ???s are returned for text strings that cannot be parsed using the $ format.
TEMP = NUMBER(V1[10:20]:V2, 10)
Creates two new columns named TEMP and VX. The column TEMP contains the numerical values of text strings in rows 1020 of column V1. The column VX contains the numerical values of text strings in rows 1020 column V2. All standard three character representations of days of the week are converted into the numbers 0 6 (0 = Sunday, 6= Saturday). If there is no match for a weekday name, ??? is returned.
TEMP = NUMBER(V1, 0)
Assuming that column V1 contains all 5-digit text strings, creates one new column named TEMP containing a different numerical value for each unique string.
Unica Confidential
249
Related Functions
Function
WEEKDAY
Description
Converts ASCII text date strings to the day of the week
OFFSET
Syntax
OFFSET(data)
data The values to compute the offset of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
OFFSET returns the values of the specified data range offset from the first value.
Parameters
Description
It returns one new column containing the offset values, beginning with one and continuing to the length of the longest column in the data range.
Examples TEMP = OFFSET(5)
Creates a new column named TEMP, where each value is the offset of the column V1, starting with one and ending with the length of the column V1.
TEMP = OFFSET(V1:V3)
Creates a new column named TEMP, where each value is the offset, starting with one and ending with the longest column of V1, V2, or V3.
250
Unica Confidential
OR
Related Functions
Function
COUNT DELAY
Description
Counts the number of cells containing values in the specified data range Returns the input column(s) values delayed by a specified number of time steps
OR
Syntax
Parameters
Description
OR calculates the logical OR between the two specified data ranges. It returns a
new column for each input column, each containing the corresponding column in data1 logically OR-ed to the corresponding column of data2 (that is, the first column of data1 is logically OR-ed to the first column of data, the second column with the second column, and so on). If data2 is a constant, each value in data1 is logically OR-ed by that value. If data2 contains one or more columns, the calculations are performed on a rowby-row basis between one column from data2 and one column from data2.
Unica Confidential
251
The first row of data1 is logically OR-ed to the first row value of data2, the second row with the second row, and so on. This row-by-row calculation produces a result for each row up to the last value of the shortest column.
Note
Using a column containing the same number x in each row as data2 is the same as using the constant x as data2.
Tip
The OR operator can be abbreviated with a double-vertical bar (||). Use the double-vertical bar to separate the two arguments (for example, to specify V1 OR 3, you can simply type V1||3).
Creates a new column named TEMP containing the value one (any non-zero number is treated as a one).
TEMP = V1 || 1
Creates a new column named TEMP containing all ones (every value OR-ed with the number one produces one).
TEMP = V1 || V2
Creates a new column named TEMP, where each value is the row value of column V1 logically OR-ed with the corresponding row value of column V2.
TEMP = V1:V3 || V4:V6
Creates three new columns named TEMP, VX, and VY. The column TEMP contains the values in V1 logically OR-ed with the corresponding row values of column V4. The column VX contains the logically OR-ed values from columns V2 and V5. The column VY contains the logically OR-ed values from columns V3 and V6.
TEMP = V1[10:20] || V2
Creates a new column named TEMP, where the first 11 cells contain the logical OR-ed result of the values in rows 1020 of columns V1 and V2. The other cells in TEMP are empty.
252
Unica Confidential
PCA
Related Functions
Function
AND NOT
Description
Computes the logical AND between two specified data ranges Computes the logical NOT of the contents of the specified data range
PCA
Syntax
PCA(data)
data The numerical values for which to compute the principal components. This can be a constant, a column, a cell range, or an expression evaluating to any of the above. See The Macro Language on page 10 for the format definition of data.
PCA performs principal component analysis on the specified data range. It finds the orthogonal eigenvectors to the data range specified by data using singular value decomposition. It returns one new column for each of the n columns specified as input, plus one additional column. The first n columns contain the eigenvectors (each eigenvector is read as a row across the n columns). The last returned column contains the corresponding magnitudes of eigenvalues. The eigenvectors are ordered according to their corresponding eigenvalues.
Parameters
Description
Note
Missing values (for example, empty cells and ???s) are counted as zeros. Any short columns in data are padded with zeros to the length of the longest column. Here are the details for how the PCA is computed:
1
Each of the k rows of data is an n-dimensional vector vi (n is the number of columns in data). These are used to compute the correlation matrix A as follows:
Unica Confidential
253
A =
i=1
v v
i i
The n-by-n correlation matrix A is decomposed using singular value decomposition into three matrices:
A = UU
T
The rows of U are the eigenvectors of A and is a diagonal matrix where each diagonal element is the magnitude of the eigenvalues for A. The PCA macro function returns U in the first n columns and the diagonal elements of in the last column.
Examples TEMP = PCA(5)
Creates two new columns named TEMP and VX, containing the values -1 and 0, respectively.
TEMP = PCA(V1)
Creates two new columns named TEMP and VX. The column TEMP contains the value one, and the column VX contains the corresponding eigenvalue.
TEMP = PCA(V1:V3)
Creates four new columns named TEMP, VX, VY, and VZ. The values in the three columns contain one eigenvector per row for the data in columns V1V3. The value in column VZ contains the corresponding eigenvalues.
Related Functions
Function
PCA_FEATURES
Description
Extracts n features from the specified data range
254
Unica Confidential
PCA_FEATURES
PCA_FEATURES
Syntax
Parameters
The number of features to extract from the specified data range using principal component analysis (PCA). This value must be a positive integer between one and the number of columns in the data range specified by data.
data The numerical values to extract features from. This can be a column, a cell range, or an expression evaluating to either of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
PCA(base_data)
If this optional parameter is provided, PCA is performed on this base_data data range and the resulting eigenvectors are used to extract features from the data data range. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of base_data (same as data). The number of columns in base_data must be the same as the number of columns in data.
Description PCA_FEATURES extracts the top num_features features from the specified data range. It returns num_features columns using the eigenvectors generated by principal component analysis on the data range base_data, if provided. If not
provided, it uses data to generate the eigenvectors. In this case, data is automatically normalized using the zero-mean unit-variant method prior to the principal component analysis. The features are computed as follows:
1
The data range data is automatically normalized using the zero-mean unitvariant method. In other words,
PCA_FEATURES(num_features, data)
is equivalent to
PCA_FEATURES(num_features, data,PCA(data, COL))
Unica Confidential
255
No normalization of data is provided automatically. To normalize data using NORM_ZSCORE, you can specify the following:
PCA_FEATURES(num_features, data, PCA(NORM_ZSCORE(data, COL))) 2
Principal component analysis is performed on the normalized data range to generate its eigenvectors (see details described for the PCA macro function). This occurs automatically for data if base_data is not provided. It is performed by the explicit call to the PCA macro function if base_data is provided. Each row ( vi ) of the data range (data) is transformed into a new coordinate system ( u i )based on the top num_features (m) ranked eigenvectors which compose E m :
E 11 E 1n ui = Em vi = v1
E m1 E mn v n
The k rows of the transformed data ( u 1 to u k ) are returned (n columns). If the base_data data range is provided, it must have the same number of columns as the data data range, otherwise an error is returned.
Tip
Because calculating PCA on a data range can be compute intensive, using the BUFFER macro function on the PCA calculation is much more efficient. For example:
PCA_FEATURES(num_features, range, BUFFER(PCA(base_data)))
Creates five new columns named TEMP, VW, VX, VY, and VZ, containing the top five features of the data range V1:V7. The data range V1:V7 is used as the basis for the transformation.
256
Unica Confidential
POSITION
Creates three new columns named TEMP, VX, and VY, containing the top three features of the data range V1:V4. The data range V10:V13 is used as the basis for the transformation.
TEMP = PCA_FEATURES(3, V1:V4, BUFFER(PCA(V10:V13)))
Creates three new columns named TEMP, VX, and VY, containing the top three features of the data range V1:V4. The data range V10:V13 is used as the basis for the transformation. Once the principal components of the data range V10:V13 are calculated, those values are stored as constants. If the data values in columns V10V13 change, they will not effect this function definition.
Related Functions
Function
PCA
Description
Computes the eigenvectors for principal components of the specified data range
POSITION
Syntax POSITION(colName, pattern [, start [, occurrence]])
Parameters
colName
Specify a value for n, where you are searching for the nth occurrence of the pattern to return.
Unica Confidential
257
Description
POSITION returns the starting byte position of a pattern, or string, within the value of a column (colName) which must be string type. If start is specified, it begins to search from there. Occurrence is the nth occurrence of pattern to return. The search is not case sensitive. In the example below, we are searching for the pattern or string, A, within the value of the column, dbo_BaseInfo.BranchCd, and assigning the returned value to a derived filed POStest.
Note Examples
The following example shows a few rows from the table with the values from dbo_BaseInfo.BranchCd and POStest shown side-by-side.
258
Unica Confidential
PLUS
This returns rows where the values of CellCode have AAA at the end following the second occurrence of X.
PLUS
Syntax
Parameters
Description
PLUS adds the values in the two specified data ranges. It returns a new column
for each input column, each containing the corresponding column in data1 summed with the corresponding column of data2 (that is, the first column of data1 is added to the first column of data, the second column with the second column, and so on). If data2 is a constant, each value in data1 increased by that value. If data2 contains one or more columns, the calculations are performed on a row-by-row basis between one column from data2 and one column from data2. The first row of data1 is added to the first row value of data2, the second row with the second row, and so on. This row-by-row calculation produces a result for each row up to the last value of the shortest column.
Tip
Unica Confidential
259
Creates a new column named TEMP, where each value is the contents of column V1 plus eight.
TEMP = V1 + V1
Creates a new column named TEMP containing two times the contents of column V1.
TEMP = V1 + V2
Creates a new column named TEMP, where each value is the row value of column V1 plus the corresponding row value of column V2.
TEMP = V1:V3 + V4:V6
Creates three new columns named TEMP, VX, and VY. The column TEMP contains the values in V1 plus the corresponding row values of column V4. The column VX sums columns V2 and V5. The column VY sums column V5 and V6. TEMP = V1[10:20] + V2 or
TEMP = V1[10:20] + V2[1:11]
Creates a new column named TEMP, where the first 11 cells contain the sums of the values in rows 1020 of column v1 and the values in rows 111 of column V2. The other cells in TEMP are empty.
Related Functions
Function
MINUS SUM or TOTAL
Description
Subtracts one specified data range from another Computes the sum of a range of cells
260
Unica Confidential
POW
POW
Syntax
Parameters
Description
POW raises the values in the first data range to the power specified in the second
data range (that is, calculates base exp onent ). It returns one new column for each input column, each containing the result of raising the base to the exponent power (that is, the first column of data1 is raised to the first column of data, the second column with the second column, and so on). If exponent is a constant, each value in base is raised by that value. If exponent contains one or more columns, the calculations are performed on a rowby-row basis between one column from base and one column from exponent. The first row of base is raised to the first row value of exponent, the second row with the second row, and so on. This row-by-row calculation produces a result for each row up to the last value of the shortest column.
Tip
The POW operator can be abbreviated with a circumflex (^). For example, TEMP = 2^8 is equivalent to TEMP = 2 POW 8.
Unica Confidential
261
Note
If the value x is too large or too small, an overflow is returned. This occurs if base^exponent exceeds the maximum or minimum 32-bit floating-point value.
Creates a new column named TEMP, where each value is the square root of the contents of column V1 (this is equivalent to SQRT(V1)).
TEMP = V1 ^ V3
Creates a new column named TEMP, where each value is the row value of column V1 raised to the corresponding row value of column V2.
TEMP = V1:V3 ^ V4:V6
Creates three new columns named TEMP, VX, and VY. The column TEMP contains the values in V1 raised to the corresponding row values of column V4. The column VX contains the result of column V2 raised to the corresponding values in column V5. The column VY contains the the result of column V3 raised to the corresponding values of V6. TEMP = V1[10:20] POW V2 or
TEMP = V1[10:20] POW V2[1:11]
Creates a new column named TEMP, where the first 11 cells contain the result of raising the values in rows 1020 of column V1 by the values in rows 110 of column V2. The other cells in TEMP are empty.
Related Functions
Function
EXP
Description
Computes the natural number (e) raised to the contents of each cell in the specified data range
262
Unica Confidential
RANDOM
Function
LN or LOG LN2 LN10
Description
Computes the natural log of the contents of the specified data range Computes the log base-2 of the contents of the specified data range Computes the log base-10 of the contents of the specified data range
RANDOM
Syntax
Parameters
Description
RANDOM generates a column of random numbers. It returns one new column con-
taining num random numbers. If value1 and value2 are specified, the random numbers will be generated between (and including) those bounds. If they are not specified, the default is to generate values between zero and one. If seed is provided, it will be used as a seed to the random number generator.
Unica Confidential
263
Note
If seed is greater than or equal to 2 32 , the value is replaced with 232 - 1. Values of seed above 2 24 will be rounded (that is, precision is lost). Therefore, multiple values may result in the same value of seed.
Creates one new column named TEMP containing random numbers of unlimited length.
TEMP = RANDOM(100)
Creates one new column named TEMP containing 100 random numbers between 0.0 and 1.0.
TEMP = RANDOM(100, 5943049)
Creates one new column named TEMP containing 100 random generated from the seed number 5943049.
TEMP = RANDOM(100, 0, 100)
Creates one new column named TEMP containing 100 random numbers between 0 and 100.0.
TEMP = RANDOM(100, 0, 100, 5943049)
Creates one new column named TEMP containing 100 random numbers between -0 and 100 generated from the seed number 5943049.
Related Functions
Function
RANDOM_GAUSS SAMPLE_RANDOM
Description
Returns the specified number of random values from a Gaussian distribution Returns column(s) of n cells, each containing a random sample from the specified data range
264
Unica Confidential
RANDOM_GAUSS
RANDOM_GAUSS
Syntax
Parameters
Description
tribution. It returns one new column containing num random numbers. If mean and std are specified, the random numbers will be generated using a Gaussian distribution with the specified mean and standard deviation. If they are not specified, the default Gaussian has a mean of zero and standard deviation of one. If seed is provided, it will be used as a seed to the random number generator.
Examples TEMP = RANDOM_GAUSS(100)
Creates one new column named TEMP containing 100 values randomly sampled from a zero-mean, unit-standard deviation Gaussian.
Unica Confidential
265
TEMP = RANDOM_GAUSS(500, 3)
Creates one new column named TEMP containing 100 values randomly sampled from a zero-mean, unit-standard deviation Gaussian. The number 3 is used as a seed for the random number generator.
TEMP = RANDOM_GAUSS(5000, 100, 32)
Creates one new column named TEMP containing 5000 values randomly sampled from a Gaussian with a mean of 100 and standard deviation of 32.
TEMP = RANDOM_GAUSS(500, -1, 2, 3)
Creates one new column named TEMP containing 500 values randomly sampled from a Gaussian with a mean of -1 and a standard deviation of 2. The number 3 is used as a seed for the random number generator.
Related Functions
Function
RANDOM SAMPLE_RANDOM
Description
Returns the specified number of random numbers Returns column(s) of n cells, each containing a random sample from the specified data range
RANK
Syntax
RANK(data [, nbins])
data This can be a constant value, a column, a cell range, or an expression evaluating to any of the above.
Parameters
nbins The number of bins which the data will be decided into. The default value is ten.
266
Unica Confidential
RANK
Description
RANK divides data into nbins (default 10) groups, each with approximately an
equal number of distinct values, and returns the group into which each row of data falls. The output will be between 1 and nbins; if the number of distinct values of data is less than nbins, the output will be between 1 and the number of distinct values of data.
RANK silently imposes an upper bound of 1024*1024 on the value of nbins.
That same number is also used as a maximum number of distinct values to track; subsequent distinct values will be included in the highest bin.
Examples TEMP=RANK(V6) Creates a new column named TEMP with each value, a one through ten, representing the bin of data that the row falls into. In this case, the default number of bins, 10, is applied. TEMP=RANK(V6,15) Creates a new column named TEMP with each value, a one through fifteen, representing the bin of data that the row falls into. TEMP = REPEAT(3, V1:V3)
Creates three new columns named TEMP, VX, and VY. TEMP contains three copies of column V1, VX contains three copies of column V2, and VY contains three copies of column V3. Any uneven length columns are padded to the length of the longest column of V1V3.
TEMP = REPEAT(10, V1[10:50]:V2)
Creates two new columns named TEMP and VX. The values in column TEMP are 10 copies of rows 1050 of column V1, and the values in column VX are 10 copies of rows 1050 of column V2.
TEMP = REPEAT((1,2,3), (10, 20, 30))
Creates one new column named TEMP, containing the cell values 10, 20, 20, 30, 30, 30.
TEMP = REPEAT(V1, V2)
Creates one new column named TEMP. The value in cell V2[1] is repeated V1[1] times, the value in cell V2[2] is repeated V1[2] times, and so on until the end of column V1.
Unica Confidential
267
Creates two new columns named TEMP and VX. The TEMP column contains copies of cells in V2; the VX column contains copies of cells in V3. There are V1[1] copies of V2[1] and V3[1], V1[2] copies of V2[2] and V3[2]. This continues until the end of column V1 or the end of the longest column in data, which ever is shorter. Shorter columns in data are padded with zeros.
TEMP = REPEAT(3, V1, COL)
Creates three new columns named TEMP, VX, and VY, each a copy of column V1.
TEMP = REPEAT(2, V1:V2, COL)
Creates four new columns named TEMP, VX, VY, and VZ. Column TEMP is a copy of column V1; column VX is a copy of column V2, column VY is a copy of column V1; and column VZ is a copy of column V2.
REPEAT
Syntax
Parameters
268
Unica Confidential
REPEAT
See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Description REPEAT repeats the specified data range a number of times, either vertically (COL) or horizontally (ROW).
With the COL keyword, it returns one new column for each input column containing num_times copies of data, vertically concatenated. If the input columns of data have different lengths, the shorter columns are automatically padded. Numeric columns are padded with zero and text string columns are padded with empty strings (). With the ROW keyword, the number of columns returned depends on whether num_times is a constant or a column. If num_times is a constant, it returns num_times times the number of columns in data. If num_times is a column, it returns the specified number of copies of each column of data, where the first row value of num_times is the number of times to repeat the first column of data; the second row value is the number of times to repeat the second of column of data, etc. Any rows greater than the number of columns in data ignored.
Examples TEMP = REPEAT(10, 1) or TEMP = REPEAT(10, 1, ROW)
Creates a new column named TEMP containing two copies of the column V1 concatenated vertically.
TEMP = REPEAT(3, V1:V3)
Creates three new columns named TEMP, VX, and VY. TEMP contains three copies of column V1, VX contains three copies of column V2, and VY contains three copies of column V3. Any uneven length columns are padded to the length of the longest column of V1V3.
Unica Confidential
269
Creates two new columns named TEMP and VX. The values in column TEMP are 10 copies of rows 1050 of column V1, and the values in column VX are 10 copies of rows 1050 of column V2.
TEMP = REPEAT((1,2,3), (10, 20, 30))
Creates one new column named TEMP, containing the cell values 10, 20, 20, 30, 30, 30.
TEMP = REPEAT(V1, V2)
Creates one new column named TEMP. The value in cell V2[1] is repeated V1[1] times, the value in cell V2[2] is repeated V1[2] times, and so on until the end of column V1.
TEMP = REPEAT(V1, V2:V3)
Creates two new columns named TEMP and VX. The TEMP column contains copies of cells in V2; the VX column contains copies of cells in V3. There are V1[1] copies of V2[1] and V3[1], V1[2] copies of V2[2] and V3[2]. This continues until the end of column V1 or the end of the longest column in data, which ever is shorter. Shorter columns in data are padded with zeros.
TEMP = REPEAT(3, V1, COL)
Creates three new columns named TEMP, VX, and VY, each a copy of column V1.
TEMP = REPEAT(2, V1:V2, COL)
Creates four new columns named TEMP, VX, VY, and VZ. Column TEMP is a copy of column V1; column VX is a copy of column V2, column VY is a copy of column V1; and column VZ is a copy of column V2.
ROTATE_LEFT
Syntax
ROTATE_LEFT(num_cols, data)
270
Unica Confidential
ROTATE_LEFT
Parameters
num_cols The number of columns to rotate to the left. This value must be a non-negative integer. The value of zero copies the rows without any rotation. data The numerical values to rotate to the left. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
Description
returns one new column for each input column, each containing a copy of the corresponding input column rotated to the left by num_cols positions. Columns that are rotated off the left are wrapped around on the right.
Note ROTATE_LEFT only works with numerical data. None of the data provided in the
Creates three new columns named TEMP, VX, and VY. TEMP contains the value two, VX contains the value three, and VY contains the value one.
TEMP = ROTATE_LEFT(0, V1:V3)
Creates three new columns named TEMP, VX, and VY. TEMP is a copy of column V1, VX is a copy of column V2, and VY is a copy of column V3.
TEMP = ROTATE_LEFT(4, V1:V3)
Creates three new columns named TEMP, VX, and VY. TEMP is a copy of column V2, VX is a copy of column V3, and VY is a copy of column V1.
TEMP = ROTATE_LEFT(1, V1[10:50]:V2)
Creates two new columns named TEMP and VX, each with values in the first 41 rows (the other cells are empty). The values in column TEMP are the values in rows 1050 of column V2, and the values in column VX are the values in rows 1050 of column V1.
Unica Confidential
271
Related Functions
Function
ROTATE_RIGHT
Description
Rotates the columns in the specified data range to the right
ROTATE_RIGHT
Syntax
ROTATE_RIGHT(num_cols, data)
num_cols The number of columns to rotate to the right. This value must be a non-negative integer. The value of zero copies the rows without any rotation. data The numerical values to rotate to the right. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
Parameters
Description
returns one new column for each input column, each containing a copy of the corresponding input column rotated to the right by num_cols positions. Columns that are rotated off the right are wrapped around on the left.
Note ROTATE_RIGHT only works with numerical data. None of the data provided in
Creates three new columns named TEMP, VX, and VY. TEMP contains the value three, VX contains the value one, and VY contains the value two.
272
Unica Confidential
ROUND
Creates three new columns named TEMP, VX, and VY. TEMP is a copy of column V1, VX is a copy of column V2, and VY is a copy of column V3.
TEMP = ROTATE_RIGHT(4, V1:V3)
Creates three new columns named TEMP, VX, and VY. TEMP is a copy of column V3, VX is a copy of column V1, and VY is a copy of column V2.
TEMP = ROTATE_RIGHT(1, V1[10:50]:V2)
Creates two new columns named TEMP and VX, each with values in the first 41 rows (the other cells are empty). The values in column TEMP are the values in rows 1050 of column V2, and the values in column VX are the values in rows 1050 of column V1.
Related Functions
Function
ROTATE_LEFT
Description
Rotates the columns in the specified data range to the left
ROUND
Syntax
ROUND(data)
data The numerical values to round. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
ROUND rounds the values in the specified data range to the nearest integer. It
Parameters
Description
returns one new column for each input column, each containing the rounded value of numbers in the corresponding input column. Numbers exactly halfway in-between are rounded up (for example, 2.5 is rounded to 3.0 and -2.5 is rounded to -2.0).
Unica Confidential
273
Creates a new column named TEMP, where each value is the rounded value of the contents of column V1.
TEMP = ROUND(V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the rounded values of the contents of column V1, the values of the VX column are the rounded values of the contents of column V2, and the values of the VY column are the rounded values of the contents of column V3.
TEMP = ROUND(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain the rounded values in rows 1020 of column V1. The other cells in TEMP are empty.
TEMP = ROUND(V1[1:5]:V2)
Creates two new columns named TEMP and VX, each with values in rows 15 (the other cells are empty). The values in column TEMP are the rounded values of the corresponding rows of column V1, and the values in column VX are the rounded values of the corresponding rows of column V2.
Related Functions
Function
INT MOD TRUNCATE
Description
Computes the integer value (rounded down) of the contents of the specified data range Computes the modulo of the contents of the specified data range Returns the non-fractional part of each value in the specified data range
274
Unica Confidential
ROWNUM
ROWNUM
Syntax
ROWNUM()
ROWNUM generates sequential numbers from one to the number of records. The
Description
number for the first record is one, two for the second record, and so on
Note
The maximum number of records that ROWNUM can handle is two billion.
RTRIM
Syntax RTRIM(data)
Parameters
data
Description
RTRIM removes trailing space characters from each string value in the specified
data range, returning the converted string. It returns one new column for each input column.
Examples Temp = RTRIM gold Creates a new string named Temp which contains gold.
Related Functions
Function
Description
Unica Confidential
275
SAMPLE_RANDOM
Syntax
Parameters
Description
SAMPLE_RANDOM randomly samples the specified data range. It returns one new
column for each input column, each containing num_samples numbers randomly sampled from the corresponding input column of data. Samples are taken in the order they appear in each column (that is, data values will remain in the same relative order to each other). If seed is provided, it will be used as a seed to the random number generator.
Examples TEMP = SAMPLE_RANDOM(100, 3)
Creates a new column named TEMP with 100 cells all containing the value 3.
TEMP = SAMPLE_RANDOM(100, V1)
Creates a new column named TEMP containing 100 values, where each value is a random sample of the contents of column V1.
276
Unica Confidential
SELECT
Creates three new columns named TEMP, VX, and VY, each containing 50 values. The values in the TEMP column are random samples from column V1, the values of the VX column are random samples from column V2, and the values of the VY column are random samples from column V3.
TEMP = SAMPLE_RANDOM(100, V1[10:50]:V3)
Creates three new columns named TEMP, VX, and VY, each containing 41 values. The values in the TEMP column are random samples from cells 1050 of column V1, the values of the VX column are random samples from cells 1050 of column V2, and the values of the VY column are random samples from cells 1050 of column V3. The other cells in TEMP are empty.
Related Functions
Function
RANDOM RANDOM_GAUSS SUBSAMPLE
Description
Returns the specified number of random numbers Returns the specified number of random values from a Gaussian distribution Reduces data by returning every n-th row value
SELECT
Syntax
Parameters
Unica Confidential
277
Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of col_nums (same as data).
from_col The numerical position of the column to extract from the specified data range. A value of one extracts the first column of a specified data range. to_col If this parameter is provided, from_col is used as a starting point and must be a column or a cell range. The ending point is specified by to_col. This value must be larger than from_col. data The cell range containing the column(s) to extract. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
Description SELECT returns the specified columns from a data range. The columns to select
can be specified in different ways. The col_nums parameter contains column numbers to extract from the specified data range. to extract a single column, use from_col. To extract a consecutive range of columns, specify from_col as a starting point (it must be a column or a cell range) and to_col as an ending column. If data is scalar (that is, a constant or a variable containing a single value), selecting the first column returns a new column containing that constant. Selecting any other column from a constant returns a column containing ???. This macro is often embedded into more complex functions.
Tip
To extract multiple non-adjacent columns, use the COLUMN macro function to create a column containing the column numbers to select. See the examples below.
278
Unica Confidential
SIGN
Creates three new columns named TEMP, VX, and VY. TEMP is a copy of column V2, VX is a copy of column V3, and VY is a copy of column V4.
TEMP = SELECT(COLUMN(1,4), V6:V10)
Creates two new columns named TEMP and VX. TEMP is a copy of column V6, and VX is a copy of column V9.
TEMP = SELECT(COLUMN(1,4), V6[25:74]:V10)
Creates two new columns named TEMP and VX, each containing 50 values. TEMP is a copy of cells 2574 of column V6, and VX is a copy of cells 2574 of column V9. The other cells in TEMP are empty.
Related Functions
Function
EXTRACT MERGE
Description
Extracts rows given the values in a predicate column Creates a data group by horizontally concatenating the input values
SIGN
Syntax
SIGN(data)
data The numerical values to compute the sign of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
Parameters
Unica Confidential
279
Description
SIGN tests the sign of the values in the specified data range. It returns one new column for each input column, each containing the sign of numbers in the corresponding input column. Positive one is returned for all values greater than zero; negative one is returned for all values less than zero; zero is returned for values of zero.
Creates three new columns named TEMP, VX, and VY. TEMP contains the value 1, VX contains the value -1, and VY contains the value 0.
TEMP = SIGN(V1)
Creates a new column named TEMP, where each value is the sign of the contents of column V1.
TEMP = SIGN(V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the signs of the contents of column V1, the values of the VX column are the signs of the contents of column V2, and the values of the VY column are the signs of the contents of column V3.
TEMP = SIGN(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain the signs of the values in rows 1020 of column V1. The other cells in TEMP are empty.
TEMP = SIGN(V1[10:50]:V2)
Creates two new columns named TEMP and VX, each with values in rows 141 (the other cells are empty). The values in column TEMP are the signs of the values in rows 1050 of column V1, and the values in column VX are the signs of the values in rows 1050 of column V2.
280
Unica Confidential
SIN
Related Functions
Function
ABS INVERSE
Description
Computes the absolute value of the contents of the specified data range Computes the negative of the contents of the specified data range
SIN
Syntax
SIN(data [, units_keyword])
data The numerical values to compute the sine of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data. units_keyword This optional keyword determines whether the input values and results are interpreted as degrees or radians. Select one of the following:
RADIANPerforms the calculations in radians (default) DEGREEPerforms the calculations in degrees
Parameters
If this parameter is not specified, the default is radians. (To convert from radians to degrees, divide by PI and multiply by 180.) See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Description SIN calculates the sine of values in the specified data range. It returns one new column for each input column, each containing the sine of numbers in the corresponding input column.
Unica Confidential
281
Creates a new column named TEMP, where each value is the sine (in radians) of the contents of column V1. TEMP = SIN(V1:V3, 1) or
TEMP = SIN(V1:V3, DEGREE)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the sines of the contents of column V1, the values of the VX column are the sines of the contents of column V2, and the values of the VY column are the sines of the contents of column V3. All values are in degrees.
TEMP = SIN(V1[10:50]:V2)
Creates two new columns named TEMP and VX, each with values in rows 141 (the other cells are empty). The values in column TEMP are the sines of the values in rows 1050 of column V1, and the values in column VX are the sines of the values in rows 1050 of column V2. All values are in radians.
Related Functions
Function
ASIN COS SINH TAN
Description
Computes the arcsine of the contents of the specified data range Computes the cosine of the contents of the specified data range Computes the hyperbolic sine of the contents of the specified data range Computes the tangent of the contents of the specified data range
282
Unica Confidential
SINH
SINH
Syntax
SINH(data [, units_keyword])
data The numerical values to compute the hyperbolic sine of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data. units_keyword This optional keyword determines whether the input values and results are interpreted as degrees or radians. Select one of the following:
RADIANPerforms the calculations in radians (default) DEGREEPerforms the calculations in degrees
Parameters
If this parameter is not specified, the default is radians. (To convert from radians to degrees, divide by PI and multiply by 180.) See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Description SINH calculates the hyperbolic sine of the values in the specified data range. It
returns one new column for each input column, each containing the hyperbolic sine of numbers in the corresponding input column. For x in radians, the hyperbolic sine of a number is:
e e sinh ( x ) = ----------------2
x x
If the value x is too large, an overflow error is returned. This occurs if sinh(x) exceeds the maximum 32-bit floating-point value.
Unica Confidential
283
Creates a new column named TEMP, where each value is the hyperbolic sine (in radians) of the contents of column V1. TEMP = SINH(V1:V3, 1) or
TEMP = SINH(V1:V3, DEGREE)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the hyperbolic sines of the contents of column V1, the values of the VX column are the hyperbolic sines of the contents of column V2, and the values of the VY column are the hyperbolic sines of the contents of column V3. All values are in degrees.
TEMP = SINH(V1[10:50]:V2)
Creates two new columns named TEMP and VX, each with values in rows 141 (the other cells are empty). The values in column TEMP are the hyperbolic sines of the values in rows 1050 of column V1, and the values in column VX are the hyperbolic sines of the values in rows 1050 of column V2. All values are in radians.
Related Functions
Function
COSH SIN TANH
Description
Computes the hyperbolic cosine of the contents of the specified data range Computes the sine of the contents of the specified data range Computes the hyperbolic tangent of the contents of the specified data range
284
Unica Confidential
SKEW
SKEW
Syntax
SKEW(data [, keyword])
data The numerical values to compute the skew of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data. There must be at least three values in data. keyword This optional keyword determines how the computation is performed over the input data range. Select one of the following:
ALLPerforms the computation on all cells in data (default) COLPerforms the computation separately for each column of data ROWPerforms the computation separately for each row of data
Parameters
See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Description SKEW calculates the skew of the distribution of all the cells in the specified data
range. Skewness measures the degree of asymmetry of a distribution about its mean. A positive skew value indicates a distribution with an asymmetric tail leaning towards more positive values; a negative skew indicates a distribution with an asymmetric tail leaning towards more negative values. A zero skew value indicates that the distribution is symmetrical about its mean. Skew is calculated as follows:
n --------------------------------(n 1)(n 2)
------------------------
x j mean
1
where n is the number of samples in the distribution, mean is the average, and is the standard deviation of the distribution. A minimum of three data values must be provided to compute skew.
Unica Confidential
285
Note Examples
Creates a new column named TEMP containing a single value which is the skew of the contents of column V1.
TEMP = SKEW(V1:V3)
Creates a new column named TEMP containing a single value which is the skew of the contents of columns V1, V2, and V3.
TEMP = SKEW(V1[10:20])
Creates a new column named TEMP containing a single value which is the skew of the cells in rows 1020 of column V1.
TEMP = SKEW(V1[1:5]:V4)
Creates a new column named TEMP containing a single value which is the skew of the cells in rows 1-5 of columns V1 through V4.
TEMP = SKEW(V1:V3, COL)
Creates three new columns named TEMP, VX, and VY. The single value in the TEMP column is the skew of the contents of column V1, the single value in the VX column is the skew of the contents of column V2, and the single value in the VY column is the skew of the contents of column V3.
TEMP = SKEW(V1[1:5]:V3,COL)
Creates three new columns named TEMP, VX, and VY, each containing a single value. The value in column TEMP is the skew of the cells in rows 15 of column V1, the value in column VX is the skew of the cells in rows 15 of column V2, and the value in column VY is the skew of the cells in rows 15 of column V3.
286
Unica Confidential
SLIDE_WINDOW
Creates a new columns named TEMP where each cell entry is the skew of the corresponding row across columns V1, V2, and V3.
TEMP = SKEW(V1[10:50]:V3,ROW)
Creates a new column named TEMP, where the first 41 cells contain the skew of the values in rows 1050 across columns V1 through V3. The other cells in TEMP are empty.
Related Functions
Function
AVG or MEAN KURTOSIS STAT VARIANCE
Description
Computes the arithmetic mean or average of a range of cells Computes the kurtosis of a range of cells Computes the first through fourth moments of the specified data range Computes the variance of a range of cells
SLIDE_WINDOW
Syntax
Parameters
Unica Confidential
287
Description
SLIDE_WINDOW uses a specified window size and slides it over the specified data
range, creating patterns from the window data values. It returns (the number of input columns x width) columns. The sliding window begins at the top of data and covers width rows. The data values in this window (read left to right, top to bottom) are concatenated together to form a single row in the output data range. The sliding window moves down by increment rows each time. For example, assume the columns V1 and V2 contain the following data:
1 10 2 20 3 30 4 40 5 50 ...
Then the expression V3=SLIDE_WINDOW(2, V1:V2) produces the following output in columns V3:V6:
1 10 2 20 2 20 3 30 3 30 4 40 ...
The first two rows create the first row of output. Then the window slides down one row to create the next pattern, and so on.
Tip
Creates a new column named TEMP containing a copy of the values in column V1.
TEMP = SLIDE_WINDOW(3, V1:V3)
Creates nine new columns with each row containing a three-bythree window of data from columns V1:V3. Rows 13 of the input form the first row of output, rows 24 form the second, etc.
288
Unica Confidential
SLIDE_WINDOW
Creates six new columns with each row containing a three-by-two window of data from rows 1020 of columns V1:V3. Rows 1011 of the input form the first row of output, rows 1112 form the second, etc.
TEMP = SLIDE_WINDOW(2, MERGE(V1, V3, V5))
Creates six new columns with each row containing a three-by-two window of data from columns V1, V3, and V5. Rows 12 of the input form the first row of the output, rows 23 form the second, etc.
TEMP = SLIDE_WINDOW(1, V1:V3, 2)
Creates three new columns, where the first row contains data from V1[1]:V3, the second row contains data from V1[3]:V3, the third row contains data from V1[5]:V3, and so on (every other row is skipped).
TEMP = SLIDE_WINDOW(10, V1, 10)
Creates ten new columns, where the first row contains data from V1[1:10], the second row contains data from V1[11:20], the third row contains data from V1[21:30], and so on.
TEMP = SLIDE_WINDOW(3, V1:V2, 5)
Creates six new columns, where each row contains a two-by-three window of data from columns V1:V2. The first row contains data from V1[1:3]:V2; the second row contains data from V1[6:8]:V2, the third row contains data from V1[11:13]:V2, and so on.
Related Functions
Function
GRID
Description
Returns a grid of all possible value combinations (one per row)
Unica Confidential
289
SORT
Syntax
Parameters
See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Description SORT sorts the values in the specified data range (either column or data based on column) based on the keyword value (ASCEND or DESCEND). It returns one new column for each input column to be sorted. If only column is provided, the values in column will be sorted in ascending or descending order as specified by the keyword parameter. For a column of text, ascending order is alphabetical order (az) and descending is the reverse order (za). If data also is provided, it will be sorted using column as the sort criteria.
290
Unica Confidential
SORT
Note
If a single-column cell range is provided for column, to sort the corresponding rows of data, you must specify the same cell range for data. Otherwise, the default is to sort the first n rows of data. For example, to sort corresponding rows, specify:
TEMP = SORT(V1[100:200], V2[100:200]:V5) Otherwise, TEMP = SORT(V1[100:200], V2:V5) is equivalent to: TEMP = SORT(V1[100:200], V2[1:101]:V5)
Creates a new column named TEMP containing the values 15, 14, 13, 12, 11, and 10.
TEMP = SORT(V1)
Creates a new column named TEMP containing the values in column V1 sorted in ascending order.
TEMP = SORT(V1, V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the sorted contents of column V1 in ascending order. The values of the VX column are the corresponding contents of column V2, and the values of the VY column are the corresponding contents of column V3.
TEMP = SORT(V1[10:20], DESCEND)
Creates a new column named TEMP, where the first 11 cells contain the sorted values of the cells in rows 1020 of column V1, in descending order. The other cells in TEMP are empty.
Unica Confidential
291
Creates a new column named TEMP, where the first 6 cells contain the values from rows 16 of column V2, sorted in descending order of cells 510 of column V1. The other cells in TEMP are empty.
TEMP = SORT(V1[5:10], V2[5:10])
Creates a new column named TEMP, where the first 6 cells contain the sorted values of the cells in rows 510 of column V2 according to descending order of cells 510 of column V1. The other cells in TEMP are empty. TEMP = SORT(V1[10:50], V2:V3) or
TEMP = SORT(V1[10:50], V2[1:41]:V3)
Creates two new columns named TEMP and VX, each with values in rows 141 (the other cells are empty). The values in column TEMP are the values from rows 141 of column V2, sorted according to rows 1050 of column V1. Similarly, the values in column VX are the values from rows 141 of column V3, sorted according to rows 1050 of column V1. Column V1 is sorted in ascending order.
SQRT
Syntax
SQRT(data)
data The numerical values to compute the square root of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
SQRT calculates the square root of the values in the specified data range. It returns
Parameters
Description
one new column for each input column, each containing the positive square root of numbers in the corresponding input column.
292
Unica Confidential
SQRT
Note Examples
If a value in the defined data range is negative, a ??? is returned for that cell.
TEMP = SQRT(2)
Creates a new column named TEMP, where each value is the square root of the contents of column V1.
TEMP = SQRT(V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the square roots of the contents of column V1, the values of the VX column are the square roots of the contents of column V2, and the values of the VY column are the square roots of the contents of column V3.
TEMP = SQRT(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain the square roots of the values in rows 1020 of column V1. The other cells in TEMP are empty.
TEMP = SQRT(V1[10:50]:V2)
Creates two new columns named TEMP and VX, each with values in rows 141 (the other cells are empty). The values in column TEMP are the square roots of the values in rows 1050 of column V1, and the values in column VX are the square roots of the values in rows 1050 of column V2.
Related Functions
Function
DIV MULT POW
Description
Divides one specified data range by another Multiplies the contents of two data ranges Computes a base value raised to the specified exponential power(s)
Unica Confidential
293
STAT
Syntax
STAT(data [, keyword])
data The numerical values to compute the moments for (that is, mean, standard deviation, skew, and kurtosis). This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data. There must be at least three values in data. keyword This optional keyword determines how the computation is performed over the input data range. Select one of the following:
ALLPerforms the computation on all cells in data (default) COLPerforms the computation separately for each column of data ROWPerforms the computation separately for each row of data
Parameters
See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Description STAT calculates the first four moments of the values in the specified data range.
The first moment is the average. The second moment is the standard deviation. The third moment is skew, and the fourth moment is kurtosis. The number of columns returned by the STAT macro function depends on keyword and the number of columns in data.
If the keyword ALL is used (the default), the moments are computed over all values in data. One column is returned containing four values. If the keyword COL is used, moments are calculated separately for each input column. One column is returned for each input column, each containing four values.
294
Unica Confidential
STAT
If the keyword ROW is used, the moments are calculated across each row of data. STAT returns four columns. The moments are listed across each row for each row of the input data range.
Creates a new column named TEMP containing the values 3, 1.58, 0, and -1.2.
TEMP = STAT(V1)
Creates a new column named TEMP containing the first four moments of column V1.
TEMP = STAT(V1:V3)
Creates a new column named TEMP containing the first four moments of columns V1, V2, and V3.
TEMP = STAT(V1[10:20])
Creates a new column named TEMP containing the first four moments of the cells in rows 1020 of column V1.
TEMP = STAT(V1[1:5]:V4)
Creates a new column named TEMP containing the first four moments of the cells in rows 15 of columns V1 through V4.
TEMP = STAT(V1:V3, COL)
Creates three new columns named TEMP, VX, and VY. The four values in the TEMP column are the moments of column V1, the four values in the VX column are the moments of column V2, and the four values in the column VY are the moments of column V3. TEMP = STAT(V1[1:5]:V3, COL) or
TEMP = STAT(V1[1:5]:V3[1:5], COL)
Creates three new columns named TEMP, VX, and VY, each containing four values. The values in column TEMP are the moments of the cells in rows 15 of column V1, the values in column VX are the moments of the cells in rows 15 of column V2, and the values in column VY are the moments of the cells in rows 15 of column V3.
Unica Confidential
295
Creates four new columns named TEMP, VX, VY, and VZ. TEMP contains the average of each row across columns V1, V2, and V3, VX contains the standard deviation, VY contains the skew, and VZ contains the kurtosis. TEMP = STAT(V1[50:100]:V3],ROW) or
TEMP = STAT(V1[50:100]:V3[50:100], ROW)
Creates four new columns named TEMP, VX, VY, and VZ, each containing 51 rows. TEMP contains the average, VX contains the standard deviation, VY contains the skew, and VZ contains the kurtosis. The first row corresponds to row 50 across columns V1, V2, and V3. The second row corresponds to row 51, and so on.
Related Functions
Function
AVG or MEAN KURTOSIS SKEW STDV or STDEV VARIANCE
Description
Computes the arithmetic mean or average of a range of cells Computes the kurtosis of a range of cells Computes the skew of the distribution of a range of cells Computes the standard deviation of a range of cells Computes the variance of a range of cells
STDV or STDEV
Syntax
Parameters
296
Unica Confidential
STDV or STDEV
Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
keyword This optional keyword determines how the computation is performed over the input data range. Select one of the following:
ALLPerforms the computation on all cells in data (default) COLPerforms the computation separately for each column of data ROWPerforms the computation separately for each row of data
See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Note
Many macro functions take the keyword parameters {ALL | COL | ROW}. These keywords do not apply in Affinium Campaign because the input data is always a single column or field. The macro will always behave as if the COL keyword were specified. Therefore, you do not need to specify these keywords when using Affinium Campaign.
STDV calculates the standard deviation of all the cells in the specified data range.
Description
The standard deviation of a distribution is the square root of the variance. The standard deviation is calculated as follows:
1 ----------n1
j=1
( x mean )
j
where the xs are the samples, n is the number of samples, and mean is the average of the distribution.
Note Examples TEMP = STDV(MERGE(1, 2, 1, 0)) or TEMP = STDEV(MERGE(1, 2, 1, 0))
Unica Confidential
297
TEMP = STDV(V1)
Creates a new column named TEMP containing a single value which is the standard deviation of the contents of column V1.
TEMP = STDV(V1:V3)
Creates a new column named TEMP containing a single value which is the standard deviation of the contents of columns V1, V2, and V3.
TEMP = STDV(V1[1:5]:V4)
Creates a new column named TEMP containing a single value which is the standard deviation of the cells in rows 15 of columns V1 through V4.
TEMP = STDV(V1:V3, COL)
Creates three new columns named TEMP, VX, and VY. The single value in the TEMP column is the standard deviation of the contents of column V1, the single value in the VX column is the standard deviation of the contents of column V2, and the single value in the VY column is the standard deviation of the contents of column V3.
TEMP = STDV(V1[10:50]:V3,COL)
Creates three new columns named TEMP, VX, and VY, each containing a single value. The value in column TEMP is the standard deviation of the cells in rows 1050 of column V1, the value in column VX is the standard deviation of the cells in rows 1050 of column V2, and the value in column VY is the standard deviation of the cells in rows 1050 of column V3.
TEMP = STDV(V1:V3, ROW)
Creates a new columns named TEMP where each cell entry is the standard deviation of the corresponding row across columns V1, V2, and V3.
TEMP = STDV(V1[1:5]:V3,ROW)
Creates a new column named TEMP, where the cells in rows 15 contain the standard deviations of the corresponding row across columns V1 through V3. The other cells in TEMP are empty.
298
Unica Confidential
STRING_CONCAT
Related Functions
Function
KURTOSIS SKEW STAT VAR
Description
Computes the kurtosis of a range of cells Computes the skew of the distribution of a range of cells Computes the first through fourth moments of the specified data range Computes the variance of a range of cells
STRING_CONCAT
Syntax
STRING_CONCAT(head, tail)
head The first ASCII text string data to concatenate. This can be ASCII text in quotes, a column of text, a cell range containing text, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of head (same as data). tail The second ASCII text string data to concatenate. This can be ASCII text in quotes, a column of text, a cell range containing text, or an expression evaluating to any of the above. The number of columns in tail must equal the number of columns in head, unless tail is a constant. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of tail (same as data).
Parameters
Description
STRING_CONCAT concatenates the ASCII text values in the two specified data
ranges. It returns one new column for each input column, each containing the concatenated strings from the corresponding rows of head and tail. This rowby-row calculation produces a result for each row up to the last value of the shortest column.
Unica Confidential
299
Note Examples
The total width of each resulting string cannot exceed 255 characters.
Creates a new column named TEMP, which contains the ASCII text string houseboat.
TEMP = STRING_CONCAT(V1, .)
Creates a new column named TEMP, each row containing the ASCII text string in the corresponding row of column V1 with an appended period.
TEMP = STRING_CONCAT(V1, V2)
Creates a new column named TEMP, each row containing the containing the ASCII text string in column V1 concatenated with the text string in column V2.
TEMP = STRING_CONCAT(V1:V3, V4:V6)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the concatenated strings from the corresponding rows of column V1 and V4, the values of the VX column are the concatenated strings from the corresponding rows of column V2 and V5, and the values of the VY column are the concatenated strings from the corresponding rows of column V3 and V6.
TEMP = STRING_CONCAT(V1[5:10]:V2, V3:V4)
Creates two new columns named TEMP and VX. The values in the TEMP column are strings from rows 510 of column V1 concatenated with the rows 16 of column V3. The values in VX are the strings from rows 510 of column V2 concatenated with the rows 16 of column V4.
Related Functions
Function
STRING_HEAD STRING_LENGTH
Description
Returns the first n characters of each string in the specified data range Returns the length of each string in the specified data range
300
Unica Confidential
STRING_HEAD
Function
STRING_SEG STRING_TAIL
Description
Returns the string segment between two specified indices Returns the last n characters of each string in the specified data range
STRING_HEAD
Syntax
STRING_HEAD(num_chars, data)
num_chars The number of characters to returns from the beginning of each string in data. This must be a positive integer greater than zero. data ASCII text string values. This can be ASCII text in quotes, a column of text, a cell range containing text, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
Parameters
Description
STRING_HEAD returns the first num_chars characters from each string value in
the specified data range. If num_chars is greater than the number of characters in a text string, the remaining characters are padded with the null character \0.
Examples TEMP = STRING_HEAD(3, JAN 15, 1997)
Creates a new column named TEMP, which contains the ASCII text string JAN.
TEMP = STRING_HEAD(10, Pressure)
Creates a new column named TEMP, which contains the ASCII text string Pressure.
TEMP = STRING_HEAD(5, V1)
Creates a new column named TEMP containing the first five characters of each string in column V1.
Unica Confidential
301
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the first characters of the strings in the corresponding rows of column V1, the values of the VX column are the first characters of strings in corresponding rows of column V2, and the values of the VY column are the first characters of the strings in corresponding rows of column V3.
TEMP = STRING_HEAD(12, V4[1:50]:V6]
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the first 12 characters of the strings in rows 150 of column V1, the values of the VX column are the first 12 characters of strings in rows 150 of column V2, and the values of the VY column are the first 12 characters of the strings in rows 1 50 of column V3.
Related Functions
Function
STRING_CONCAT STRING_LENGTH STRING_SEG STRING_TAIL
Description
Concatenates two text strings from the specified data ranges Returns the length of each string in the specified data range Returns the string segment between two specified indices Returns the last n characters of each string in the specified data range
STRING_LENGTH
Syntax
STRING_LENGTH(data)
data ASCII text string values to compute the length of. This can be ASCII text in quotes, a column of text, a cell range containing text, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros
Parameters
302
Unica Confidential
STRING_LENGTH
in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
Description STRING_LENGTH returns the length of each string value in the specified data
range. It returns one new column for each input column, each containing the length of the corresponding text string.
Note
Creates a new column named TEMP, where each value is the length of the string in the corresponding row of column V1.
TEMP = STRING_LENGTH(V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the lengths of the strings in the corresponding rows of column V1, the values of the VX column are the lengths of strings in corresponding rows of column V2, and the values of the VY column are the lengths of the strings in corresponding rows of column V3.
TEMP = STRING_LENGTH(V4[1:50]:V6]
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the lengths of the strings in rows 150 of column V1, the values of the VX column are the lengths of strings in rows 150 of column V2, and the values of the VY column are the lengths of the strings in rows 150 of column V3.
Unica Confidential
303
Related Functions
Function
STRING_CONCAT STRING_HEAD STRING_SEG STRING_TAIL
Description
Concatenates two text strings from the specified data ranges Returns the first n characters of each string in the specified data range Returns the string segment between two specified indices Returns the last n characters of each string in the specified data range
STRING_PROPER
Syntax STRING_PROPER(data)
Parameters
Description
ing the first letter or any letter that follows a white space character or symbol (other than underscore) into uppercase, and all other characters to lowercase. It returns one new column for each input column, each containg the converted string in the corresponding input column.
Examples Temp = STRING_PROPER
304
Unica Confidential
STRING_SEG
Related Functions
Function
Description
STRING_SEG
Syntax
Parameters
Description
STRING_SEG returns the string segment between two indices from each string
value in the specified data range. If from is greater than the length of a string, nothing is returned. If to is greater than the length of a string, all characters from from are returned.
Unica Confidential
305
Creates a new column named TEMP, which contains the ASCII text string Jan 15.
TEMP = STRING_SEG(5, 20, Pressure)
Creates a new column named TEMP, which contains the ASCII text string sure.
TEMP = STRING_SEG(5, 6, V1)
Creates a new column named TEMP containing the fifth and sixth characters of each string in column V1.
TEMP = STRING_SEG(10, 20, V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are characters 1020 of the strings in the corresponding rows of column V1, the values of the VX column are the characters 1020 of strings in corresponding rows of column V2, and the values of the VY column are the characters 1020 of the strings in corresponding rows of column V3.
TEMP = STRING_SEG(5, 10, V4[1:50]:V6]
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are characters 510 of the strings in rows 150 of column V1, the values of the VX column are characters 510 of strings in rows 150 of column V2, and the values of the VY column are characters 510 of the strings in rows 150 of column V3.
Related Functions
Function
STRING_CONCAT STRING_HEAD STRING_LENGTH STRING_TAIL
Description
Concatenates two text strings from the specified data ranges Returns the first n characters of each string in the specified data range Returns the length of each string in the specified data range Returns the last n characters of each string in the specified data range
306
Unica Confidential
STRING_TAIL
STRING_TAIL
Syntax
STRING_TAIL(num_chars, data)
num_chars The number of characters to returns from the end of each string in data. This must be a positive integer greater than zero. data ASCII text string values. This can be ASCII text in quotes, a column of text, a cell range containing text, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
Parameters
Description
STRING_TAIL returns the last num_chars characters from each string value in
the specified data range. All string values are padded to the length of the longest string with null characters \0. Then the last num_chars are returned from each string. If num_chars is greater than the number of characters in a text string, the entire text string is returned.
Examples TEMP = STRING_TAIL(3, JAN 15, 1997)
Creates a new column named TEMP, which contains the ASCII text string 997.
TEMP = STRING_TAIL(10, Pressure)
Creates a new column named TEMP, which contains the ASCII text string Pressure.
TEMP = STRING_TAIL(5, V1)
Creates a new column named TEMP containing the last five characters of each string in column V1.
Unica Confidential
307
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the last characters of the strings in the corresponding rows of column V1, the values of the VX column are the last characters of strings in corresponding rows of column V2, and the values of the VY column are the last characters of the strings in corresponding rows of column V3.
TEMP = STRING_TAIL(12, V4[1:50]:V6]
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the last 12 characters of the strings in rows 1 50 of column V1, the values of the VX column are the last 12 characters of strings in rows 150 of column V2, and the values of the VY column are the last 12 characters of the strings in rows 150 of column V3.
Related Functions
Function
STRING_CONCAT STRING_HEAD STRING_LENGTH STRING_SEG
Description
Concatenates two text strings from the specified data ranges Returns the first n characters of each string in the specified data range Returns the length of each string in the specified data range Returns the string segment between two specified indices
SUBSAMPLE
Syntax
SUBSAMPLE(num_samples, data)
num_samples The number of samples to extract. This must be a positive integer less than the number of cells in the specified data range (that is, the SUBSAMPLE macro function cannot be used to increase the number of data points by replication).
Parameters
308
Unica Confidential
SUBSAMPLE
data The values to sample from. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
Description SUBSAMPLE evenly samples the requested number of data points from the speci-
fied data range. It returns one new column for each input column, each containing num_samples rows of the numbers uniformly extracted from the corresponding input column. The first row value and each n-th row value thereafter is returned, so that a total of num_samples are extracted.
Tip
This macro function can be used both to increase or decrease the number of samples.
Creates a new column named TEMP, which contains 100 values evenly sampled from column V1.
TEMP = SUBSAMPLE(50, V1:V3)
Creates three new columns named TEMP, VX, and VY, each containing 50 values. The values in the TEMP column are the sample values of the contents of column V1, the values of the VX column are the samples values of the contents of column V2, and the values of the VY column are the sample values of the contents of column V3.
TEMP = SUBSAMPLE(5, V1[0:100])
Creates a new column named TEMP with values in the first five rows. Data is evenly sampled from rows 0100 of column V1.
TEMP = SUBSAMPLE(250, V1[1:10]:V2)
Creates two new columns named TEMP and VX, each with values in the first 250 rows. The values in column TEMP are evenly sampled from rows 1400 of column V1, and the values in column VX are evenly sampled from rows 1400 of column V2.
Unica Confidential
309
Related Functions
Function
EXTRACT SAMPLE_RANDOM
Description
Extracts rows given the values in a predicate column Returns column(s) of n cells, each containing a random sample from the specified data range
SUBSTITUTE
Syntax
Parameters
Description
from_table and to_table. Each value in data found in from_table is substituted with the value in the corresponding row of to_table.
SUBSTITUTE can be used to change both numerical and string values. It always returns a data range with the same dimensions as data. Note
If you use SUBSTITUTE to convert strings to numbers or vice versa, all values in data must be converted. That is, every value in data must appear in from_table. Otherwise, the resulting row contains ???.
310
Unica Confidential
SUBSTITUTE
Creates a new column named TEMP, which contains the values 7, 5, 10 (the value 1 is replaced with 7).
TEMP = SUBSTITUTE(COLUMN(blue, red), COLUMN(blue, red), COLUMN(0, 1))
Creates a new column named TEMP, which contains the values 0 and 1 (the string blue is replaced with 0 and red is replaced with 1).
TEMP = SUBSTITUTE(V1, V2, V3)
Creates a new column named TEMP containing the values of column V1, where any values found in column V2 are replaced with the value in the corresponding row of column V3.
TEMP = SUBSTITUTE(V1:V2, V4, V5)
Creates two new columns named TEMP and VX, each with values from columns V1 and V2 respectively, where any values found in column V4 are replaced with the value in the corresponding row of column V5.
TEMP = SUBSTITUTE(V1[10:20]:V2, V4, V5)
Creates two new columns named TEMP and VX, each with values from rows 1020 of columns V1 and V2 respectively, where any values found in column V4 are replaced with the value in the corresponding row of column V5.
Related Functions
Function
EXTRACT ISMEMBER
Description
Extracts rows given the values in a predicate column Tests an input range against a table of values, returning one if a value is contained in the table, else zero
Unica Confidential
311
SUBSTR or SUBSTRING
Syntax
SUBSTR(string_value, start_pos[, nchars]) or SUBSTR(string_value FROM start_pos[ FOR nchars]) SUBSTRING(string_value, start_pos[, nchars]) or SUBSTRING(string_value FROM start_pos[ FOR nchars])
string_value The string from which a substring will be taken. start_pos The starting character from each the substring will be extracted.
Parameters
nchars The number of characters to be extracted (must be greater than or equal to 0). If this value is not provided, all remaining characters in string_value are extracted.
Description SUBSTR or SUBSTRING extracts nchars characters from the string, starting at start_pos. If nchars is omitted, SUBSTR and SUBSTRING extracts characters
from start_pos through the end of the string. Trailing spaces are automatically truncated.
Examples SUBSTR SUBSTR Returns SUBSTR SUBSTR Returns SUBSTR SUBSTR Returns (abcdef FROM 1 FOR 2) (abcdef,1,2) ab (abcdef FROM -2 FOR 4) (abcdef,-2,4) a (abcdef FROM 3) (abcdef,3) cdef
312
Unica Confidential
SUM
SUM
Syntax
SUM(data [, keyword])
data The numerical values to compute the sum of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data. keyword This optional keyword determines how the computation is performed over the input data range. Select one of the following:
ALLPerforms the computation on all cells in data (default) COLPerforms the computation separately for each column of data ROWPerforms the computation separately for each row of data
Parameters
See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Note
Many macro functions take the keyword parameters {ALL | COL | ROW}. These keywords do not apply in Affinium Campaign because the input data is always a single column or field. The macro will always behave as if the COL keyword were specified. Therefore, you do not need to specify these keywords when using Affinium Campaign.
SUM calculates the sum of all the cells in the specified data range. It returns a sin-
Description
gle column.
Note Examples TEMP = SUM(3) SUM is the same as the TOTAL macro function.
Unica Confidential
313
Creates a new column named TEMP containing a single value which is the sum of the contents of column V1.
TEMP = SUM(V1:V3)
Creates a new column named TEMP containing a single value which is the sum of the contents of columns V1, V2, and V3.
TEMP = SUM(V1[1:5]:V4)
Creates a new column named TEMP containing a single value which is the sum of the cells in rows 1020 of columns V1 through V4.
TEMP = SUM(V1:V3, COL)
Creates three new columns named TEMP, VX, and VY. The single value in the TEMP column is the sum of the contents of column V1, the single value in the VX column is the sum of the contents of column V2, and the single value in the VY column is the sum of the contents of column V3.
TEMP = SUM(V1[1:5]:V3, COL)
Creates three new columns named TEMP, VX, and VY, each containing a single value. The value in column TEMP is the sum of the cells in rows 15 of column V1, the value in column VX is the sum of the cells in rows 15 of column V2, and the value in column VY is the sum of the cells in rows 15 of column V3.
TEMP = SUM(V1:V3, ROW)
Creates a new columns named TEMP where each cell entry is the sum of the corresponding row across columns V1, V2, and V3.
TEMP = SUM(V1[1:5]:V3, ROW)
Creates a new column named TEMP, where the cells in rows 15 contain the sum of the corresponding row across columns V1 through V3. The other cells in TEMP are empty.
314
Unica Confidential
TAN
Related Functions
Function
AVG or MEAN AVG_DEV
Description
Computes the arithmetic mean or average of a range of cells Computes the average deviation of a range of cells
TAN
Syntax
TAN(data [, units_keyword])
data The numerical values to compute the tangent of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data. units_keyword This optional keyword determines whether the input values and results are interpreted as degrees or radians. Select one of the following:
RADIANPerforms the calculations in radians (default) DEGREEPerforms the calculations in degrees
Parameters
If this parameter is not specified, the default is radians. (To convert from radians to degrees, divide by PI and multiply by 180.) See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Description TAN calculates the tangent of the values in the specified data range. It returns one new column for each input column each containing the tangent of numbers in the corresponding input column.
Unica Confidential
315
Creates a new column named TEMP, where each value is the tangent (in radians) of the contents of column V1. TEMP = TAN(V1:V3, 1) or
TEMP = TAN(V1:V3, DEGREE)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the tangents of the contents of column V1, the values of the VX column are the tangents of the contents of column V2, and the values of the VY column are the tangents of the contents of column V3. All values are in degrees.
TEMP = TAN(V1[1:5]:V2)
Creates two new columns named TEMP and VX, each with values in rows 15 (the other cells are empty). The values in column TEMP are the tangents of the corresponding rows of column V1, and the values in column VX are the tangents of the corresponding rows of column V2. All values are in radians.
Related Functions
Function
ATAN COS COT SIN TANH
Description
Computes the arctangent of the contents of the specified data range Computes the cosine of the contents of the specified data range Computes the cotangent of the contents of the specified data range Computes the sine of the contents of the specified data range Computes the hyperbolic tangent of the contents of the specified data range
316
Unica Confidential
TANH
TANH
Syntax
TANH(data [, units_keyword])
data The numerical values to compute the hyperbolic tangent of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data. units_keyword This optional keyword determines whether the input values and results are interpreted as degrees or radians. Select one of the following:
RADIANPerforms the calculations in radians (default) DEGREEPerforms the calculations in degrees
Parameters
If this parameter is not specified, the default is radians. (To convert from radians to degrees, divide by PI and multiply by 180.) See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Description TANH calculates the hyperbolic tangent of the values in the specified data range. It returns one new column for each input column, each containing the hyperbolic tangent of numbers in the corresponding input column. The hyperbolic tangent of a number is calculated as follows: sinh ( x ) tanh ( x ) = ------------------cosh ( x ) Note
If the value x is too large, an overflow error is returned. This occurs if tanh(x) exceeds the maximum 32-bit floating-point value. If cosh(x) is zero, TANH returns the maximum 32-bit floating point value.
Unica Confidential
317
Creates a new column named TEMP, where each value is the hyperbolic tangent (in radians) of the contents of column V1. TEMP = TANH(V1:V3, 1) or
TEMP = TANH(V1:V3, DEGREE)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the hyperbolic tangents of the contents of column V1, the values of the VX column are the hyperbolic tangents of the contents of column V2, and the values of the VY column are the hyperbolic tangents of the contents of column V3. All values are in degrees.
TEMP = TANH(V1[1:5]:V2)
Creates two new columns named TEMP and VX, each with values in rows 15 (the other cells are empty). The values in column TEMP are the hyperbolic tangents of the corresponding rows of column V1, and the values in column VX are the hyperbolic tangents of the corresponding rows of column V2. All values are in radians.
Related Functions
Function
ATAN COSH COT SINH TAN
Description
Computes the arctangent of the contents of the specified data range Computes the hyperbolic cosine of the contents of the specified data range Computes the cotangent of the contents of the specified data range Computes the hyperbolic sine of the contents of the specified data range Computes the tangent of the contents of the specified data range
318
Unica Confidential
TO
TO
Syntax
Parameters
Description
TO creates a single column containing the integer values beginning with begin
and ending with end. This macro function is used to define the time variable in recursive functions (see the INIT macro function).
Tip
Function
COLUMN MERGE
Description
Creates new column(s), vertically concatenating the input values in each column Creates a data group by horizontally concatenating the input values
Unica Confidential
319
TOTAL
Syntax
TOTAL(data [, keyword])
data The numerical values to compute the sum of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data. keyword This optional keyword determines how the computation is performed over the input data range. Select one of the following:
ALLPerforms the computation on all cells in data (default) COLPerforms the computation separately for each column of data ROWPerforms the computation separately for each row of data
Parameters
See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Note
Many macro functions take the keyword parameters {ALL | COL | ROW}. These keywords do not apply in Affinium Campaign because the input data is always a single column or field. The macro will always behave as if the COL keyword were specified. Therefore, you do not need to specify these keywords when using Affinium Campaign.
TOTAL calculates the sum of all the cells in the specified data range. TOTAL is the same as the SUM macro function.
TEMP = TOTAL(3)
320
Unica Confidential
TOTAL
Creates a new column named TEMP containing a single value which is the sum of the contents of column V1.
TEMP = TOTAL(V1:V3)
Creates a new column named TEMP containing a single value which is the sum of the contents of columns V1, V2, and V3.
TEMP = TOTAL(V1[1:5]:V4)
Creates a new column named TEMP containing a single value which is the sum of the cells in rows 1020 of columns V1 through V4.
TEMP = TOTAL(V1:V3, COL)
Creates three new columns named TEMP, VX, and VY. The single value in the TEMP column is the sum of the contents of column V1, the single value in the VX column is the sum of the contents of column V2, and the single value in the VY column is the sum of the contents of column V3.
TEMP = TOTAL(V1[1:5]:V3, COL)
Creates three new columns named TEMP, VX, and VY, each containing a single value. The value in column TEMP is the sum of the cells in rows 15 of column V1, the value in column VX is the sum of the cells in rows 15 of column V2, and the value in column VY is the sum of the cells in rows 15 of column V3.
TEMP = TOTAL(V1:V3, ROW)
Creates a new columns named TEMP where each cell entry is the sum of the corresponding row across columns V1, V2, and V3.
TEMP = TOTAL(V1[1:5]:V3, ROW)
Creates a new column named TEMP, where the cells in rows 15 contain the sum of the corresponding row across columns V1 through V3. The other cells in TEMP are empty.
Unica Confidential
321
Related Functions
Function
AVG or MEAN AVG_DEV
Description
Computes the arithmetic mean or average of a range of cells Computes the average deviation of a range of cells
TRANSPOSE
Syntax
TRANSPOSE(data)
data The numerical or string values to transpose. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Use of Constants on page 35 for the format definition of data.
TRANSPOSE transposes the specified data range. It changes the horizontal and vertical orientation of the data range (that is, the first row of data becomes the first column, the second row becomes the second column, and so on).
Parameters
Description
Note
The transposed data range must be rectangular. Any empty cells in a numerical column are replaced with zeros. Empty cells in a string column are replaced with the empty string ("").
Creates three new columns named TEMP, VX, and VY, each containing a single value 1, 2, and 3.
TEMP = TRANSPOSE(MERGE(a,b))
Creates a new column for each row in column V1. Each column contains one value, the corresponding row value of column V1.
322
Unica Confidential
TRUNCATE
TEMP = TRANSPOSE(V1:V3)
Creates one new column for each row of the longest column, V1, V2, or V3. Each column has three rows containing the transposed values of V1:V3..
TEMP = TRANSPOSE(V1[10:15])
Creates six new columns, each containing one row. The first column contains the value from V1[10], the second column contains V1[11], and so on.
TEMP = TRANSPOSE(V1[50:99]:V2)
Creates 100 new columns. Each column has two rows containing the transposed values of rows 5099 of columns V1 and V2.
Related Functions
Function
COLUMN MERGE
Description
Creates new column(s), vertically concatenating the input values in each column Creates a data group by horizontally concatenating the input values
TRUNCATE
Syntax
TRUNCATE(data)
data The numerical values to truncate. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
TRUNCATE calculates the whole part of each value in the specified data range. It
Parameters
Description
returns one new column for each input column, each containing the whole number (non-fractional) part of the numbers in the corresponding input column.
Unica Confidential
323
Note
n are complementary in that they sum to the original values.
Creates a new column named TEMP, where each value is the fractional part of the contents of column V1.
TEMP = TRUNCATE(V1:V3)
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the truncated parts of column V1, the values of the VX column are the truncated parts of column V2, and the values of the VY column are the truncated parts of column V3.
TEMP = TRUNCATE(V1[10:20])
Creates a new column named TEMP, where the first 11 cells contain the truncated parts of the values in rows 1020 of column V1. The other cells in TEMP are empty.
TEMP = TRUNCATE(V1[50:99]:V2)
Creates two new columns named TEMP and VX, each with values in rows 150 (the other cells are empty). The values in column TEMP are the truncated parts of the rows of column V1, and the values in column VX are the truncated parts of the values in column V2.
Related Functions
Function
CEILING FLOOR FRACTION
Description
Computes the ceiling of each value in the specified data range Computes the floor of each value in the specified data range Returns the fractional part of each value in the specified data range
324
Unica Confidential
UPPER
UPPER
Syntax
UPPER(data) data The string value to be converted to uppercase. UPPER converts each string value in the specifed data range to uppercase. It returns one new column for each input column, each containg the uppercase string in the corresponding input column.
Parameters
Description
Creates a new column named TEMP, which contains the ASCII text string JAN 15, 1997.
TEMP = UPPER( Pressure)
Creates a new column named TEMP, which contains the ASCII text string PRESSURE.
TEMP = UPPER(V1)
Creates a new column named TEMP containing uppercase characters of each string in column V1.
Related Functions
Function
Description
Unica Confidential
325
VARIANCE
Syntax
VARIANCE(data [, keyword])
data The numerical values to compute the variance of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data. keyword This optional keyword determines how the computation is performed over the input data range. Select one of the following:
ALLPerforms the computation on all cells in data (default) COLPerforms the computation separately for each column of data ROWPerforms the computation separately for each row of data
Parameters
See Format Specifications in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for more details on using keywords.
Note
Many macro functions take the keyword parameters {ALL | COL | ROW}. These keywords do not apply in Affinium Campaign because the input data is always a single column or field. The macro will always behave as if the COL keyword were specified. Therefore, you do not need to specify these keywords when using Affinium Campaign.
VARIANCE calculates the variance of all the values in the specified data range.
Description
j=1
( x mean )
j
where the xs are the samples, n is the number of samples, and mean is the average of the distribution.
326
Unica Confidential
VARIANCE
Note Examples
Creates a new column named TEMP containing a single value which is the variance of the contents of column V1.
TEMP = VARIANCE(V1:V3)
Creates a new column named TEMP containing a single value which is the variance of the contents of columns V1, V2, and V3.
TEMP = VARIANCE(V1[10:20])
Creates a new column named TEMP containing a single value which is the variance of the cells in rows 1020 of column V1.
TEMP = VARIANCE(V1[1:5]:V4)
Creates a new column named TEMP containing a single value which is the variance of the cells in rows 15 of columns V1 through V4.
TEMP = VARIANCE(V1:V3, COL)
Creates three new columns named TEMP, VX, and VY. The single value in the TEMP column is the variance of the contents of column V1, the single value in the VX column is the variance of the contents of column V2, and the single value in the VY column is the variance of the contents of column V3.
TEMP = VARIANCE(MERGE(1,4), COL)
Creates two new columns named TEMP and VX, each containing the value zero.
Unica Confidential
327
Creates three new columns named TEMP, VX, and VY, each containing a single value. The value in column TEMP is the variance of the cells in rows 15 of column V1, the value in column VX is the variance of the cells in rows 15 of column V2, and the value in column VY is the variance of the cells in rows 15 of column V3.
TEMP = VARIANCE(V1:V3, ROW)
Creates a new column named TEMP where each cell entry is the variance of the corresponding row across columns V1, V2, and V3. TEMP = VARIANCE(V1[1:5]:V3,ROW) or
TEMP = VARIANCE(V1[1:5]:V3[1:5], ROW)
Creates a new column named TEMP, where the cells in rows 15 contain the variance of the corresponding row across columns V1 through V3. The other cells in TEMP are empty.
Related Functions
Function
KURTOSIS SKEW
Description
Computes the kurtosis of a range of cells Computes the skew of the distribution of a range of cells
WEEKDAY
Syntax
WEEKDAY(data [, conversion_keyword])
data The ASCII text dates to convert to numerical values representing days of the week (17). This can be ASCII text in quotes, a column of text, a cell range containing text, or an expression evaluating to any of the above. See Macro Function Parameters in Chapter 1, Using Macros in Affinium Campaign or in Chapter 2, Using Macros in Affinium Model for the format definition of data.
Parameters
328
Unica Confidential
WEEKDAY
conversion_keyword This optional keyword specifies how to interpret text formats for dates and times. Select one of the following:
1mm/dd/yy (default) 2dd-mmm-yy 3mm/dd/yy hh:mm
Creates a new column named TEMP containing the number 0 (January 1, 1995 is a Sunday).
TEMP = WEEKDAY(V1, 2)
Creates a new column named TEMP containing numbers for the days of the week for the text strings in column V1. All text strings in column V1 are expected to be of the form dd-mmm-yy (otherwise ???s are returned).
TEMP = WEEKDAY(V1:V3, 3)
Creates three new columns named TEMP, VX, and VY. The column TEMP contains numbers representing the days of the week of text strings in column V1. The column VX contains numbers representing the days of the week of text strings in column V2. The column VY contains numbers representing the days of the week of text strings in column V3. All text strings in columns V1V3 are expected to be of the form mm/dd/yy hh:mm (otherwise ???s are returned).
Unica Confidential
329
Creates two new columns named TEMP and VX. The column TEMP contains the numbers representing the days of the week of text strings in rows 1020 of column V1. The column VX contains the numbers representing the days of the week of text strings in rows 1020 column V2. All text strings are expected to be of the form mm/dd/yy (otherwise ???s are returned).
Related Functions
Function
NUMBER
Description
Converts ASCII text strings for times and dates to numerical values
WEEKDAYOF
Syntax WEEKDAYOF(date_string [, input_format])
Parameters
date_string A text representing a valid date. input_format One of the keywords in the table below, specifying the date format of date_string.
Description
Monday 1, and so on) for the date specified by the date_string. If input_format is not provided, the default keyword DELIM_M_D_Y will be used.
Examples WEEKDAYOF(08312000, MMDDYYYY) returns the number 4, since Thursday is
See DATE on page 116 for additional information on valid date formats.
330
Unica Confidential
XOR
Related Functions
Function
DAYOF MONTHOF YEAROF
Description
Returns the day of the month as a number. Returns the month of the year as a number. Returns the year as a number.
XOR
Syntax
Parameters
Description
XOR performs a bitwise XOR between the two specified data ranges. It returns a
new column for each input column, each containing the corresponding column in data1 bitwise XOR-ed to the corresponding column of data2 (that is, the first column of data1 is bitwise XOR-ed to the first column of data, the second column with the second column, and so on). If data2 is a constant, each value in data1 is bitwise XOR-ed by that value. If data2 contains one or more columns, the calculations are performed on a row-by-row basis between one column from data2 and one column from data2. The first row of data1 is bitwise XOR-ed to the first row value of
Unica Confidential
331
data2, the second row with the second row, and so on. This row-by-row calculation produces a result for each row up to the last value of the shortest column.
Note
Precision for this macro function is limited to integer values less than 2 24 . No negative values are allowed.
Creates a new column named TEMP containing the value four (bitwise XOR of 011 and 111 equals 100).
TEMP = V1 XOR 8
Creates a new column named TEMP, where each value is the contents of column V1, bitwise XOR-ed with the binary value 1000.
TEMP = V1 XOR V1
Creates a new column named TEMP containing all zeros (every value XOR-ed with itself produces zero).
TEMP = V1 XOR V2
Creates a new column named TEMP, where each value is the row value of column V1 bitwise XOR-ed with the corresponding row value of column V2.
TEMP = V1:V3 XOR V4:V6
Creates three new columns named TEMP, VX, and VY. The column TEMP contains the values in V1 bitwise XOR-ed with the corresponding row values of column V4. The column VX contains the bitwise XOR-ed values from columns V2 and V5. The column VY contains the bitwise XOR-ed values from columns V3 and V6. TEMP = V1[10:20] XOR V2 or
TEMP = V1[10:20] XOR V2[1:11]
Creates a new column named TEMP, where the first 11 cells contain the bitwise XOR-ed result of the values in rows 1020 of column V1 by the values in rows 111 of column V2. The other cells in TEMP are empty.
332
Unica Confidential
XTAB
Related Functions
Function
BIT_AND BIT_NOT BIT_OR
Description
Computes the bitwise AND between two specified data ranges Computes the bitwise NOT of the contents of the specified data range Computes the bitwise OR between two specified data ranges
XTAB
Syntax XTAB(col1, col2 [, operator_keyword, numeric_col3])
Parameters
col1 The first column to produce the xtab from. This can be a constant, a column, a single-column cell range, or any expression evaluating to one of the above. col2 The second column to produce the xtab from. This can be a constant, a column, a single-column cell range, or any expression evaluating to one of the above. operator_keyword One of the valid operator keywords (see below). numeric_col3 The third column to produce the xtab from. This can be a constant, a column, a single-column cell range, or any expression evaluating to one of the above containing a numeric value.
Description
operator_keyword of numeric_col3 at the intersection of each col1 value with each col2 value. The operator_keyword defaults to COUNTOF, in which case numeric_col3 is not used. Possible operator_keywords include:
Unica Confidential
333
COUNTOF - returns the number of records at each intersection. COUNTZERO - returns the number of records at each intersection for which
numeric_col3 is 0.
COUNTNONZERO - returns the number of records at each intersection for which
numeric_col3 is not 0.
COUNTNULL - returns the number of records at each intersection for which numeric_col3 is NULL. MINOF - returns the smallest value of numeric_col3 at each intersection;
intersection.
STDEVOF - returns the standard deviation of all non-NULL numeric_col3 values at each intersection. Note
The XTAB macro function may take a long time to compute when data is large. A Computing... progress bar will be displayed until the computation is complete. If you decide to cancel the computation, click on the X in the progress bar and delete the function definition containing the XTAB macro function.
Examples TEMP=XTAB(V1,V2) Creates a series of rows and columns that compute the count of the distinct values in the intersections of columns V1 and V2. TEMP=XTAB(V4,V5, SUMOF V6) Creates a series of rows and columns that represent the intersection of distinct values of columns V4 and V5. The measure at each intersection is the sum of the values in column V6 for the rows corresponding to that intersection.
334
Unica Confidential
YEAROF
YEAROF
Syntax YEAROF(date_string [, input_format])
Parameters
date_string A text representing a valid date. input_format One of the keywords in the table below, specifying the date format of date_string.
Description
YEAROF returns the year as a number for the date specified by the
date_string. If input_format is not provided, the default keyword DELIM_M_D_Y will be used.
Examples YEAROF(31082000, DDMMYYYY) returns the number 2000.
For additional information on valid date formats, see DATE on page 116.
Related Functions
Function
DAYOF MONTHOF WEEKDAYOF
Description
Returns the day of the month as a number. Returns the month of the year as a number. Returns the day of the week as a number.
Unica Confidential
335
336
Unica Confidential
Index
??? in cells
55
A
ABS 59 ACOS 61 ACOT 63 Affinium Security Manager 17 Suite 15 Applications 16 Compatibility 18 Key capabilities 18 AND 66 ASIN 68 ATAN 71 AVG 74 AVG_DEV 77
B
BETWEEN 79 BIT_AND 80 BIT_NOT 82 BIT_OR 84 BIT_XOR 86 Blank cells 56 Boolean values BUFFER 88
141, 168
position 53 using two or more in a function definition 52 Cells blank 56 containing ??? 55 COLUMN 92 Column ranges using two or more in a function definition 52 Compatibility 18 Computation precision 37, 54 CONSTANT 94 Constants use in macro functions 35, 5354 Contact Unica 21 COS 96 COSH 98 COT 100 COUNT 102 COUNT_DIFF 103 COV 105 CURRENT_DATE 106 CURRENT_DAY 107 CURRENT_JULIAN 32, 47, 108 CURRENT_MONTH 109 CURRENT_TIME 109 CURRENT_WEEKDAY 111, 112 CURRENT_YEAR 112 CV_FOLDS 113
C
CEILING 90 Cell ranges keeping row-by-row results in the same row Affinium Macros Users Guide
D
Data mart 18 Data model 18
Unica Confidential
337
Index Data source Connectivity 18 Database Connectivity 18 DATALINK 115 DATE 107, 116 Date Formats 116 DATE_FORMAT 32, 33, 48, 120 DATE_JULIAN 121 DATE_STRING 122, 123 DAY_BETWEEN 124 DAY_FROMNOW 125 DAY_INTERVAL 126 DAYOF 127 DDELINK 127 DECIMATE 128 DELAY 130 DERIVATIVE 131 DIV 134
G
GAUSS 150 GAUSS_AREA 153 GE 156 GRID 158 Group_field 160 group_field 163 GROUPBY 160, 163 GROUPBY_WHERE 162 GT 164
H
having_value Help 21 HISTOGRAM
163 166
I
IF 168 IN 170 INIT 172 INT 173 INTEGRAL 175 INVERSE 177 IS 178 ISERROR 179 ISEVEN 180 ISMEMBER 182 ISODD 184
E
EMM see Enterprise Marketing Management Engineering macro functions 46 Enterprise Marketing Management 15 EQ 136 EXP 139 EXTRACT 140
F
FACTORIAL 143 Flat files Connectivity 18 FLOOR 144 FORMAT 146 FRACTION 149 Function definitions cell ranges and 33, 48, 49 cells containing ??? 55 column ranges and 33, 48, 49
K
Keyword 160 KURTOSIS 185
L
LAG 188 LE 190 LN 192
338
Unica Confidential
13
M
Macro functions cell ranges in 33, 48, 49 column ranges in 33, 48, 49 computational precision 37, 54 engineering functions 46 keeping cell ranges in same row position 53 math and trigonometric functions statistical functions 26, 30, 40 string macro functions 31, 47 Math macro functions 30, 45 MAX 203 MAXINDEX 205 MEAN 207 MERGE 210 MIN 212 MINUS 214 MOD 216 MONTHOF 219, 330, 335 MULT 219
P
PCA 253 PCA_FEATURES 255 PLUS 259 POSITION 257 POW 261 Precedence order of operators 13 Precision, computational 37, 54
30, 45
Q
??? in cells
55
R
RANDOM 263 RANDOM_GAUSS 265 RANK 266 REPEAT 268 Rolled_field 160 rolled_field 163 ROTATE_LEFT 270 ROTATE_RIGHT 272 ROUND 273 Row-by-row calculations keeping cell ranges in same row position 53 ROWNUM 275
N
NE 222 NORM_MINMAX 224 NORM_SIGMOID 229 NORM_ZSCORE 233 NOT 238 NPV 239 NUMBER 241
S
SAMPLE_RANDOM SELECT 277 SIGN 279 SIN 281
O
OFFSET 250 Online help 21
276
Unica Confidential
339
Index
SINH 283 SKEW 285 SLIDE_WINDOW 287 SORT 290 Spreadsheet computational precision SQRT 292 STAT 294 Statistical macro functions STDEV 296 STDV 296 STRING_CONCAT 299 STRING_HEAD 301 STRING_LENGTH 302 STRING_SEG 305 STRING_TAIL 307 SUBSAMPLE 308 SUBSTITUTE 310 SUBSTR 312 SUBSTRING 312 SUM 313 System requirements 19
16, 18
V
37, 54 26, 30, 40
VARIANCE
326
W
WEEKDAY 328 WEEKDAYOF 330
X
XOR 331 XTAB 333
Y
YEAROF
335
T
TAN 315 TANH 317 Technical support 21 TO 319 TOTAL 320 TRANSPOSE 322 Trigonometric macro functions TRUNCATE 323
30, 45
U
UDI see Universal Dynamic Interconnect Unica Affinium Suite 15 Contact information 21
340
Unica Confidential