How to create a basic CSV integration using database overrides Follow

Avatar

BarTender Content Team


Overview

CSV integrations are one of the simplest and most useful integrations. They require only a little bit of setup to get started. This type of integration uses the information from a trigger file to override the database attached to a label. Make sure to use the version dropdown at the top as UI may be different between BarTender versions.

If you are looking for similar integrations, see these other helpful tutorials:

Applicable to 

BarTender 2022 and later

Information

Setting up the label

First, begin by setting up the label file and connecting it to a dabase. You can use your own CSV or save this simple sample database in a text or CSV file:

  Name,Food,ID
Seagull Kitty Snax,cat treats,12334668
BarTender Dog Bones,dog food,25346489
  1. Create a new label and connect to the text database. If you're not familiar with the process, check out Getting started with database connections (Video - 5:20).
  2. In the toolbox (default location is on the left side of the UI), click the Data Sources tab.
  3. Click and drag a database field from this toolbox and drop it on the label design area. Repeat this for each database field you wish to add to the label.
  4. Save the label.

Creating the integration

For your integration, you will need a trigger file. The file must match the database format you used with the label. So a CSV trigger must match a CSV database and tab delimited database must have a tab delimited trigger. If you used the example above, here's a sample trigger file to use:

  Name,Food,ID
Seagull Seed Rings,bird food,1236468
  1. Open Integration Builder and select "Create New Integration."
  2. On the new integration dialog, select File Integration and click OK.
  3. First, set up how the integration will detect files by setting the scan folder. This is where your trigger files will be dropped and the integration will pick them up. For my example, I used a folder on the C drive. Avoid locations such as My Documents or the Desktop as it requires extra permissions to reach those locations.
    1. Click on the Location dropdown and select "Computer/Network"
    2. Use the Browse button to locate your folder or type the folder name.
  4. Change the File Pattern to match your file. I am using the default of .dat but you can use .txt, .csv, or any type you would like.

csv_scan_2022.png

  1. Scroll down to the bottom of this section. If you are using a *.txt file pattern, change the "After Detection" options to a different file extension so the integration will not repeatedly pick up the same file again and again.
  2. On the lefthand menu, click the Print Document action.
  3. In the Document section, select the document which will be printed when the integration triggers
    1. Click the 

csv_document_2022.png

  1. Click on the Print Options tab. Under the Database Overrides section, click the "Add database override" button. Change the Data Source to Variable. Select EventData on the Variable dropdown list.

csv_database_override_2021.png

  1. Save your integration.
  2. Click the Test Integration button on the toolbar at the top.
  3. Click the green Start button in the top right corner.
  4. In File Explorer, drag the CSV trigger file into the scan folder. The integration will trigger and a label will be printed.

Deploying the integration

After you've tested the integration, you want to deploy it into production.

  1. Click the Deploy tab then Deploy button on the top toolbar. If there are any changes, you will be prompted to save your integration file before continuing.
  2. Click the dropdown list and select "This Computer" to deploy locally. Click Next.
  3. Leave Deploy Now selected and click Finish.
  4. After a moment, the Administration Console will open and the integration will show as deployed and running.

csv_integration2.png

 

Applicable to 

BarTender 2021

Information

Setting up the label

First, begin by setting up the label file and connecting it to a dabase. You can use your own CSV or save this simple sample database in a text or CSV file:

  Name,Food,ID
Seagull Kitty Snax,cat treats,12334668
BarTender Dog Bones,dog food,25346489
  1. Create a new label and connect to the text database. If you're not familiar with the process, check out Getting started with database connections (Video - 5:20).
  2. In the toolbox (default location is on the left side of the UI), click the Data Sources tab.
  3. Click and drag a database field from this toolbox and drop it on the label design area. Repeat this for each database field you wish to add to the label.
  4. Save the label.

Creating the integration

For your integration, you will need a trigger file. The file must match the database format you used with the label. So a CSV trigger must match a CSV database and tab delimited database must have a tab delimited trigger. If you used the example above, here's a sample trigger file to use:

  Name,Food,ID
Seagull Seed Rings,bird food,1236468
  1. Open Integration Builder and select "Create New Integration."
  2. On the new integration dialog, select File Integration and click OK.
  3. First, set up how the integration will detect files by setting the scan folder. This is where your trigger files will be dropped and the integration will pick them up. For my example, I used a folder on the C drive. Type the folder name or use the Browse button to locate it. Avoid locations such as My Documents or the Desktop as it requires extra permissions to reach those locations.
  4. Change the File Pattern to match your file. I am using the default of .dat but you can use .txt, .csv, or any type you would like.

csv_scan_2016.png

  1. Scroll down to the bottom of this section. If you are using a *.txt file pattern, change the "After Detection" options to a different file extension so the integration will not repeatedly pick up the same file again and again.
  2. On the lefthand menu, click the Print Document action.
  3. In the Document section, select the document which will be printed when the integration triggers

csv_document_2016.png

  1. Click on the Print Options tab. Under the Database Overrides section, click the "Add database override" button. Change the Data Source to Variable. Select EventData on the Variable dropdown list.

csv_database_override_2021.png

  1. Save your integration.
  2. Click the Test Integration button on the toolbar at the top.
  3. Click the green Start button in the top right corner.
  4. In File Explorer, drag the CSV trigger file into the scan folder. The integration will trigger and a label will be printed.

Deploying the integration

After you've tested the integration, you want to deploy it into production.

  1. Click the Deploy tab then Deploy button on the top toolbar. If there are any changes, you will be prompted to save your integration file before continuing.
  2. Click the dropdown list and select "This Computer" to deploy locally. Click Next.
  3. Leave Deploy Now selected and click Finish.
  4. After a moment, the Administration Console will open and the integration will show as deployed and running.

csv_integration2.png

 

Applicable to 

BarTender 2019

Information

Setting up the label

First, begin by setting up the label file and connecting it to a dabase. You can use your own CSV or save this simple sample database in a text or CSV file:

  Name,Food,ID
Seagull Kitty Snax,cat treats,12334668
BarTender Dog Bones,dog food,25346489
  1. Create a new label and connect to the text database. If you're not familiar with the process, check out Getting started with database connections (Video - 5:20).
  2. In the toolbox (default location is on the left side of the UI), click the Data Sources tab.
  3. Click and drag a database field from this toolbox and drop it on the label design area. Repeat this for each database field you wish to add to the label.
  4. Save the label.

Creating the integration

For your integration, you will need a trigger file. The file must match the database format you used with the label. So a CSV trigger must match a CSV database and tab delimited database must have a tab delimited trigger. If you used the example above, here's a sample trigger file to use:

  Name,Food,ID
Seagull Seed Rings,bird food,1236468
  1. Open Integration Builder and select "Create New Integration."
  2. On the new integration dialog, select File Integration and click OK.
  3. First, set up how the integration will detect files by setting the scan folder. This is where your trigger files will be dropped and the integration will pick them up. For my example, I used a folder on the C drive. Type the folder name or use the Browse button to locate it. Avoid locations such as My Documents or the Desktop as it requires extra permissions to reach those locations.
  4. Change the File Pattern to match your file. I am using the default of .dat but you can use .txt, .csv, or any type you would like.

csv_scan_2016.png

  1. Scroll down to the bottom of this section. If you are using a *.txt file pattern, change the "After Detection" options to a different file extension so the integration will not repeatedly pick up the same file again and again.
  2. On the lefthand menu, click the Print Document action.
  3. In the Document section, select the document which will be printed when the integration triggers

csv_document_2016.png

  1. Click on the Print Options tab. Under the Database Overrides section, click the checkbox and keep the default option of "Integration Input Data"

csv_database_override_2019.png

  1. Save your integration.
  2. Click the Test Integration button on the toolbar at the top.
  3. Click the green Start button in the top right corner.
  4. In File Explorer, drag the CSV trigger file into the scan folder. The integration will trigger and a label will be printed.

Deploying the integration

After you've tested the integration, you want to deploy it into production.

  1. Click the Deploy tab then Deploy button on the top toolbar. If there are any changes, you will be prompted to save your integration file before continuing.
  2. Click the dropdown list and select "This Computer" to deploy locally. Click Next.
  3. Leave Deploy Now selected and click Finish.
  4. After a moment, the Administration Console will open and the integration will show as deployed and running.

csv_integration2.png

 

Applicable to 

BarTender 2016

Information

Setting up the label

First, begin by setting up the label file and connecting it to a dabase. You can use your own CSV or save this simple sample database in a text or CSV file:

  Name,Food,ID
Seagull Kitty Snax,cat treats,12334668
BarTender Dog Bones,dog food,25346489
  1. Create a new label and connect to the text database. If you're not familiar with the process, check out Getting started with database connections (Video - 5:20).
  2. Create a text object on the label design area.
  3. Right click on the label and select properties.
  4. Select the data source from the list. It'll say "Sample Text."
  5. Select the box next to Embedded Data and select Database Field from the list. Click next.
  6. Pick a field of your choice. Click finish.
  7. Add multiple text objects linked to database fields if you desire.
  8. Save the label.

Creating the integration

For your integration, you will need a trigger file. The file must match the database format you used with the label. So a CSV trigger must match a CSV database and tab delimited database must have a tab delimited trigger. If you used the example above, here's a sample trigger file to use:

  Name,Food,ID
Seagull Seed Rings,bird food,1236468
  1. Open Integration Builder and select "Create New Integration."
  2. On the new integration dialog, select File Integration and click OK.
  3. First, set up how the integration will detect files by setting the scan folder. This is where your trigger files will be dropped and the integration will pick them up. For my example, I used a folder on the C drive. Type the folder name or use the Browse button to locate it. Avoid locations such as My Documents or the Desktop as it requires extra permissions to reach those locations.
  4. Change the File Pattern to match your file. I am using the default of .dat but you can use .txt, .csv, or any type you would like.

csv_scan_2016.png

  1. Scroll down to the bottom of this section. If you are using a *.txt file pattern, change the "After Detection" options to a different file extension so the integration will not repeatedly pick up the same file again and again.
  2. On the lefthand menu, click the Print Document action.
  3. In the Document section, select the document which will be printed when the integration triggers

csv_document_2016.png

  1. Scroll down and under the Database Overrides section, click the checkbox and keep the default option of "Integration Input Data"

csv_database_override_2016.png

  1. Save your integration.
  2. Click the Test Integration button on the toolbar at the top.
  3. Click the green Start button in the top right corner.
  4. In File Explorer, drag the CSV trigger file into the scan folder. The integration will trigger and a label will be printed.

Deploying the integration

After you've tested the integration, you want to deploy it into production.

  1. Click the Deploy button on the top toolbar. If there are any changes, you will be prompted to save your integration file before continuing.
  2. Give the integration a name and description if you desire. If none are given, it uses the information from the integration file itself to fill this in.
  3. Click OK.
  4. After a moment, the Administration Console will open and the integration will show as deployed and running.

csv_integration2.png

 

Additional resources

 

Do you have feedback or questions on this article? We encourage you to post them on our Community Forums