Do you store print job requirements for customer orders within a database or MIS? If so, you have a virtual goldmine of information that can be used to drive automatic file processing.
Enfocus Switch and the Database Module can process jobs automatically using values from your database or MIS. Jobs can be resized, preflighted and more based on their corresponding job ticket info.
Enfocus Switch is compatible with Mac and Windows and with its user friendly “workflow” builder, it will take you less than 30 minutes to create a database-enabled automation flow that will give you extra time to focus on new prospects.
How Does It Work?
The Enfocus Switch Database Module provides direct ODBC communication between any SQL datasource and Enfocus Switch without the need for additional scripting. More info about the Database Module can be found here.
Setting up a DSN
You will have to setup the DSN on the host system to make the communication possible between Enfocus Switch and your database.
The DSN (Data Source Name) combines the database hostname or IP, the username and password credentials for the relevant database hosted on the database server and the ODBC (Open DataBase Connectivity) driver that permits communication with the specific database architecture, e.g. MS SQL, MySQL, FileMaker, Excel, etc.
An important point to note regarding database security is that all database interaction governed by the DSN uses the privileges assigned to the username associated with the DSN. This means if a given user’s privileges are read-only, then the DSN will only allow read-only connections to the database. Conversely, if a user is given read/write, update and delete privileges by the database administrator, then the DSN will permit those operations as well.
When setting up a DSN, you will need to install the appropriate driver for Mac or Windows.
Here is an example of an ODBC driver for Mac: http://www.actualtech.com/product_opensourcedatabases.php
Here is an example of an ODBC driver for Windows: https://docs.microsoft.com/en-us/sql/connect/odbc/windows/microsoft-odbc-driver-for-sql-server-on-windows?view=sql-server-2017
Or the following MySQL driver exists for both platforms and others: https://dev.mysql.com/downloads/connector/odbc/
Note: If you are planning to connect with FileMaker then you will need the ODBC driver that works with the exact version of your FileMaker Server!
Now that your driver is installed, open the ODBC Manager (Mac) or ODBC Data Source Administrator (Windows).
You might have to install it on Mac, you can find the installer here: http://www.odbcmanager.net/
Once installed, go to the “System DSN” tab (not the User DSN tab) and click on the “Add” button.
ODBC Data Source Administrator (Windows)
If the installation of your driver was successful, then you will see it listed in the following panel. Select it and click on “OK” to continue.
ODBC Data Source Administrator (Windows)
You will then get into the DSN configuration panel. Click on “Continue” to go to the next panel.
Name your DSN. Click on “Continue”.
Select the server you want to connect to, fill in the other details and “Continue”.
Select the database to connect to and click on “Continue” to go to the final summary panel.
Just one panel on ODBC Data Source Administrator (Windows)
After that, you will go back to your ODBC Manager main panel and you are all set.
Now you can go to Enfocus Switch and configure the preferences.
Enfocus Switch Preferences
Once you have the DSN setup, you can go into your Enfocus Switch preferences and make a connection to your datasource.
Click on the button with the three dots on the left to define your ODBC data source.
Create a new ODBC data source for use within Switch by clicking on the + button. Fill in the necessary information and select the DSN that you have created on your system using the driver you downloaded. Note that the database user account you utilize when setting up the DSN has whatever access given to that user by the Database Administrator. This means that Switch honors all privileges assigned to the user and can restrict this user to only read only access or provide the ability to read, write, update and delete.
You can also test your connection at this point to see if Enfocus Switch and your database can communicate—this is a real time-saver, so give it a go!
Example Flow Using Database Data
We are going to submit a job through an Enfocus Switch Submit point (via the Switch Web Portal). We will attach the sheet-size (pulled from the database using the name of the job) and, at the same time, we will enter an email address that will be inserted into the database. We will then attach color details to the job and send the job to the correct press using database information.
Where Can You Insert Database Queries in a Switch Flow?
Metadata fields from Submit point
When configuring your Submit Point, you’ll see there is an option to access the result of an SQL query when submitting your job using “Define single-line text with variables”. (See this article for more information on how to add metadata fields). This will allow you to build an SQL query that will select required information from your database at the time of job submission.
Note how the “Read only” property is set to YES above.
To build the SQL query, follow the arrows below!
When building the SQL query, you can either use the built-in wizard or you can use manual query editing. This lets you create your queries in other SQL utilities and then copy them into the SQL Query Editor in Switch. Once you have a working query in Switch, you can use Switch variables to dynamically populate the values you need per job in your database or MIS.
The following screenshot shows what you will see if you choose to use the wizard. (Note that you can test your query result while configuring it—another great time saver).
With your query built (or manually created) your next step (see next screenshot) is to click on “Insert variable” or “Update variable” to store that variable, depending on whether you are updating a variable or creating a brand new variable. Click “OK” to fully save your query and variables.
With these steps complete, your Submit Point will query your database and display the results of the query in a dropdown in your user’s job submit browser window—pretty cool!
Database Flow Element
Enfocus Switch can also read from and write to a database within a flow. A job hitting the Database flow element will trigger the query.
In this flow “Add email” is the Database flow element. Configuration is simple and as follows:
Again, we’re going to use “Define multi-line text with variables” to create a dynamic query (one that queries based on the current job’s properties).
In the query below, you can see how we UPDATE the database with the email address from the submit element and we match the ‘number’ info to the job name to know which record to update. (See this article with steps on how to access your data through the Metadata variable group in Enfocus Switch.)
When creating your query, pay close attention to the style of the quote marks (as per below).
Action Any Flow Element That Allows You to Work With Variables
In this sample we will use the Rename job element and add a suffix to the job name that is the result of a SELECT query. Again, follow the steps below to configure the rename job element with a database SELECT value. You can write the query manually or use the Query Builder wizard again.
Finally, in our example, we want to route the job to the correct press. Again, we use the database information to set up a variable that will be assessed in a condition that decides the routing.
We create our SQL statement to query the database in the same way as was previously illustrated. We then use the returned result within the condition. In this case, it is compared to the two presses we run: Indigo1200 or Indigo7900.
And that’s it! Your jobs will be processed and routed according to the data from your database.
For further information, you can also watch this video from Enfocus.
Click on the following QT – Database.sflow to download the flow we used in this article. You will need to modify quite a few parameters, but it will at least get you started!
Benefits of the Database Module
There are many benefits to being able to use information stored in a database. On a technical level, the Enfocus Switch Database model frees you from needing to know how to write complex scripts while still integrating your database to do some amazing automation! You’ll only have to configure the requirements for your job once, and after that all the other decisions and steps are done automatically.
And there’s a great deal more to discover about Enfocus products, so if you’d like to learn more, please contact us today.
Need Help Getting Started?
We offer free workflow evaluations for new customers so you have nothing to lose!