Application / Business & Account Settings

PDFs from Emails

Scrape PDFs from Emails

To extract templates, PDF attachments, and credit memo PDFs within the emails, set up the PDFs from Emails functionality in YayPay. 

We recommend using a different PDF mailbox rather than your standard AR mailbox so that you can separate your end-customers emails, and the emails containing the invoice template/PDF or credit memo PDF as attachments.

Every 10 minutes, YayPay connects to the mailbox and extracts the Invoice PDF attachment from the new emails for today or goes back to the last 3 days (if the appropriate Business Setting is enabled). After that, the PDFs get linked to the invoice records in YayPay (or credit memos) obtained from the ERP. The Email Subject line must follow a prescribed format explained later.

1) Go to Settings > PDFs from Emails

2) Enable the Scrape Invoice and Credit Memo PDFs from Emails checkbox

3) Enter the details. They can be obtained from your internal IT department or Infrastructure Team. 

  • Protocol - choose one: IMAP or IMAPS
    (IMAPS is the recommended option, especially for Gmail)
  • Host - e.g. imap.gmail.com or outlook.office365.com
  • Port - e.g. 143 or 993
  • Username/Password -  e.g. obtain this from your internal IT department (this is the same user credentials to log into the mailbox directly)
  • Load period (months) - use "12"
  • Sender email - an additional setting that allows to filter received emails and pull files received only from a particular email address
  • Use TLS - set as specified by your IT department Infrastructure Team or e-mail service provider. Optional security setting. 
  • Inbox Folder (Inbox by Default) - see the section below
  • Do not use customer ID - an optional setting that may be enabled if invoice PDF files are sent in an email to this inbox where the Subject line is not expected to contain the customer ID (see illustration below)

4) Click Save and test connection to test and validate that YayPay has an established connection with this email Inbox. A successful message will appear when a connection is made.

5) Ensure email subjects adhere to the following patterns for the PDFs to be scraped:

  • For an email with an invoice PDF attached- Use the following email subject pattern:
    • Pattern:
      Customer id:'CustomerId', Invoice id:'InvoiceNumber'
    • Example:
      Customer id:'001C000001RUK2IlAH', Invoice id:'INV006843'
Delete

Info

The following list explains the values you must use in the email subject:

  • CustomerId - A unique customer ID from your ERP system.
  • InvoiceNumber - The number of the invoice to be scraped.

YayPay extracts the invoice PDF attachment, ensuring that the invoice record within YayPay maintains the same visual appearance as the original PDF.

  • For an email with a credit memo attached - Use the following email subject pattern:
Customer id: 'customerid', Reference Num: 'refnum' Credit Memo

Pay attention to the 'Credit Memo' keyword at the end of the pattern. It is a case-sensitive flag that signals a credit memo should be extracted.

The scraped credit memo PDFs are displayed in the Open Credits tab of the Statement page:

Using Subfolders (in your designated PDF email Inbox)

This section is only relevant if you choose to use a subfolder within the mailbox, which needs to be configured in YayPay.

These are the 2 additional steps required if you use a subfolder, instead of the Inbox as the default folder:

  • first, you have to create a named subfolder (e.g. YayPay Invoice PDF) under the main Inbox
  • also, you must set up a new email rule/filter in Outlook or Gmail to move all sent emails into the subfolder

If you use Outlook and use a subfolder, the Inbox Folder should be configured as follows:

If you use Gmail and use labels to label the emails sent from Intacct (e.g. Accounting is the first label followed by YayPay Invoice PDF), the Inbox Folder should be configured as follows:

 

Check if the “PDFs from Emails” setup was successful

The outcome of the setup described above can be checked as follows.

for invoices:

  • Choose one of the recently created open invoices from the Statement page or Invoices page
  • Click its reference number
  • You should see your version of the Invoice Template/PDF open up on a new page, instead of YayPay's generic layout. If you don’t, ensure that the checkbox in your Business Settings page (Settings > Business) called "Invoice Page – Embed Invoice PDF" is enabled (also, refer to this article)
  • The ability to view your Invoice Template/PDF in YayPay indicates that YayPay is successfully connected to the PDF mailbox, and can extract the corresponding Invoice Template/PDF sent as an email attachment
     

for credit memos:

  • Select a credit memo record from the OPEN CREDITS tab of the Statement page
  • Click its reference number
  • You should see the credit memo PDF open up on a new page

 

Additional info

Can't find what you need?

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