tFLOW Documentation - 09c. tBot Guidelines - Actions

In this chapter:

Download Action

Action can be two types:

  1. tFlow (tBot is connecting to tFlow via http and is using the tFlow API to connect, publish the queues and exchange data)

  2. FTP (tBot can be used as FTP client to manage remote files)

How to connect tBot to tFlow

  1. Create a service user in tFlow

        a.  Login into tFlow with an account that has admin rights.  Go to Users and create a new account.
        b.  Name it "tBot" (without the quotation marks). 
        c.  Set is as an admin.
        d.  Assign it to the main instance company. 
        e.  Make sure the flags for "Auto-assign this user to new Orders" and "Auto-assign to new company" are checked.
        f.  In the email address field just enter a fake email address like "tbot@domain.net".
        g.  Disable all the email notifications for this user (Email alerts)!


    You could find additional information here:

    1. http://support.aleyant.com/kb/a937/how-to-connect-tbot-to-tflow.asp

  2. Login with tBot user in tFlow
        a. Click on the user avatar located in the upper right corner and then select "My profile"

        b. On the Profile tab, scroll to the bottom of the page and click on "Show API credentials"
        c. Copy the API key and the Secret key.

     
  3. Configure tBot download action:

  1. Choose “tFlow” as data source (default value)

  2. Enter tFlow server url to field 1(Example: http://testtflow.com:8080/ - only root url required)

  3. Enter API key

  4. Enter Secret key

  5. Choose “Download folder” - local directory for downloaded files (You can write it by hand or press F2/ellipsis to open directory selection)

  6. Choose interval to check new files on server

  7. Choose retrieve interval and attempts count

  8. You can group files in “Download folder” by customer’s names or order number. This means that tBot will create special folder for customer’s name or order in “Download folder” and put related files to this directory.

  9. Choose file type to download. You can select:

    1. Production (default value)

    2. Proof file

  10. Click “Test Connection”. You should see message that connection settings are valid.

How to connect tBot to FTP server

  1. Choose “FTP” as data source

  2. Enter FTP server url to field 1(Example: ftp.myserver.com - only root url required)

  3. Enter FTP port to field 3 (21 is default value for most of ftp servers)

  4. Fill remote path in field 4 to scan on FTP (for root path leave “/” value)

  5. Fill Login in field 5 or leave it blank to use Anonymous account

  6. Fill Password in field 6 or leave it blank to use Anonymous account

  7. Choose “Download folder” - local directory for downloaded files(You can write it by hand or press F2/ellipsis to open directory selection dialog )

  8. Choose interval to check new files on server

  9. Choose retrieve interval and attempts count

  10. Click “Test Connection”. You should see message that connection settings are valid.

 

How to config tBot batches

tBot allows to process multiple downloaded files at once. Batch parameters are configured in “Download” action and could be used for several integrations and all other actions. Integrations which support batches:

  • Impostrip integration
  • Ergosoft integration
  • Griffin integration
  • Phoenix integration

tBot supports three types of triggers. When trigger event occurs tBot process all files in batch at once.

How to config Fill flat trigger for batch

  1. Select “Fill flat” from trigger list

  2. Set maximum media size, when new downloaded file will exceed summary layout the trigger event will occur

  3. Set “Calculate flat include quantity” flag if you want to include quantity of copies from tFlow, otherwise each file will be calculated in flat only once

  4. Set maximum timeout for trigger event. In example below, event will be generated after 600 minutes from first file was included into batch.

How to config Time trigger for batch

  1. Select “Time” from trigger list

  2. Set maximum timeout for trigger event. In example below, event will be generated after 60 minutes from first file was included into batch.

How to config Job count trigger for batch

  1. Select “Job count” from trigger list

  2. Set maximum count of files to include into batch, when new downloaded file will exceed this quantity the trigger event will occur

  3. Set maximum timeout for trigger event. In example below, event will be generated after 30 minutes from first file was included into batch.

 

tBot integrations with third parties

Integration is available now only for tFlow data source. To configure integration you should make steps below:

  1. Choose destination system in list

  2. Fill required parameters

  3. You could find more information about settings and examples in related section of this document

 

Download Action

Action can be two types:

  1. tFlow (tBot is connecting to tFlow via http and is using the tFlow API to connect, publish the queues and exchange data)

  2. FTP (tBot can be used as FTP client to manage remote files)

How to connect tBot to tFlow

  1. Create a service user in tFlow

        a.  Login into tFlow with an account that has admin rights.  Go to Users and create a new account.
        b.  Name it "tBot" (without the quotation marks). 
        c.  Set is as an admin.
        d.  Assign it to the main instance company. 
        e.  Make sure the flags for "Auto-assign this user to new Orders" and "Auto-assign to new company" are checked.
        f.  In the email address field just enter a fake email address like "tbot@domain.net".
        g.  Disable all the email notifications for this user (Email alerts)!

    You could find additional information here:

     

    How to connect tBot to FTP server

    1. Choose “FTP” as data source

    2. Enter FTP server url to field 1(Example: ftp.myserver.com - only root url required)

    3. Enter FTP port to field 3 (21 is default value for most of ftp servers)

    4. Fill remote path in field 4 to scan on FTP (for root path leave “/” value)

    5. Fill Login in field 5 or leave it blank to use Anonymous account

    6. Fill Password in field 6 or leave it blank to use Anonymous account

    7. Choose “Download folder” - local directory for downloaded files(You can write it by hand or press F2/ellipsis to open directory selection dialog )

    8. Choose interval to check new files on server

    9. Choose retrieve interval and attempts count

    10. Click “Test Connection”. You should see message that connection settings are valid.

    How to config tBot batches

    tBot allows to process multiple downloaded files at once. Batch parameters are configured in “Download” action and could be used for several integrations and all other actions. Integrations which support batches:

    • Impostrip integration
    • Ergosoft integration
    • Griffin integration
    • Phoenix integration

    tBot supports three types of triggers. When trigger event occurs tBot process all files in batch at once.

    How to config Fill flat trigger for batch

    1. Select “Fill flat” from trigger list

    2. Set maximum media size, when new downloaded file will exceed summary layout the trigger event will occur

    3. Set “Calculate flat include quantity” flag if you want to include quantity of copies from tFlow, otherwise each file will be calculated in flat only once

    4. Set maximum timeout for trigger event. In example below, event will be generated after 600 minutes from first file was included into batch.

    How to config Time trigger for batch

    1. Select “Time” from trigger list

    2. Set maximum timeout for trigger event. In example below, event will be generated after 60 minutes from first file was included into batch.

    How to config Job count trigger for batch

    1. Select “Job count” from trigger list

    2. Set maximum count of files to include into batch, when new downloaded file will exceed this quantity the trigger event will occur

    3. Set maximum timeout for trigger event. In example below, event will be generated after 30 minutes from first file was included into batch.

     

    tBot integrations with third parties

    Integration is available now only for tFlow data source. To configure integration you should make steps below:

    1. Choose destination system in list

    2. Fill required parameters

    3. You could find more information about settings and examples in related section of this document

    Move Action

    This action allows to move and rename files from one directory to another.

    To configure move action you should make steps below:

    1. Add Actions to action list:

    1. Set action parameters:

      1. Set input folder. If you leave it blank files from previous step will be processed.

      2. Configure filter options. Only files that meet filter conditions in Input folder will be processed

      3. Set output folder – destination place for files.

    2. Filter option list:

      1. Match field:

        1. File name – search pattern in file name

        2. Extension – search patter in file extension

        3. File size – filter by file size

        4. File date– filter by file date

      2. Match type:

        1. Equal

        2. Not equal

        3. Contains

        4. Not contains

        5. Starts with

        6. Ends with

        7. Regex

        8. More/less than

        9. Between

      3. Condition value (or values for between type)

      4. Choose “Ignore case” if you want to make case insensitive filter for text match type

    3. Rename options (detailed description for rules you can find in section: “Configure Rules and Options”):

      1. Add text settings

      2. Replace text settings

      3. Add date or time settings

      4. Make sequential

    How to config tBot batches

    How to config Fill flat trigger for batch

    1. Select “Fill flat” from trigger list

    2. Set maximum media size, when new downloaded file will exceed summary layout the trigger event will occur

    3. Set “Calculate flat include quantity” flag if you want to include quantity of copies from tFlow, otherwise each file will be calculated in flat only once

    4. Set maximum timeout for trigger event. In example below, event will be generated after 600 minutes from first file was included into batch.

    How to config Time trigger for batch

    1. Select “Time” from trigger list

    2. Set maximum timeout for trigger event. In example below, event will be generated after 60 minutes from first file was included into batch.

    How to config Files count trigger for batch

    1. Select “Files count” from trigger list

    2. Set maximum count of files to include into batch, when new downloaded file will exceed this quantity the trigger event will occur

    3. Set maximum timeout for trigger event. In example below, event will be generated after 30 minutes from first file was included into batch.

     

    Copy Action

    This action allows to copy and rename files from one directory to another.

    To configure copy action you should make steps below:

    1. Add Actions to action list:

    1. Set action parameters:

      1. Set input folder. If you leave it blank files from previous step will be processed.

      2. Configure filter options. Only files that meet filter conditions in Input folder will be processed

      3. Set output folder – destination place for files.

    2. Filter option list:

      1. Match field:

        1. File name – search pattern in file name

        2. Extension – search patter in file extension

        3. File size – filter by file size

        4. File date– filter by file date

      2. Match type:

        1. Equal

        2. Not equal

        3. Contains

        4. Not contains

        5. Starts with

        6. Ends with

        7. Regex

        8. More/less than

        9. Between

      3. Condition value (or values for between type)

      4. Choose “Ignore case” if you want to make case insensitive filter for text match type

    3. Rename options (detailed description for rules you can find in section: “Configure Rules and Options”):

      1. Add text settings

      2. Replace text settings

      3. Add date or time settings

      4. Make sequential

    Delete Action

    This action allows to delete files from some directory.

    To configure delete action you should make steps below:

    1. Add Actions to action list:

    1. Set action parameters:

      1. Set input folder. If you leave it blank files from previous step will be processed.

      2. Configure filter options. Only files that meet filter conditions in Input folder will be processed

    1. Filter option list:

      1. Match field:

        1. File name – search pattern in file name

        2. Extension – search patter in file extension

        3. File size – filter by file size

        4. File date– filter by file date

      2. Match type:

        1. Equal

        2. Not equal

        3. Contains

        4. Not contains

        5. Starts with

        6. Ends with

        7. Regex

        8. More/less than

        9. Between

      3. Condition value (or values for between type)

      4. Choose “Ignore case” if you want to make case insensitive filter for text match type

     

    Upload Action

    Action can be two types:

    1. tFlow (tBot is connecting to tFlow via http and is using the tFlow API to connect, publish the queues and upload artworks.)

    2. FTP (tBot can be used as FTP client to upload files for remote folder)

    How to connect tBot to tFlow

    1. Create a service user in tFlow

      1. Login in tFlow with an account with admin rights then go to Users and create a new account.

      2. Name it tBot and set is as admin. Assign it to the main instance company and make sure the flags for "Auto assign this user to new Orders" and "Auto assign to new company" are checked.

      3. In the email address field just enter a fake email address like "tbot@domain.net".

      4. Disable all the email notifications for this user (Email alerts)!

    1. Login with tBot user in tFlow

      1. When logged in click on top right on the user avatar then select "My profile"

      2. Scroll the profile page to bottom and click on "Show Api credentials"

      3. Copy the 2 API and Secret key (we will use at next step).

    2. Configure tBot upload action:


     

    1. Choose “tFlow” as data source (default value)

    2. Enter tFlow server url to field 2(Example: http://testtflow.com:8080/ - only root url required)

    3. Enter API key

    4. Enter Secret key

    5. Choose interval to check new files on server

    6. Choose retrieve interval and attempts count

    7. Click “Test Connection”. You should see message that connection settings are valid.

     

    How to connect tBot to FTP server

    1. Choose “FTP” as data source

    2. Enter FTP server url(Example: ftp.myserver.com - only root url required)

    3. Enter FTP port (21 is default value for most of ftp servers)

    4. Fill remote path to access on FTP (for root path leave “/” value)

    5. Fill Login or leave it blank to use Anonymous account

    6. Fill Password or leave it blank to use Anonymous account

    7. Choose interval to check new files on server

    8. Choose retrieve interval and attempts count

    9. Click “Test Connection”. You should see message that connection settings are valid.

     

    Configure source folder

    1. Set action parameters:

       

      1. Set input folder. If you leave it blank files from previous step will be processed.

      2. Configure filter options. Only files that meet filter conditions in Input folder will be processed
         

    2. Filter option list:

      1. Match field:

        1. File name – search pattern in file name

        2. Extension – search patter in file extension

        3. File size – filter by file size

        4. File date– filter by file date

      2. Match type:

        1. Equal

        2. Not equal

        3. Contains

        4. Not contains

        5. Starts with

        6. Ends with

        7. Regex

        8. More/less than

        9. Between

      3. Condition value (or values for between type)

      4. Choose “Ignore case” if you want to make case insensitive filter for text match type

     

    Configure upload parameters

    If you use tFlow data source, you will be able to upload artworks for jobs. To do this you need to meet a few conditions:

    1. Job should be in “Waiting for Artwork” or “Waiting for Revision” state

    2. File name of pdf file should be equal to existing job or if you set “Create order if not exists” should be equal to a new order/job name.

    3. You need to fill parameters:

      1. Select instance user, this user will be assigned to Job. The artwork will be uploaded to job under this user.

      2. Select product, this value needs for order/job creation.

      3. Select date increment – this is count of day from upload date. This value will be used for Ship date field of new job/order

    Print Action

    This action allows to print file which was process on a previous step.

    To configure print action you should make steps below:

    1. Add Actions to action list:

    1. Select printer:

     

    Transfer Action

    This action used to transfer files between tBot instances, so they need to be on different servers. First of all you need to configure sender instance and then receive instance.

    Sender instance

    To configure sender instance you should make steps below:

    1. Add Transfer action to action list on sender server:

    1. Set action parameters:

    1. Choose server type: “Sender”

    2. fill server address field with ip – address of receiver instance

    3. Configure connection options: check interval and retries on failure

    4. Click “Test connection”(Receiver instance should be online)

    5. If you see error message, please check:

    • Receiver instance is online.
    • Ip – address is correct and available
    • Check you brandmauer or antivirus, tBot use port 10456 to communicate between instances – this port should be opened for incoming and outgoing connections
    1. Save queue

    Receiver instance

    To configure receiver instance you should make steps below:

    1. Add Transfer action to action list on sender server:

    1. Set action parameters:


     

    1. Set server type to “Receiver”

    2. Choose sender from list

    3. Set folder for incoming files

    4. Configure connection options

    ​​​​3. Save queue
     

    Configure Rules and Options

    Adding Name Settings

    1. Click “Add” button and select “Name Settings”

    1. Fill filter parameters(When) and action (Then)

      1. Match field:

        1. File name – search pattern in file name

        2. Extension – search patter in file extension

        3. File size – filter by file size

        4. File date– filter by file date

      2. Match type:

        1. Equal

        2. Not equal

        3. Contains

        4. Not contains

        5. Starts with

        6. Ends with

        7. Regex

        8. More/less than

        9. Between

      3. Condition value (or values for between type)

      4. Choose “Ignore case” if you want to make case insensitive filter for text match type

      5. Fill text what you want to add to filtered files

      6. Select position:

        1. Before file name

        2. After file name

        3. As new file extension

    1. Click “Remove rule” to delete option

     

    Replace Text Settings

    1. Click “Add” button and select “Replace text settings”

    1. Fill source text parameters(When) and new text parameters (Then)

      1. Select replace parameter:

        1. Full name – search source text in full file name

        2. Base name  - search in base name, without extension

        3. Extension – replace only in extension

     

    Date or Time Settings

    1. Click “Add” button and select “Date or time settings”

    1. Fill filter parameters(When)

    1. Match field:

      1. File name – search pattern in file name

      2. Extension – search patter in file extension

      3. File size – filter by file size

      4. File date– filter by file date

    2. Match type:

      1. Equal

      2. Not equal

      3. Contains

      4. Not contains

      5. Starts with

      6. Ends with

      7. Regex

      8. More/less than

      9. Between

    3. Condition value (or values for between type)

    4. Choose “Ignore case” if you want to make case insensitive filter for text match type

    1. Fill Action parameters(Then):

      1. Choose Date type:

        1. Created –Date, when file was created

        2. Modified – File Last updated date

        3. Last opened – Date, when file was opened last time

        4. Current – Current system time, when file will be processed

      2. Select date format:

        1. Month Day Year – default value

        2. Year Month Day

        3. Day Mont Year

      3. Select place to add date time:

        1. Before file name

        2. After file name

        3. As new file extension

      4. Choose date delimiter:

        1. Space

        2. Underline

        3. Dash

        4. Forward slash

        5. None  - without delimiter

      5. Set leading zeros to True is you want to full date time mask (For Example 20160101 instead of 201611)

     

    Make Sequential Settings

    1. Click “Add” button and select “Make Sequential”

    1. Fill filter parameters (When). File will be processed if file with the same name exists in destination folder or file matches filter parameters.

    1. Match field:

      1. File name – search pattern in file name

      2. Extension – search patter in file extension

      3. File size – filter by file size

      4. File date– filter by file date

    2. Match type:

      1. Equal

      2. Not equal

      3. Contains

      4. Not contains

      5. Starts with

      6. Ends with

      7. Regex

      8. More/less than

      9. Between

    3. Condition value (or values for between type)

    4. Choose “Ignore case” if you want to make case insensitive filter for text match type

    1. Fill Action parameters(Then):

      1. Select place to add counter:

        1. Before file name

        2. After file name

        3. As new file extension

      2. Choose start number – 0 is default

      3. Choose delimiter:

        1. Space

        2. Underline

        3. Dash

        4. Forward slash

        5. None  - without delimiter

      4. You can pad all numbers to same length by adding number of digits(For Example if us set value to 3, first sequence will be 001)

     

    Job Settings

    1. Click “Add” button and select “Job Settings”

    1. Fill filter parameters (When). This option is available only for tFlow data source.

    1. Match value:

    • Job name – source files will be filtered by job name
    • Job description – source files will be filtered by job description
    • Job notes – source files will be filtered by job notes
    • Print width – source files will be filtered by job parameter: print width
    • Print height – source files will be filtered by job parameter: print height
    • Quantity – source files will be filtered by job parameter: quantity
    1. Match type:

    • Equal
    • Not equal
    • Contains
    • Not contains
    • Starts with
    • Ends with
    • Regex
    • More/less than
    • Between
    1. Condition value (or values for between type)