How To Create and Update a CSV Adapter

Written By Ed Kinne

Last updated 11 months ago

This article will review the basics of creating a CSV Data Adapter

This article reviews a specific data adapter. For more general information see

Data Integration and Data Adapters

How To Add Data To A Layout Or Message

CSV Data Adapters use a CSV File stored in your Korbyt Media Manager to create a data table that can then be used to display or control information in Korbyt. The information is then updated by importing an updated CSV File into Korbyt in a way that overwrites the old file

Step 1 - Import the CSV Data File into Korbyt

  • On your computer, create the CSV data file using your application of choice

    • Be sure to save the file in CSV format

  • Import the CSV File to your Korbyt Media Manager

Step 2 - Creating the CSV Data Adapter

Once the CSV file is in the Korbyt media library, you can create the adapter.

  • If not already in the Integration section, open the Mega Menu, then in the Advanced section click Data Integration

  • In the Upper right click Create Adapter

  • You will be required to name your Adapter (description is optional, but can be helpful to other users if the name is not clear)

  • And click the Template icon in the middle, and click Next

  • On the next Screen, Adapter Configuration, you will have a Left and Right Side

    • On the Left Side, use the Drop-Down to select CSV Adapter, and the view will change

    • On the left, you can configure several options

      • Allow edit data in preview (yes/no)

        • Yes, will allow for manual adjustment of the final data table inside of Korbyt

        • If the adapter continues to run, these edits will be overwritten when the adapter updates

      • Operational Hours

        • The days and times the adapter will run to gather new data from the source

      • Customer Execution Scripts

        • Adding any required, Pre-Execution Script, Pre-Insert/Update Script, Pre-Delete Script, Post-Execution Script

    • On the Right, you will configure the details of the adapter itself

      • Use the Media Library File to select the CSV file that has been uploaded to the Media Manager

      • Set the Data delimiter character, String quote character, and String escape character for your data table

        • If you do not use customer values, leave them at their defaults

      • Refresh interval sets how often the adapter reviews the CSV file for new information

    • You will now need to define the Data Base Table Columns, and the type of information each column will hold

    • Click Defining the DB Table to create the structure for your database

    • When you click save, you will see that the Define DB Table has gone green

  • Optional Steps include Configuring User Permissions and Adapter Restart by clicking those steps at the top

  • Once configured click Save & Create, you will see a dialog box that will tell you the progress of starting up the Adapter

You now have a Data Adapter that periodically scans the CSV File for information and puts that information into a data table

Viewing the Data Table

With the Adapter created and running, you can view the data table by clicking on the eyeball Icon

Updating and Changing The Data

Uploading a New File

Uploading a New CSV File will update the information in the adapter when it runs
Remember you set an interval for the data adapter to update, so the new information will not appear in the table until the adapter interval runs

If the new CSV File is not uploaded correctly, it will not replace the old file, and data will not update

To Upload a New CSV File

  • Update the CSV File on your Computer

    • Keep the Same File Name as the original that was uploaded

  • In Korbyt Media Manager, locate the folder that holds the Original CSV File

  • Click Import Media

  • BEFORE SELECTING THE FILE FROM YOUR COMPUTER - Click the Overwrite File if it Already Exists check box

  • Now select the new file by browsing or dragging and dropping

  • Click Save

You will see that you still have only 1 CSV file with data in the Media Manager

If you wish to force the adapter to run now and update the information you can navigate to the CSV Adapter and deactivate , then reactivate it.

Changing the Adapter to Examine a New File

If the original CSV File is deleted from the Media Manager, or you simply wish to link the adapter to a new file you can edit the adapter to look at the new file.

To Change the CSV File that Adapter Uses

  • Locate the CSV Adapter

  • Click the Green Active Toggle to Deactivate it

  • Click the Pencil Icon to Edit the Adapter

  • Click Next on the Adapter name Screen

  • In Adapter Configuration, click Media Library File

  • Select the new file from the media manager

  • If this was the only change, Click Save & Create

  • A warning will tell you that existing data will be removed from the table

  • Click Yes, the data will be refilled when you

  • Click - Activate - for the adapter to restart it

  • You can now click the Eyeball Icon to view the new data table

Adding Additional Columns of Information to the Adapter and CSV File

Adding Additional Columns to the data table will require you to edit the CSV Data Adapter, specifically the DB Table configuration, to add the new column.

To Change the CSV File that Adapter Uses

  • Locate the CSV Adapter

  • Click the Green Active Toggle to Deactivate it

  • Click the Pencil Icon to Edit the Adapter

  • Click Next on the Adapter name Screen

  • In Adapter Configuration, click Define DB Table

  • If this was the only change, Click Save & Create

  • A warning will tell you that existing data will be removed from the table

  • Click Yes, the data will be refilled when you

  • Click - Activate - for the adapter to restart it

  • You can now click the Eyeball Icon to view the new data table

CSV File Best CSV Files Structure

  • The CSV File expects Comma Separated values and you should not use other delimitation marker

  • As a best practice there should be a unique value for each entry (row) to be able to use as the primary key value

    • This could be an employee ID or email, a Queue ID value, or an incremented number so each row is unique in some way the system can see