Supercharge HR with AI for instant, scalable support and time-saving automation. Learn More!
Unlock valuable insights – Register for our upcoming webinars now!

FreshBooks-ClayHR Integration

ClayHR’s integration with FreshBooks provides the ability to sync "Clients/Accounts" from your Freshbook with ClayHR, the system syncs and automatically creates a “Client” entity in FreshBooks. It also allows creating an invoice in FreshBooks from the invoice function in ClayHR.

I. Linking FreshBooks and ClayHR

  • Setup FreshBooks in Third-Party Integrations
  • Getting information from FreshBooks:
  • Separately, in a different tab, sign in to your account on Freshbooks.com and navigate to the Setup menu
  • Get the appid and apptoken for your account (using get/generate buttons)
  • Linking Freshbooks in your ClayHR account:
  • Go to the top right "Setup" menu and scroll down and click on "Third Party Integrations": Setup-> Third-Party Integrations
  • On the Third-Party Integrations page, click on the button “New Integration” and choose "FreshBooks"
  • In the field "Host" specify your FreshBooks URL
  • Fill in the fields "appid" and "apptoken" with the corresponding information taken from your FreshBooks account
  • (User + password are not needed in case of FreshBooks integration)
  • Configure required custom fields in ClayHR:
  • Create a “Contact”  for Accounts:
  • Go to the top "Allocations" menu and click on "Accounts"
  • On the accounts, the home page, click on the "New Contact" link to create a contact. This contact's email will be required to create customers in Freshbooks.Note: If the contact does not have an email linked to it, then the account will not get created in Freshbooks.
  • Create a “Freshbooks.client.id” custom field for Accounts:
  • Go to the top right "Setup" menu and scroll down and click on "Organization Setup"
  • Now click on "Custom Field" link under Custom Fields Configuration
  • Click on "Add New" and create a new custom field called: “Freshbooks. client.id”
  • In the "Object Type" menu, select "Account"
  • (Optional) Create a “freshbooks.client.outstandingBalance” custom field for Accounts (follow instructions for previous steps)
  • (Optional) Create a “freshbooks.client.overdueBalance” custom field for Accounts (follow instructions for previous steps)
  • Create a “freshbooks.invoice.id" custom field for Invoice:
  • Go to the top right "Setup" menu and scroll down and click on "Organization Setup"
  • Now click on "Custom Field" link under Custom Fields Configuration
  1. Click on "Add New" and create a new custom field called: “freshbooks.invoice.id”
  • In the "Object Type" menu, select "Invoice"

II. Automatic Client Creation from ClayHR Account

Note: FreshBooks “clients” are treated as “Accounts” in ClayHR

This BizMerlin- FreshBooks integration allows to sync the creation of “Clients/Accounts”: when you create an “Account” entity in ClayHR, the system syncs and automatically creates a “Client” entity in FreshBooks.  FreshBooks API is available at https://www.freshbooks.com/api/clients

  1. Option 1: Creating New "Accounts” in ClayHR and syncing with “Clients” in FreshBooks
  2. In ClayHR go to the top menu “Account” and click “New Account”
  3. Fill in all the required fields except for "freshbooks.client.id”. When your new account is saved in ClayHR, the system will automatically create a new client in FreshBooks
  4. The Client ID generated by FreshBooks will automatically be pulled to ClayHR’s Account field
  5. Option 2: Creating ClayHR new accounts with existing clients in FreshBooks
  6. If the client already exists in FreshBooks (and therefore already has a client ID) go to the top menu “Account” and click “New Account”
  7. To link the existing client in FreshBooks with the Account in ClayHR, fill in the “freshbooks.client.id” with the corresponding FreshBooks client ID  and save the Account.
  8. If for whatever reason, you don’t want to create a client in FreshBooks for a particular Account in ClayHR, then simply fill in the “freshbooks.client.id” field with “0”.  BM will not create a new client in FreshBooks. BM will leave the value of 0 in that field.

Failure Conditions

  • If you do not supply a contact email, client creation will fail in FreshBooks.
  • If the freshbooks.clientemail is not unique, client creation will fail in FreshBooks.

Success Outcome

  • If the client successfully gets created in FreshBooks, then ClayHR will store the value received from FreshBooks in Freshbooks. client.id

III. Automatic Invoice Creation from ClayHR Project Invoice

The main purpose of this flow is to create an invoice in FreshBooks from the invoice function in ClayHR.

  1. Create a project invoice in ClayHR just like you would manually, or through the recurring schedule.
  2. When an invoice is created in BizMerlin, ClayHR will automatically create that invoice in FreshBooks.
  3. ClayHR stores the FreshBooks invoice id in the invoice as freshbooks.invoice.id field.

IV. Automatic Account Balance and Past Due Update

ClayHR retrieves the account balances every 24 hours and updates the optional custom fields with that information.

V. Update expense/invoice

This is not currently supported.  If you want to modify an invoice, you need to modify it directly in FreshBooks

VI. Other Items

In case we want to adjust the amount of invoice we can do this through invoice.update call.

  • Invoice list for customer on-site administration page through invoice.list call
  • We will use the client_Id generated by freshbooks at the time of customer creation to fetch the list of invoices for that customer with the status of those invoices. We will give the link of payment along with the above-calculated amount from where the user will be redirected to freshbooks gateway where he can use his credit card for payments.
  • Redirecting user back to application after payment. [This option is provided in the invoice. create API call]

Register for Upcoming Webinars