Ascora Booking Forms

Connecting Ascora with Formpiece

Formpiece connects to Ascora with an Integration Key you make in Ascora. The key is saved as an Ascora credential under Integration Credentials, and the Ascora booking forms use it to read your Scheduler and to make customers, sites, jobs and bookings in your Ascora account.

Before you start

  • Ascora has to be switched on for your Formpiece account. If it isn't, the Ascora Bookings settings page says "Ascora is not enabled on this account."
  • You need to be an Ascora Administrator. The key is made under Administration, Integrations & API, API Settings.
  • Decide whether to use a named key or the company key. A named key is limited to the access you tick, can be revoked without touching your other integrations, and ends on a date you choose. The company key, under Company Key on the same Ascora page, also works, but it can call everything, can't be limited and never expires. A named key can be revoked without affecting your other integrations.

Make the key in Ascora

  1. Log in to Ascora as an Administrator and open Administration, Integrations & API, API Settings.
  2. Under Integration Keys, click New Key.
  3. Give the key a Name, such as Formpiece. Two keys that still work can't share a name.
  4. Choose when it Expires. Formpiece warns you 30 days before a key expires, and a new key has to be made before it does.
  5. Under Access, tick these, which every booking form needs: Customers: Read, Customers: Write, Jobs: Read, Jobs: Write, Schedule: Read, Schedule: Write, Users: Read, Timesheets: Read, Settings: Read and Notes: Write.
  6. Also tick these if a form needs them. A form that takes a card, sends Ascora's payment link or books a quote fails without them: Notes: Read (for forms that ask for files), Quotes: Read and Quotes: Write (for forms that book a quote), Invoices: Read and Invoices: Write (for forms that take a card or send the payment link).
  7. Click Save. Ascora shows the key once. Click Copy to Clipboard, paste it into Formpiece as below, then click Done in Ascora.

The access list is the same one Test Connection checks, so the two can't differ. What each scope is used for is on Ascora credentials.

Save it in Formpiece

  1. On the left menu, open Integration Credentials.
  2. Click Create Integration Credential.
  3. Under Select Integration, pick Ascora.
  4. Give the credential a Name you'll recognise, such as the Ascora account it belongs to.
  5. Paste the key into Ascora API Key. A named key starts "ascora_". It is stored encrypted and is not shown again.
  6. Click Save. Formpiece checks the key with Ascora before it stores it. The page reopens as the saved credential, with Test Connection and Delete beside Save, and says "Ascora accepted this key" with the key's name in brackets.
  7. Click Test Connection at any time to check the key again.

The saved credential shows "Saved key:" with the key's name and the start of the key, and "Expires" with the date, or "Does not expire" for a key with no end date. For the company key it says "Saved key: the company key". The key box now says "Saved. Paste a new key to replace it". Leaving it empty and clicking Save changes only the name.

The credential is then chosen for the forms under Ascora Bookings, then Settings, then Ascora Credentials. See Choose the Ascora credential bookings use.

What the page warns you about

  • Expiry. Within 30 days of the date Ascora reported, the page says "This key expires in {n} days. Make a new one in Ascora before it does." After the date it says "This key has expired. Make a new one in Ascora and paste it in below." Nothing renews an Ascora key, so bookings stop reaching Ascora the day it ends.
  • Missing access. For a named key missing any scope every form needs, the page says "This key does not have all the access Formpiece uses." and lists what to tick. Only the scopes every form needs are warned about here. The rest depend on the forms, which the Ascora Bookings settings page checks.

Replace the key

Make a new key in Ascora with the same access, paste it into Ascora API Key on the credential and click Save. The old key stops being used as soon as the new one is stored. If the new key fails the check, the old one is kept.

Delete the credential

Click Delete and confirm "Are you sure you want to remove {name}?". Formpiece removes the stored key and then the credential. A credential can't be deleted while it is in use: the Ascora Bookings settings point at it and the account has at least one Ascora booking form, archived or not. The page then says "Could not delete Integration." Choose a different credential on Ascora Credentials, or delete the forms, and try again.

Deleting the credential doesn't revoke the key in Ascora. Revoke it there, under API Settings, if it should stop working.

When it goes wrong

Save is greyed out

Ascora API Key is empty. A credential with no key saved can't be saved without one. Paste the key in.

"Ascora did not recognise this API key. Check it was copied whole from Administration > Integrations & API > API Settings."

The key was mistyped or cut short. Copy it again from the screen Ascora shows once. If you closed that screen, make a new key.

"This Ascora API key has been revoked." or "has expired."

Make a new key in Ascora, paste it over the old one and click Save.

"Ascora refused this key because the Ascora account is locked, inactive or cancelled."

The Ascora account is the problem, not the key. It has to be sorted out with Ascora.

"Ascora is limiting requests from this account right now. Try again in a minute."

The Ascora account is over its request limit. Wait a minute and click Save or Test Connection again.

"Could not connect to Ascora."

The key couldn't be checked, so it wasn't saved. The message after it says why. "Ascora could not be reached. Try again in a minute." means Ascora, or Formpiece's connection to it, didn't answer.

Test Connection isn't there

It only appears on a saved credential that has a key. A credential with no key saved shows only Save and Delete.