You can extend the ServiceM8 platform in a number of different ways, depending on the goals you want to accomplish. The types of add-ons supported are:
The simplest integration type is to simply connect to the REST API using your ServiceM8 username and password (via HTTP Basic Auth) and read and write data. This is useful for one-off integrations or scripts developed for one company.
Once you have signed up for a ServiceM8 Developer account and created a Store Item (i.e. Add-on) in the Developer menu of your account, your Add-on will receive an App ID and App Secret for OAuth 2.0 Authentication.
Integrations using OAuth can access all ServiceM8 APIs, including the REST API, Webhooks API, etc. You'll need to manage user accounts yourself, but we can optionally manage billing if you don't already have a billing system set up.
If you want to extend the ServiceM8 UI to add buttons or menu items, you'll need to use the Add-on SDK. The main requirement is that you describe your add-on in a Manifest file. This specifies the buttons and/or menu items required and tells ServiceM8 how to invoke your addon.
Using the Add-on SDK, you can also take advantage of Serverless OAuth, which means that ServiceM8 issues you a temporary OAuth token each time a user needs to invoke your add-on's functionality. This means you don't need to implement the OAuth access token flow or manage user accounts at all -- you simply use the temporary token to authenticate the user for that one specific task.
There are three ways you can use the Add-on SDK:
- Simple Function Add-on
You provide your Lambda function code, we manage everything else. Server infrastructure is provided by ServiceM8, and we'll invoke your Lambda function in response to events that happen in ServiceM8 (webhooks or UI clicks).
- AWS Lambda Function Add-on
For more advanced Add-ons, you can host a Lambda function in your own AWS account. This allows you to integrate other AWS services such as DynamoDB or S3. Once you grant ServiceM8 the required permissions, we'll invoke your Lambda function in response to events that happen in ServiceM8 (webhooks or UI clicks).
- Web Service Hosted Add-on
If you already have server infrastructure set up, you can define a callback URL that ServiceM8 will call instead in response to events that happen in ServiceM8 (webhooks or UI clicks). Your app will receive event information as a JWT signed with your App Secret.
Refer to the Examples page to see what's possible with the Add-on SDK.
Updated about 5 years ago