Integrations & ERP Custom Fields / CSV Files & FTP

Import Invoice PDFs from FTP Server

YayPay can connect to your FTP server to import your Invoice PDFs into YayPay. As a result, YayPay will be able to show your Invoice PDF when you click on an invoice number or invoice record.

For more details related to imported invoice PDF layouts, see the Invoice View section.

To learn how to configure YayPay to connect to your FTP server, see the Connect YayPay to your FTP Server section.

Alternatively, you can integrate your Invoice PDFs into YayPay using an API. For an overview of available API methods, see the following sections:


Overview of Invoice PDF File Import Process

To ensure successful import of your invoice PDFs from your FTP server, review and follow the steps outlined below:

  1. Test your FTP connection by using an FTP client software and the user access credential that will be used for YayPay.

    Once logged in, check that you are able to move files on the server to another location.

  2. Create two folders at the root level of your FTP server called /pdf and /processed.

  3. Update your data preparation script to place Invoice PDFs into the /pdf folder on the FTP server.

  4. Give each Invoice PDF file in the /pdf folder a unique name following the {internalId}.pdf pattern, where the internalId refers to the invoice's internalId from your ERP system.

    This is the same internalId used for each invoice record in the invoice.csv file.

    During each sync attempt, YayPay will search for PDF files in the /pdf folder and will synchronize all PDF files available in the folder.

  5. Check your FTP server configuration and increase the file listing parameter which can limit the number of processed files:

    • The default FTP file listing may display up to 2000 files.

    • For the initial PDF file upload, increase this limit to display 8000-10000 files to ensure that all open invoices in YayPay have their corresponding Invoice PDFs.

    • You can decrease this parameter for the ongoing syncs as the number of new invoices may be lower.

    • YayPay will match the PDF file to the corresponding invoice record by using the internal ID in YayPay, and associate the file with the invoice. Therefore, the invoice record should be available in YayPay first.


    All invoice PDF files synced and successfully associated with the invoice records in YayPay will be moved to the /processed folder on your FTP server. This is to prevent duplicate uploads.

    YayPay will attempt to connect to your FTP server multiple times in a day. Any new or updated invoice PDF files placed in the /pdf folder will be synchronized during the next sync.

Delete

Tip

When preparing the invoice records in the invoice.csv and invoice PDF files, it is recommended to place the invoice.csv file at a different location within the zip file on your FTP server before uploading the invoice PDF files.

You can also generate the Missed PDFs Report from the Settings | Businesspage in YayPay. This report provides the following information:
  • The total number of open invoice/credit memo records in YayPay that are missing their corresponding Invoice PDF.
  • A list of each invoice/credit memo number and its date, allowing you to see the complete date range for these invoices/credit memos.


Delete

Note

We support the import of PDF files with no restrictions on file size.

Syncing Invoice PDFs from a Custom Folder

By default, the /<Polling Directory>/pdf folder is used as the source of PDF files. However, if this location does not suit your needs, you can define a custom location instead. This can be helpful if you:

  • Store PDF files for multiple YayPay instances in the same FTP directory.
  • PDF files are stored in a different location which is used by other business processes.


To sync invoice PDFs from a custom folder (in addition to the default /pdf folder):

  1. In YayPay, go to Settings | Integrations | CSV Connector Settings.

  2. Enter the path to the custom folder into the Custom PDFs Polling Directory field:

    For more details about custom directory, see the Overview of the Custom PDFs Polling Directory section.

  3. Fill in the other fields as described in the  Connect YayPay to your FTP Server section.

  4. Click CONNECT to confirm the settings.


Overview of the Custom PDFs Polling Directory

This section describes how to configure the Custom PDFs Polling Directory field and how it behaves.

  • The use of custom folder is optional.

  • Enter the absolute path to the PDF location into the Custom PDFs Polling Directoryfield:
    • The Connector will only sync PDFs from the directory specified by this path, not from any subfolders.

    • You can only configure one custom PDFs polling directory

  • When synchronizing PDF files, the connector searches for PDF files both in the main folder (/<Polling Directory>/pdf) and in the custom folder whose path is specified in the Custom PDFs Polling Directory field. As a result, YayPay will synchronize all PDF files found in these folders.

  • Once the PDF files are detected, their further processing is the same regardless of the file source.

Example  
This folder structure illustrates how to configure the custom folder as a source of PDF files.

  • The Biz1-Polling-Directory folder is the source of ZIP files for the current YayPay instance integration..
  • The /Finance Department/Finance_1_PDFs folder is the custom location of PDF files.

The sync searches for PDF files both in the main folder (/Biz1-Polling-Directory/pdf) and in the custom folder (/Finance Department/Finance_1_PDFs). YayPay will synchronize all PDF files found in these folders.

Once the PDF files are detected, their further processing is the same regardless of the file source.

Delete

Note

When importing your invoice PDFs from an FTP server, the following applies:
  • If the connector cannot access the defined folder on the FTP server, the sync fails and an error message received from the FTP server will be displayed.

  • During the sync, do not change the value of the Custom PDFs Polling Directory field or the given folder on the FTP server. Wait for the connector to finish the synchronization.

  • If an invoice PDF file with the same name is available in both directories (Polling Directory and Custom PDFs Polling Directory), the connector will sync it from a random directory.

  • If there is no PDF uploaded for the invoice, YayPay will display the invoice PDF using either the default template or the YayPay-generated Invoice PDF template.

Troubleshooting

If you do not see your uploaded Invoice PDFs in YayPay, review the following points:

  1. The FTP connection is not established or has encountered authentication errors.

    Action: Verify your FTP server and credentials, as well as your network and firewall configurations. You can find the list of YayPay's IP addresses in the Connect YayPay to your FTP Server section.

  2. The FTP user configured in YayPay does not have access to /pdf or /processed folders or these folders do not exist.

    Action: Create the required folders and grant access to them.

  3. The FTP user configured in YayPay has no right to move files within the FTP server.

    Action: Check the folder permissions on the FTP server and grant appropriate access as needed.

  4. The invoice PDF files have incorrect names, i.e. the file name does not match the invoice internal ID. Note that this is case-sensitive.

    Action: Examine your preparation script that created or named the invoice PDF files, prior to placing them on your FTP server.

  5. The internal ID provided does not correspond to any existing invoice record in YayPay.

    Action: Make sure that the invoice.csv file containing invoice data is uploaded to YayPay before trying to add the invoice PDF files.

Can't find what you need?

Contact our support team support@yaypay.com for help.