saratoga crm: custom criteria

36
Custom Criteria Kathy Farrell Senior Technical Support Specialist Saratoga CRM

Post on 20-Oct-2014

882 views

Category:

Technology


1 download

DESCRIPTION

Experience the new Custom Criteria feature of Saratoga Rich Client's Query Tool and Saratoga Thin Client's Reporting function. Users now have the ability to use SQL queries to create more complex search conditions.

TRANSCRIPT

Page 1: Saratoga CRM: Custom Criteria

Custom Criteria

Kathy FarrellSenior Technical Support Specialist Saratoga CRM

Page 2: Saratoga CRM: Custom Criteria

Agenda

• Meet the Support Team• Custom Criteria• Demo

2

Page 3: Saratoga CRM: Custom Criteria

Meet the Support Team

Page 4: Saratoga CRM: Custom Criteria

The Face Behind the Voice – San Jose

Praneetha

Sandy

Kathy

Catherine

Page 5: Saratoga CRM: Custom Criteria

The Premiers

Heidi & Tess

Anna

Catherine

Page 6: Saratoga CRM: Custom Criteria

Bangalore

Harish

ChandraSasi

Page 7: Saratoga CRM: Custom Criteria

Custom Criteria

Page 8: Saratoga CRM: Custom Criteria

Custom Criteria

• Enable SQL select criteria in queries• Available as of 6.7.8– Implemented in response to customer requests– Available in both Rich Client Query Tool and Thin Client

Reports• Test environment design implementation available

as of 6.7.7.106 (HF3) • Does NOT generate a schema checksum change!

Page 9: Saratoga CRM: Custom Criteria

Custom Criteria

• Enabled/Disabled via Avenue.config at the Central Database– Key = EnableCustomCriteria– Value = 1 to enable– Remove or comment out the key to disable

Page 10: Saratoga CRM: Custom Criteria

Rich Client Query Tool

New Tab

Page 11: Saratoga CRM: Custom Criteria

Thin Client Reports

New Tab

Page 12: Saratoga CRM: Custom Criteria

Schema Wizard Options

• Custom Criteria enabled via avenue.config:– 2 new Schema Options – New options use Authorization Codes for access

• If no Authorization codes are defined– Custom Criteria tabs in QT & Rpts not displayed– Access is not granted to any user

Page 13: Saratoga CRM: Custom Criteria

Schema Options

Page 14: Saratoga CRM: Custom Criteria

UAdmin

• User with Edit privilege

- Required for designing reports that utilize Custom Criteria

- Edit privilege automatically includes Execute

14

Page 15: Saratoga CRM: Custom Criteria

UAdmin

• User with Execute privilege only

- Can run existing reports- Ability to see but not edit the Custom Criteria statement- Ability to supply parameters as needed

15

Page 16: Saratoga CRM: Custom Criteria

UAdmin

• User with No privileges

- Reports containing Custom Criteria will “auto run”- User will not see the query dialog boxes at all

• User of type Casual Thin Client – Reports included in their Web Group or on their

dashboard will “auto run”– User will not see the query dialog boxes

16

Page 17: Saratoga CRM: Custom Criteria

Query Tool Report Setup

• Select the tables and columns for display• Use the Column Options to customize output

display– Headings, Counts/Subcounts, Repeat Duplicates …

Page 18: Saratoga CRM: Custom Criteria

Rich Client

Page 19: Saratoga CRM: Custom Criteria

Thin Client

Page 20: Saratoga CRM: Custom Criteria

Query Tool/Report Setup

• Any criteria entered under Column Options is ignored when Custom Criteria is used

Checked: Custom Criteria usedUnchecked: Column Options criteria used

Page 21: Saratoga CRM: Custom Criteria

Custom Criteria

SQL “Where” clause statement goes here

Page 22: Saratoga CRM: Custom Criteria

Description of SQL Criteria

Comment section for documentation or user instruction. Not passed to the db.

Page 23: Saratoga CRM: Custom Criteria

Parameters for users

Parameters (@NAME, @TYPE) can be set to assist users in defining criteria

Page 24: Saratoga CRM: Custom Criteria

Example

• Selects the columns defined in the query and appends the custom criteria as the “Where” clause in the SQL statement

SITE.Name In (Select top 25 A.Name From Site A WHERE A.NAME NOT LIKE '%?%' order by A.Name ASC )

Return 1st 25 Sites alphabetically, ignoring sites that contain ?

Page 25: Saratoga CRM: Custom Criteria

Where Clause editor

• When used, SQL statement issued by QT ends with the word “where”– Select NAME as C0, CITY as C1, STATE as C2, CUSTOMER_NO

as C3, ACCT_TYPE as C4, ACCOUNT_ID as C5 from dbo.SITE where

• Adds on the SQL statement entered into the Custom Criteria window:– SITE.Name In (Select top 25 A.Name From Site A WHERE

A.NAME NOT LIKE '%?%' order by A.Name ASC ) • Performs Results Order By based on column sort options

- Order by C0, C1, C2, C3, C4

25

Page 26: Saratoga CRM: Custom Criteria

Table/Column Names

• Table and Column names required– Cannot use Schema aliases– Cannot reference Meta or View columns

Page 27: Saratoga CRM: Custom Criteria

SQL Syntax …

• Any valid SQL operator can be used – LIKE clause (%jon%)– SUM– MAX

• Operations can be grouped using “And”, “Or” and “()” i.e. parenthesis etc.

• Saratoga does not check for SQL syntax– Cannot use * as wildcard– Errors are returned directly from the database

Page 28: Saratoga CRM: Custom Criteria

SQL Syntax

• Can reference database columns that are not part of the query results

Page 29: Saratoga CRM: Custom Criteria

Using SQL Subqueries …

• Subquery selects are based on child records: – Join the parent to the child record – Best to use the primary/foreign key fields – Requires use of SQL Table aliasesSITE.ACCOUNT_ID IN (SELECT ACCOUNT_ID FROM ORDERS O WHERE O.ACCOUNT_ID = SITE.ACCOUNT_ID AND O.ORDER_TOT > 10000)

Page 30: Saratoga CRM: Custom Criteria

Parameters

Parameters (@NAME, @TYPE) can be set to assist users in defining criteria

Page 31: Saratoga CRM: Custom Criteria

Using Parameters

• Enables an Administrator to define custom criteria, yet still allow a User to specify a criteria value

• Parameters – Must start with a @ sign– Must be single words, no spaces, no special characters– Must specify correct data type • Designer must know the datatype of the field used in criteria

Page 32: Saratoga CRM: Custom Criteria

Parameters

• Parameters and data types

Thin Client

Rich Client

Page 33: Saratoga CRM: Custom Criteria

Display Based on Security

Edit Rights (which includes Execute)

Execute only Rights

Page 34: Saratoga CRM: Custom Criteria

Demo

Page 35: Saratoga CRM: Custom Criteria

Demo

• Demo of both Rich and Thin Clients- Examples include:

- Top 25- Sites with No Contacts- Sites without Contacts of a certain Title- Sites with a specific Contact & all other Contacts for the Site- Records outside a range (not between)- Summing of child record values

36

Page 36: Saratoga CRM: Custom Criteria

QUESTIONS….