You are on page 1of 27

Continuing GoldMine Education : June 2012

Prepared by Justin Hill For /

The Search Center Automated Processes SQL Queries Dashboards

Page 1 of 27

The Mild Mannered GoldMine Search Center

just add a phone booth We all know that Searching for Contacts is the most important thing we will ever do in our GoldMine; everything we choose from the top-level menu in some way affects the Current Contact Record. Consequently, using the Search Center has become second nature. We click over to look for someone, then back to the Contact Record and hardly ever think about it. So, it was easy for Frontrange to sneak in several amazing enhancements under the radar. So, we present The Top 5 Things the GoldMine Search Center can Do but is Never Asked To #5 - List more than 10,000 records Those of you who have tried and given up on using the Search Center for looking at more than the default 10,000 records, rejoice! The 10,000 record limit can now be increased on a per-system level. 1. Log in as the MASTER user or equivalent 2. Go to Tools | Configure | System Settings from the top level menu 3. Click the Display Tab

Increase both values to the desired amount.

Note: Increasing these values may impact the performance of your Search Center. Page 2 of 27

#4 - Accessing your Filters and Groups Did you know that you can Preview any of your Filters or Groups within the Search Center? Simply click on the Filters/Groups button to open the Filters and Groups tree view on the left hand side;

Click this button to reveal/hide the Filters and Groups Tree.

Navigate to the Filter/Group youd like to Preview and double click it.

When you double-click to Preview a Filter or Group, you may get this message;

Clicking Yes will allow you to provide a Filter Optimization (using a Beginning and Ending limit). This is entirely optional, and if youre not sure how to use a Filter Optimization, simply click No. Once the Filter/Group is Previewed, we can see so in the tab of the Search Center;

To release your Previewed Filter in the Search Center, simply close the Tab.

Page 3 of 27

#3 - Using the Multi-Level Search You can search on more than one field by clicking the plus sign in the upperright hand corner of the Search Center. This will add a level to your Search Criteria.
Click the + to add a level, the - to remove a level.

You can see here that each level allows you to search on a field. In this case, Im looking for Customers in New York State.

Every level has a connector, which is defaulted to AND. OR is also available.

Every field on the Contact Record is available through this drop-down.

All of your favorite operators are available from the drop downs (begins with, equal to,etc).

Incidentally, you can now save your multi-level Search as a Filter or Group by clicking your Save button.
Selecting Filter or Group will allow you to create and name a new Filter/Group against the same criteria as used in the Search Center.

Exporting to Excel, Word or the Clipboard here is exactly the same as the right-click Output To functionality found in the other areas of GoldMine.

Page 4 of 27

#2 - Adding columns What good does all this fancy list-generating do you if you cant see the desired columns? Maybe you need a list with the Customer Type, perhaps you need one with Acct Rep listed. In either case, it is now easy to add columns to your Search Center. Adding columns is a per-user setting.
Click the Columns button to display the Select Browser Columns window.

Go to the Column Selection tab to add columns.

Add columns from the left (available) to the right (selected) by using the arrow keys in the middle.

You can re-order the columns you select by using the Up and Down buttons.

Page 5 of 27

#1 - Right-click Output To When you think about it all, the ability to customize columns, search criteria, save search criteria for later use, all of these great amazing things allow us to do one thing; create a list. Create lists easily, and now, easily get them into Excel. Anyone who has been using GoldMine for awhile now knows about the rightclick Output To functionality. Its available in virtually every list control within GoldMine. Invoking this item dumps all the rows out of whatever youre looking at in GoldMine, into Excel.

So, by using the five previous steps, we should be able to easily; Use the Search Center to create a custom filter Add any columns youd like List more than 10,000 records at a time Export the final list to Excel

Page 6 of 27

Automated Processes
Drip marketing through the firehose GoldMine Automated Processes Let us consider what a GoldMine Automated Process is. Simply, it is a list of instructions that will be carried out against a Contact Record. This would include things like Schedule a Call, or send an E-Mail. In the nutshell, an AP is attached to a Contact Record. Once attached, it must be scanned, during which time the AP runs through its instructions. To illustrate how this works, well imagine were creating a Prospect Welcome AP. This AP will send a series of marketing e-mail templates to the attached contact, waiting a few days to pass between the sending of each. The easiest way to see how this works is to create one! Select Tools | Automated Processes | Manage Processes from the top level menu.

This is the Automated Processes (AP) center. To get going and create a new AP, right click and select New.

Page 7 of 27

Like most things in GoldMine, this uses a Wizard interface.

Give your Automated Process a friendly name. The Process Code is optional.

Make sure to check Allow only one attachment of this process, otherwise you could have Prospects with multiple Prospect Welcome APs

We also want to make sure that Users can attach this AP.

Page 8 of 27

The Events window is where we will spend most of our time. These are the instructions the AP will carry out for every contact it is attached to. To start creating an Event, click New.

Every AP Event is comprised of a Description, a Trigger and an Action. In this case we want our AP to send a series of E-mails, so the Trigger for our first event is Immediate. This means the Action is performed right away, when the AP is scanned.

Page 9 of 27

Note weve selected E-mail message as our Action. Clicking in the Options button will reveal the detail on which template to use:

Hit OK to proceed. You can see now we have one Event within our AP.

Page 10 of 27

Our Trigger is now set Lets to Elapsed Days, as we just want the Process to wait a few days before sending our second Prospect Email.

add another e-mail to be sent, two days after the first. Click New again.

We want to send yet another e-mail message so we have this selected again.

Dont forget to check your options for the E-mail message. In this case youll notice Ive selected a different e-mail template:

Page 11 of 27

So now we start to get a sense of how the AP is going to work. First, it will immediately send our first email. Then it waits two days before sending the second.

Lets add yet another e-mail to our list of Events.

Our trigger is still set to Elapsed Days. This means that the Process will wait two days after the last Event before this Event is triggered.

Page 12 of 27

This is how our third Event looks:

And here is our resulting list of Events:

Page 13 of 27

At this point, we need to mention the two major Types of Events we can have within our Process. To this point, weve been adding Sequential Events. This means the Events happen in a sequence. When a Process is scanned, it goes to the next Sequential Event in the list and, depending on the Trigger, executes it. The other Type of Event is Preemptive. All Preemptive Events are evaluated every time a Process is scanned. These events are also scanned before the Sequential. So, a good use of a Preemptive Event is to check and see if our Prospect has become a Customer, and if so, remove the Prospect AP. Click New to create yet another Event:
Make sure you select Preemptive.

Our Trigger is going to be a dBase condition (simply, we are looking for a certain value in a field).

This Event will Remove the current Automated Process if the dBase Condition is satisfied.

As with virtually every kind of Trigger, we must specify the Options by clicking on the Options Button, shown here:

Use this expression builder just as you would if you were making a Filter. In this case, were checking to see if our Prospect is now showing Customer in the Customer Type field.

Page 14 of 27

So now our Process looks like this:

Every time this Process is scanned, it checks to make sure if the record is a Customer yet. If not, it goes to the next Sequential Event in the list.

Go ahead and Finish out the Wizard. Your Process should look like this now:

Page 15 of 27

Executing your Automated Process Once you are happy with your Automated Process, you need to Attach and Scan it! To do this, select Tools | Automated Processes | Execute Processes.

This is where it all happens, the Execution window. This is where you Attach your Process and also scan it to move it along that list of Events.
You can choose to add the Process to a certain subset of records, using a GoldMine filter.

Make sure you select the Process youd like to attach to these records. If your Processes are already attached, you can leave this alone.

Page 16 of 27

SQL Queries
Seriously getting the ducks in a row

Fun Facts about SQL

Designed by IBM in 1974 Standardized in 1986 by ANSI Takes a fraction of the time to run compared to xBase and Filter expressions Enjoys long walks on the beach

The main point here is that SQL has been in use since the old days, and consequently, there is no more powerful way to ask questions of a SQL database. The syntax is not exactly user-friendly but is well worth the effort to learn. Plus, existing queries can be re-used by tweaking field names and values rather easily.

Underlying Tables
For a full description of your GoldMine tables, please consult the appendices of your User Manual. I will outline the three we will be using below: CONTACT1 Primary contact data CONTACT2 User-defined fields CONTHIST Contact history data

The mighty SELECT Statement

At the core of every SQL query for GoldMine is a SELECT statement. That is to say, wed like to SELECT only certain rows from the underlying tables. Not only that, we will need to tell it FROM which table we want to SELECT. We will also need to provide a list of field names to SELECT FROM the underlying table. So, SELECT CONTACT FROM CONTACT1 Will return every contact name in our database. SELECT CONTACT, COMPANY FROM CONTACT1 Will return both the contact and company names in our database.

Page 17 of 27

The WHERE Clause

Well, this is all well and good, but doesnt do us much in the way of Filtering customers. Thus, the WHERE clause was born. So, now we can tell it to only SELECT only those rows WHERE something is true. Example: SELECT CONTACT, COMPANY FROM CONTACT1 WHERE STATE = CA Will only return those customers in the state of California, much like our Filter did. Now lets get fancy: SELECT CONTACT, COMPANY FROM CONTACT1 WHERE STATE = CA AND KEY1 = Prospect Will only return those customers that are both in California and Prospects. (KEY1 is the underlying field name of our CustType field again an excellent time to open your appendices and see what columns are available)

A brief word about Boolean Logic

When you start using words like AND and OR, youre using Boolean Logic. Which only means that the statement you are working with is going to be TRUE or FALSE. Pay attention to how much of a difference ONE AND or OR can make: SELECT CONTACT, COMPANY FROM CONTACT1 WHERE STATE = CA OR KEY1 = Prospect Will return all records that are EITHER in California OR Prospects. This will be a greater number than the query above, because the query only cares that EITHER of the conditions are met.

Page 18 of 27

Using both ANDs and ORs

In typical usage, both ANDs and ORs are used within the same query, insulated from each other by parentheses. By inserting parentheses, we can exert flow control over our logic. They behave exactly the same way they did in high school trigonometry. For instance: SELECT CONTACT, COMPANY FROM CONTACT1 WHERE (STATE = PA OR STATE = NY) AND KEY1 = Prospect Will return Prospects from both Pennsylvania or New York. SELECT CONTACT, COMPANY FROM CONTACT1 WHERE (KEY1 = Prospect OR KEY1 = Customer) AND STATE = NY Will return both Prospects and Customers from New York only. Whats happening here is that the server is rendering each enclosed portion into an ultimate TRUE or FALSE statement. Only then does it run that value against the next part of the query. Here is a gotcha: SELECT CONTACT, COMPANY FROM CONTACT1 WHERE KEY1 = Prospect AND KEY1 = Customer This query returns no rows because it is impossible for a contact to be BOTH a Customer AND a Prospect!

Page 19 of 27

ORDERing rows returned by your Query

You can sort the output of any query by using the ORDER BY clause, added to the end of a query. For example: SELECT CONTACT, COMPANY FROM CONTACT1 WHERE STATE = PA AND (KEY1 = Prospect OR KEY1 = Customer) ORDER BY COMPANY ASC Will return the expected results, only sorted by Company is ascending mode. You could have alternatively used: ORDER BY COMPANY DESC To sort in descending order. Multiple levels of sort can be used, thusly: SELECT CONTACT, COMPANY, STATE FROM CONTACT1 WHERE STATE = PA AND (KEY1 = Prospect OR KEY1 = Customer) ORDER BY COMPANY, CONTACT ASC Returns the expected results, sorted by Company and then Contact, ascending order.

Using more than one table in a query

It is often the case that a single query runs against more than one table. In that case, the tables must be JOINED. This is in fact such a simple little word for such a fascinating (and frustrating) concept. The best part is that you can benefit from the samples I am going to provide here. The scope of this manual is not as such that could encompass all the many forms of JOINS and why they are used. Being able to JOIN tables requires that you know their PRIMARY KEYS and now would be an excellent time to open up that ol appendix and see whats what.

Page 20 of 27

JOINing CONTACT2 to get Userdefined fields

Youve created all those nice user-defined fields, so lets start using them! For the purposes of these examples, we will consider the user-defined fields named UPRODUCT (Product Interest) and USIZE (Company Employee Size). Let us further say that UPRODUCT can hold one of two values, Widget or Gadget. And let us suppose that USIZE is a raw number of employees, from 1 to 100.

Here is how our JOIN will look within the query: SELECT CONTACT, COMPANY, UPRODUCT, USIZE FROM CONTACT1 INNER JOIN CONTACT2 ON CONTACT1.ACCOUNTNO = CONTACT2.ACCOUNTNO WHERE CONTACT = Justin Hill Notice the join is provided BEFORE the WHERE clause. Please also note the usage of TABLENAME.COLUMN, which is also common to see within queries that deal with more than one table. Ok, here is a query that will return all records that have Widget in UPRODUCT and more than 50 employees. SELECT CONTACT, COMPANY, UPRODUCT, USIZE FROM CONTACT1 INNER JOIN CONTACT2 ON CONTACT1.ACCOUNTNO = CONTACT2.ACCOUNTNO WHERE UPRODUCT = Widget AND USIZE > 50 Of course you can insert parentheses and ORDER BY as above. The important part is to get your JOIN working for you. Lets get fancy and tap both tables for a condition:

SELECT CONTACT, COMPANY, UPRODUCT, USIZE FROM CONTACT1 INNER JOIN CONTACT2 ON CONTACT1.ACCOUNTNO = CONTACT2.ACCOUNTNO WHERE KEY1 = Prospect AND UPRODUCT <> Gadget AND USIZE > 75 This returns all records that are Prospects and do NOT have Gadget listed as a product interest and have more than 75 employees.

Page 21 of 27

Using subqueries and CONTHIST

The most common use of CONTHIST (Contact History) in SQL Queries is to either find out if they have no history, or no history within a certain range of days. This is done by sub-querying. Dont be frightened! This is actually easier than joining! A common query to find out records that have no history: SELECT CONTACT, COMPANY FROM CONTACT1 WHERE ACCOUNTNO NOT IN (SELECT ACCOUNTNO FROM CONTHIST) ACCOUNTNO as you may have guessed, is our PRIMARY KEY for GoldMine. The query is asking the server to return all records that have no corresponding rows in the history (CONTHIST) table. `This query returns those records that have no history within the last 90 days. SELECT CONTACT, COMPANY FROM CONTACT1 WHERE ACCOUNTNO NOT IN (SELECT ACCOUNTNO FROM CONTHIST WHERE ONDATE > (SELECT GETDATE() - 90) The important part of this query is of course the (SELECT GETDATE()) function, which always returns the current date. We then subtract 90 days from that date using the subtraction operator; (SELECT GETDATE() 90). Of course you can use both joins and sub-queries together. Good luck!

Page 22 of 27

Creating a Simple GoldMine Dashboard

Doing it for yourself A Very Simple Dashboard We in the industry are all very excited about the Dashboard capabilities in GoldMine 9. It is something that is not only very useful, but incredibly flexible. Therefore, we will only be covering a basic Dashboard in this manual, both a Data Grid and Chart view. Once you get the hang of it, there is much more to explore. The Parts of a Dashboard When we think of a GoldMine dashboard, we must understand the constituent parts: Dashboard : The highest level object, think of it as a blank page to put stuff on. A Dashboard is nothing but a collection of Controls. Control : Controls are objects which are dragged onto the Dashboard, and display data. An example of a Control would be a Chart or a List of records. Data Source : What underlies each Control, and provides data to the Control.

Designing Your Dashboard To access your Dashboards in GoldMine, select Go To | Dashboards. Youll notice in the top left corner you can navigate through the canned dashboards. These are actually quite useful and can give you a good idea of what is possible. To get into Design mode, click the New Dashboard button at the bottom of the Dashboards list.

Page 23 of 27

Adding a simple Grid When working in the Dashboard designer, you drag Controls from the Palette pane into your work area. Go ahead a drag a Table View into your workspace.

Now, each Control (like the Table View we just dragged into our Dashboard) has a set of Properties, which are accessed from the Properties pane on the right.
You can change most of the cosmetic aspects of how the Control is displayed. Use the Data Binding browse button to bind data to this Control.

Page 24 of 27

However, before the Table View will show us any information, we must Bind it to a Data Source. Click on the browse button next to Data Binding. This is where everything happens; all the heavy lifting that a Dashboard does.
Select a Data Category. In this case we simply want a list of records. You must add items to the Bound Fields list to see them in the Table View.

Column Properties are available for each field. Most useful is the Visible checkbox, which can hide system columns not relevant to the end user.

At this point you can actually hit Ok, then click the View button to see your Dashboard in action.

So, true to its name, the Table View gives you, well, a Table View.

Page 25 of 27

Adding a simple Chart Much in the same way we added our Table View, go ahead and drag a Chart control onto your Dashboard. Just like you did for the Table View, click the Data Binding browse button. Then go to the Details tab.
The data source must be slightly different from the Table View source as we want summarized values (in this case a count). Multiple series are an advanced function, illustrating the fact Dashboards are quite flexible.

As a Chart is a Summary, you must select what to summarize the data by. In this case we are using SOURCE. We also need to specify the Summarized Values as the Items_Count.

Page 26 of 27

So this is the finished product. Looks a little rough around the edges, but hopefully you get the idea.

Page 27 of 27