Build your first add-on

Ask your AI for the add-on in plain words. The more it knows about who uses it and where, the better the first draft:

  • What it does. "Shows the job's billing lines with a running total."
  • Where it lives. A button on the job, an Add-ons page (under Account, Addons), or automatic.
  • Who uses it. The office on the web, techs in the app, or both.

If you leave out where it should live, your AI asks first. That is deliberate: it is the decision that shapes everything else.

Example prompts

Build me a ServiceM8 add-on called Job Pulse: a button on the job that shows the job's status, client, address and description in one popup. Web and app.
 
When a job's status changes, add a line to the job diary saying what it changed to. No buttons, just automatic.
 
Build a Quick Quote button on the job: list the job's billing lines with a running total, and an "Add line" button that adds 1 hour of labour at $120.
 
Hide any job file whose name starts with PRIVATE from the job diary. Add a Curtain button on the job where business owners can see and restore hidden files, and an Add-ons menu page where they set the rules.

What happens next

  1. Your AI reads FloConnector's built-in guide to ServiceM8 add-ons, and the parts of ServiceM8's API the add-on needs.
  2. It writes the add-on and saves it as a draft. Nothing reaches ServiceM8 yet.
  3. FloConnector checks the draft and shows a review: where the add-on will appear and what it will be able to do.
  4. You try it in the preview and ask for changes. Each change is saved as a new draft.
  5. When it does what you want, you tell your AI to deploy it.

The review

Every draft comes back with a review in plain words. For Job Pulse it reads:

Where it appears:
- Job button "Job pulse" (web)
- Job button "Job pulse" (app, under More)
- Runs automatically when a job's status changes
 
What it will be able to do in ServiceM8, on its own, every time it runs:
- read jobs
- read clients
- add job diary entries

Read the second list carefully. Whatever an add-on is allowed to do, it can do every time it runs, for as long as it is deployed, without anyone in the chat.

What FloConnector checks

A draft is refused, with the reason, if:

  • it isn't a valid ServiceM8 add-on, or a button or menu entry isn't wired to anything;
  • it asks for a permission that isn't on the list below;
  • the code doesn't compile as a single file, or loads a package (an add-on can only use what is built into Node, which includes making web requests);
  • an icon isn't a public https:// image.

It is saved with a warning if the code uses data its permissions don't cover (those calls would fail once it is live), or if it would write something sensitive to its logs. Your AI sees every reason and fixes the draft.

Permissions

An add-on asks for its permissions up front, and gets exactly those. FloConnector only allows the ones below, and your AI should only ask for what the add-on uses.

AreaPermissions
JobsRead jobs · Change jobs · Create jobs
ClientsRead clients
Job contactsRead job contacts · Change job contacts
BillingRead job billing lines · Change job billing lines · Read job payments
Schedule and staffRead the schedule · Read staff · Read staff security roles
HistoryRead job email history · Read job SMS history
Notes and diaryRead job notes · Add job notes · Add job diary entries
FilesRead files and photos · Archive, change or add any file or photo
NotificationsSend staff push notifications
The add-on's own memoryRead its own saved settings and notes · Save its own settings and notes

Two are worth a second look when you see them in a review:

  • Archive, change or add any file or photo covers every file in the account, not only the ones on the job the add-on was opened from.
  • Change jobs lets the add-on edit any field on any job.

Some ServiceM8 permissions aren't available to add-ons built here at all, including sending emails and SMS, staff locations and managing staff.

Icons

Every button and menu entry shows an icon. Your AI uses, in this order:

  1. Your logo, if you give it a link to one. It must be a public https:// image, ideally square and at least 256 pixels.
  2. The icon from your website, such as yourbusiness.com/apple-touch-icon.png, once you have confirmed it.
  3. FloConnector's icon, if you have neither. The review says when it used it.

ServiceM8 can't use an image stored inside ServiceM8 itself, because it has no permanent public link for uploaded files, so the icon has to live on a website. Changing an icon later is a new deploy.

Names

Every add-on built here has a short name starting flc-, such as flc-job-pulse. It identifies the add-on for good, so your AI keeps it when it changes the add-on. The name your team sees on the button is separate, and can change whenever you like.