Getting Started

Introduction

Open APIs have become the standard for cloud-based products, and are great for developing integrations between multiple products that complement each other. If however, you want to extend an existing product with an additional feature or functionality then using an API alone has downsides.

  • It’s difficult to enhance existing apps, like ServiceM8
  • Users have to signup to another app, and on-boarding fatigue hurts growth
  • Collecting customer billing details and getting paid, especially for small/micro payments is hard

ServiceM8 is a platform for small business which provides job management functionality. Users are able to signup with no monthly or per user fees and pay only for what they use.

As each small business is different, each customer can extend their account with add-ons to suit their industry, country and business requirements. Unlike products where add-ons are exclusively external products, add-ons in ServiceM8 can be internal and provide additional functionality on top of the ServiceM8 platform and enhance the UX of the web and mobile app - Users cannot tell where the platform ends and the add-on begins. And because they don’t need to be a separate app, they can be micro-sized to solve specific use cases.

ServiceM8 customers love add-ons:

  • Activating add-ons is easy, no need to sign up to another app
  • Add-on fees can be included in their monthly ServiceM8 bill
  • Get new functionality in a familiar UX experience

Developers love add-ons:

  • Easy customer discovery through the ServiceM8 Add-on Store
  • Customers more likely to use add-ons because of simplified on-boarding
  • Developers can set their add-ons pricing (even free if you wish)
  • Streamlined process for getting paid, especially when dealing with micro-payments for simple add-ons
  • Add-ons can extend both the ServiceM8 web and mobile app

The Add-on SDK is a collection of self-service APIs, tools, documentation and code samples that make it fast and easy for you to create add-ons for ServiceM8.

Serverless Addon vs Web-Service Hosted Add-on

You can host your service in AWS Lambda or as a web service hosted on your own endpoint.

AWS Lambda (an Amazon Web Services offering) is a service that lets you run code in the cloud without managing servers. ServiceM8 sends your Lambda function user requests and your code can inspect the request, take any necessary actions (such as looking up information online) and then send back a response. You can write Lambda functions in Java, Node.js, or Python. This is generally the easiest and recommended way to host the service for an add-on.

Alternatively, you can write a web service and host it with any cloud hosting provider. The web service must accept requests over HTTPS. In this case, ServiceM8 sends requests to your web service and your service takes any necessary actions and then sends back a response. You can write your web service in any language.

Authentication

Similar to external integrations and API clients, Add-ons authenticate with ServiceM8 accounts using OAuth. If you are building a serverless add-on, ServiceM8 can manage the OAuth connection process between clients and your add-on, however you will need to indicate the OAuth scope your add-on requires access to in your Add-on Manifest.

To take advantage of Serverless Authentication, all you need to do is leave the Activation URL in your Add-on settings blank. You can now go to the Add-on Directory (even during development), find your add-on, and press the ‘Connect’ button to start and complete the OAuth approval process.

Addon Samples

To help get you started, we’ve created several add-on samples which you can test drive by loading them into your account to gain an understanding of the types of enhancements you can make - and the true power of add-ons vs an API-only solution.

https://github.com/servicem8/addon-sdk-samples