# Can a self-hosted add-on open inside ServiceM8 on desktop and iOS without launching Safari?

**URL:** <https://community.servicem8.com/t/can-a-self-hosted-add-on-open-inside-servicem8-on-desktop-and-ios-without-launching-safari/1250>\
**Category:** API & SDK\
**Created:** [November 5, 2026, 1:32am UTC](https://community.servicem8.com/t/can-a-self-hosted-add-on-open-inside-servicem8-on-desktop-and-ios-without-launching-safari/1250 "2026-11-05T01:32:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![a2z\_plumbing](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@a2z\_plumbing](https://community.servicem8.com/u/a2z_plumbing)\
**Post date:** [November 5, 2026, 1:32am UTC](https://community.servicem8.com/t/can-a-self-hosted-add-on-open-inside-servicem8-on-desktop-and-ios-without-launching-safari/1250/1 "2026-11-05T01:32:38Z")

</div>

hello everyone, I am fairly new to this so please bear with me. Can our self-hosted price book add-on open within a ServiceM8 popup on desktop and an embedded browser inside the iPhone/iPad app, without launching Safari? Please confirm if it is possible and the supported manifest settings and SDK method for each platform.

Currently, our price book launches in an external browser. We want users to browse bundles (in our price book) and add selected items to the current ServiceM8 job while remaining inside ServiceM8.

---

<div class="post-metadata">

**Author:** ![Cody](https://sea2.discourse-cdn.com/flex002/user_avatar/community.servicem8.com/cody/32/52_2.png) [@Cody](https://community.servicem8.com/u/Cody)\
**Post date:** [November 8, 2026, 1:33am UTC](https://community.servicem8.com/t/can-a-self-hosted-add-on-open-inside-servicem8-on-desktop-and-ios-without-launching-safari/1250/2 "2026-11-08T01:33:32Z")

</div>

Hi A2Z Plumbing,  
You can open your self-hosted price book in a popup inside ServiceM8 on the desktop web platform. However, there isn’t a supported manifest setting or Client JS SDK method to open it in an embedded browser inside the iPhone/iPad app instead of an external browser. App actions always use `window`; `modal` is supported only on the web platform.

### Desktop: use a modal job action

Add an action with `type: "online"`, `entity: "job"` and `location: "modal"`. For an app button as well, add a separate `type: "app"` action, but that action uses `window`, not an embedded modal. Here’s an `actions` fragment for both platforms:

```json
{
  "actions": [
    {
      "name": "Price Book",
      "type": "online",
      "entity": "job",
      "iconURL": "https://example.com/pricebook-icon.png",
      "event": "open_pricebook",
      "location": "modal"
    },
    {
      "name": "Price Book",
      "type": "app",
      "entity": "job",
      "iconURL": "https://example.com/pricebook-icon.png",
      "event": "open_pricebook",
      "location": "window"
    }
  ]
}

```

For your self-hosted implementation, configure an HTTPS callback that accepts POST requests and returns your price book HTML. ServiceM8 renders the callback output in an iframe, so don’t set `X-Frame-Options` to a value that blocks embedding. Web-service-hosted add-ons also require OAuth2 authentication.

### SDK methods

The manifest controls where the action opens; you don’t call an SDK method to launch the desktop modal. Include and initialise the Client JS SDK in your returned HTML, then use `resizeWindow()` and `closeWindow()` to manage the popup:

```html
<script src="https://platform.servicem8.com/sdk/1.0/sdk.js"></script>
<script>
  var client = SMClient.init();
  client.resizeWindow(900, 650);
  // When finished:
  // client.closeWindow();
</script>

```

For iOS, the supported alternative is the external-window action, with a link back to ServiceM8 using `https://go.servicem8.com/app/launch`. There isn’t an SDK method to change that action into an in-app browser.

### Adding selected items to the current job

Launch from a job action so your callback receives the current job’s UUID in `eventArgs.jobUUID`. On desktop, `client.invoke(eventName, eventParams)` can send the user’s selections back to your web service for processing. Your backend can create the selected line items with `POST https://api.servicem8.com/api_1.0/jobmaterial.json`, using that UUID as `job_uuid` and the OAuth scope `manage_job_materials`. This separates browsing your own price book from writing the chosen items to the ServiceM8 job.  
Thanks,  
Cody
