AP Invoices
Agave Sync allows you to sync Foundation AP Invoices and Procore Subcontractor Invoices.
Agave Sync exports AP Invoices to Foundation in an Unposted status. To see the AP Invoice in Foundation, go to Foundation's Accounts Payable Enter Invoices form, then press Modify and Modify Unposted Invoices.
Visual Mapping
Video Tutorial
Enabling AP Invoices Sync to Foundation
Installation
Exporting AP Invoices to Foundation requires the a combination of Foundation's FSI Importer, ODBC access, and the Agave Connector.
Step 1: Download the FSI Importer
-
Log in to the Foundation Client Portal.
-
If you are a Foundation Cloud (Hosted) Customer, go to Resources-->Downloads. If you are a Foundation On-premise Customer, go to Resources-->Software Releases.
-
Select the download icon for the FSI Importer.
-
Once the file has downloaded, go to your Downloads folder and open the .exe file. This will start the installation process for the FSI Importer.
-
Finish the installation process.
Step 2: Set up ODBC access for the FSI Importer
To use the FSI Importer with Agave Sync, you will need to set up Microsoft Open Database Connectivity (ODBC) access to your Foundation instance.
Download and Install the ODBC Driver
- Go to the Microsoft website and download the Microsoft ODBC Driver for SQL Server 18 (x64)
- Double click on the msodbcsql.msi file that you downloaded
- This will open up an Installation Wizard, click Next
- Accept the agreement terms, click Next
- Select Client Components, click Next
- On the next screen, click Install
- You may encounter a User Account Control prompt, click Yes
- Click Finish to complete the installation of the driver
Configure the ODBC Driver
Make sure to open ODBC Data Sources (32-bit) when configuring the driver. Using the 64-bit version will lead to errors.
- Open the Start Menu and search “ODBC”, then open the ODBC Data Sources (32-bit) application
- Switch to the System DSN tab, click Add
- Select ODBC Driver 18 for SQL Server, click Finish
- In the Name and Description fields, enter the name of your Foundation database (usually looks like
Cas_xxx
). You will also need to enter the hostname and port for your Foundation server in the Server field.
- For hosted Foundation instances:
sql.foundationsoft.com,9000
- For on-premise Foundation instances: enter the hostname (this will be a domain or IP address) and the port that we are using to connect to your server (e.g.,
xxx.xx.x.xx,4243
)
- Select With SQL Server authentication using a login ID and password entered by the user, then enter the credentials for the Agave user you created into the Login ID and Password fields, click Next
- Check the Change the default database to checkbox, then type in your Foundation database name. Also, uncheck the Use ANSI nulls, paddings and warnings checkbox, click Next
- In the Connection Encryption dropdown box select Optional, click Finish
- Click Test Data Source... to test the connection
- If the test was successful, you will see this message, just click Ok to save the configuration
- If the test was unsuccessful then it is likely due to an incorrect password
- If you've confirmed that the password is correct, then complete steps 1-8 again and retry the connection test
Step 3: Set up the Agave Connector
-
Ask your Agave Account Manager for a link to the Agave Connector. Then download and install it.
-
Open the Agave Connector and press Add Account.
- Select Foundation as your Source System.
- Input details for your Foundation user you use in Agave Sync, and then press Test and Save. Note, these are the same credentials you used for connecting Foundation to Agave Sync.
- Notify your Agave Account Manager that you have completed the foregoing step and ask for an Account ID and Token. Input these details in the next screen and then press Test and Save:
- Notify your Agave Account Manager that you have completed the foregoing step. They will then be able to confirm that you can export AP Invoices to Foundation.
FAQs and Common Errors
How does Agave know which AP Invoice FSI Importer defaults to use?
Agave Sync references two locations to determine the FSI Importer defaults:
- For the Expense Ledger Account, Agave Sync uses the same Ledger Accounts references in Subcontracts and Purchase Orders (under System --> Controls --> P/S).
- For other defaults, Agave Sync references the AP Control file in Foundation (under System --> Controls --> A/P). These defaults include:
Default | Control File | Notes |
---|---|---|
A/P G/L Account | Control A/P File | - |
Cash G/L Account | Control A/P File | - |
Credit Card G/L Account | Control A/P File | - |
Discount G/L Account | Control A/P File | - |
Expense G/L Account | None - see Notes | Defaults to the Expense Ledger Account from the Purchase Order or Subcontract Line Item |
Division 1 | Control A/P File | - |
Division 2 | Control A/P File | - |
Division 3 | Control A/P File | - |
Division 4 | Control A/P File | - |
EFT G/L Account | Control A/P File | - |
Is Phase Enabled? | Control J/C File | - |
Lien Waiver Flag | Control A/P File | - |
Payment Type | None - see Notes | Always set to "Regular" |
Retainage G/L Account | Control A/P File | - |
Terms | Control A/P File | - |
Do I need to have the FSI Importer installed for AP Invoice syncs to work?
Yes. We leverage the same technology that Foundation uses for the FSI Importer as part of this sync.
Do I need the Agave Connector to be opened/minimized for AP Invoice syncs to work?
Yes - we recommend keeping it open and minimized.
Can I sync AP Invoices against Subcontract or Purchase Order Change Orders?
Yes insofar as you have the following setting in Controls-->P/S-->Invoicing enabled:
Is releasing retention supported?
No, releasing retention is not supported in sync for Foundation.
Error: No Ledger Account ID found for provided Foundation Cost Type.
Foundation requires a Ledger Account ID for AP Invoice line items. Since Procore does not have a Ledger Account field in Subcontractor Invoices, Agave Sync uses the value from the A/P Expense G/L field for the Cost Type (Cost Class). If this field is not populated, Agave Sync will generate an error.
What are Billing Periods and how do I add them?
You may receive an error like the following: [Procore Error] The project must have an open billing period (or admin can specify a period_id) to create an invoice
when attempting to import AP or AR Invoices to Procore.
To fix this error, you will need to create a "Billing Period" in the Project. For context, a Billing Period defines the billing cycle used by a project's team and invoice contacts on Procore's invoices and progress billings. In addition to defining the frequency of the billing cycle (for example, monthly or weekly), a billing period also defines the billing cycle's start/end date and the due date for the invoice or progress billing.
To learn more about adding Billing Periods to Procore, see Procore's guides on creating manual billing periods and automatic billing periods.
Note, we recommend creating these Billing Periods in your Project Template(s), so you do not need to add Billing Periods for each Project going forward.
Error: Missing Contract
This error occurs when the Subcontract or Purchase Order associated with the AP Invoice has not been synced to Procore.
To resolve this error, sync the Subcontract or Purchase Order associated with this AP Invoice.
If you do not plan to sync the AP Invoice or related Subcontract or Purchase Order, you can Ignore the AP Invoice record.
How are the subtotal and retention amounts calculated for each Line Item?
Subtotal Amount
Agave Sync calculates the subtotal for a Procore Subcontractor Invoice Line Item using this formula:
subtotal = total_completed_and_stored_to_date - total_completed_and_stored_to_date_from_previous
What this means:
total_completed_and_stored_to_date
is the cumulative value of work and materials completed and stored up to the current period.total_completed_and_stored_to_date_from_previous
is the cumulative value from the previous billing period.
The subtotal is the new work and materials completed/stored during the current period only (the difference between the current total and the previous total).
Retention Amount
Agave Sync calculates the retention amount for a Procore Subcontractor Invoice Line Item as:
retention = work_completed_retainage_retained_this_period + materials_stored_retainage_currently_retained + materials_retainage_retained_moved - materials_stored_retainage_previous_progress
What this means:
work_completed_retainage_retained_this_period
: the amount of retainage held from work completed in this billing period.materials_stored_retainage_currently_retained
: retainage held on materials currently stored (this period).materials_retainage_retained_moved
: retainage moved (for example, when stored materials are installed and the retainage category shifts).materials_stored_retainage_previous_progress
: retainage that was already reported in prior periods for stored materials (this is subtracted to avoid duplication).
This formula adds up all new retention for work and materials this period (including adjustments if materials have been moved into work-in-place) and subtracts any retention that’s already been accounted for in prior periods to ensure accuracy.
Error: This invoice could not be saved because a line item was over billed. Please adjust your billing amount
This error occurs when syncing an AP Invoice to Procore and the Line Item has been billed more than Scheduled Value amount.
To resolve this error, you would either need to not overbill the Scheduled Value amount or update your Procore Settings to allow for overbilling.
Updating your Procore Settings to Allow for Overbilling
To allow for overbilling of AP Invoice Line Item amounts in Procore, you will need to update two settings:
-
Company-level: from the Procore homepage, go to Admin->Project Settings->Defaults->Advanced Settings. Then uncheck Prevent Overbilling on All Projects and press Save Changes.
-
Project-level: from the Project homepage, go to Invoicing->Settings->Other. Select Allow subcontractors to over-bill and press Update.
We recommend enabling this setting on your Project Template(s) so it is applied to all new Projects.