We want to make integration as easy as possible.

The first goal of the integration is to be able to synchronise tasks from your existing case management system(s) with Fragment.

We offer multiple options to sync your data sources:

  1. Fragment’s direct integration with existing tools: Hubspot, Zendesk, Intercom, ComplyAdvantage…
    We have an existing integration with those tools, and can mirror the data from there with your API key.
  2. Custom integration with your in-house tools
    If you have a custom back-office, you can create a user for Fragment (ex: olivier@checkfragment.com) and we will take care of mirroring your task backlog on Fragment.
  3. Direct integration through our API: you send us tasks with a url and metadata, they appear on Fragment.
  4. Direct integration using Zapier, n8n, Make or similar tools.

Options 1 and 2 don’t require any development work on your side.
Options 3 and 4 requires more upfront work, but is pretty straightforward and more robust.

Let’s dive into each of those possible integration methods.

Option 1: direct integration with public tools (Hubspot example)

Please reach out if you want to integrate one of your existing 3rd party tools.
We currently have integrations with Hubspot, Zendesk, Intercom, ComplyAdvantage and can easily add new ones on demand.

Here we’ll focus with the Hubspot integration as an example.

There are 2 options to integrate with HubSpot

Option 1 (no code) Use Workflows + Zapier

  1. Connect Zapier to HubSpot
  2. Create a workflow on HubSpot that sends a trigger on Zapier
  3. Configure your Zapier to send tasks to Fragment (see above)

Option 2 (native) Use Fragment’s native HubSpot integration

  1. Create Private app

    1. Go to settings > Integrations > Private Apps

      Screenshot 2023-07-27 at 22.02.23.png

    2. Click on “create a private App”, pick the name Fragment

    3. Configure the following scopes

      Screenshot 2023-07-27 at 22.04.07.png

    d. Share the access token with us

    e. We activate the sync on our side. It will poll your HubSpot to get all recent changes every minute.

Comparison between HubSpot integrations

1. No Code (Zapier)2. Native
Update frequencyinstant1 minute
HubSpot Entitiesalltasks
Webhooks*(yes)**yes
Watch for deletion?partial

*Webhooks : task status changes (ex: assigned, done) are pushed to HubSpot

**(yes) : requires to configure the tasks payload with integration info, see with us

Option 2: Custom integration with your in-house tools

If you have a custom back-office, you can create a user for Fragment (ex: olivier@checkfragment.com) and we will take care of mirroring your task backlog on Fragment.

Here is how it typically works:

  1. Create a user for Fragment with the right permissions (read the backlog).
  2. Every X minute (configurable, 5min by default), we refresh your backlog to fetch the open tasks.
  3. We close tasks not in the backlog anymore, and create new ones.
  4. Operators go through Fragment to complete tasks on their custom back-office.

There can be edge cases or custom work here, so please reach out to us if you need a custom integration.

Option 3: Direct integration through our API

This method is the most versatile.

To integrate via the API, follow these steps

  1. Locate the part of your case management system (Backend? Automation platform like Zapier?) that creates the tasks
  2. Format the data into a JSON that respects the Task Data Model. You usually need to specify the due date of the task (due_at), and some fields to get started (including the url).
  3. Make a PATCH request to the tasks/ endpoint

An example in Python would be

import requests

# 1. Retrieve task information
task = {
    "status": "TODO",
    "due_at": "2024-07-12T12:29:16.891000+00:00",
    "fields": {
        "title": "Claim ABC"
        "url": "https://google.com",
        "partner": "VIP customer XYZ",
        "integration": "API",
    }
}

# 2. Make PATCH request (UPSERT)
response = requests.patch(
    f"https://api.onfragment.com/api/v1/tasks/",
    headers={"Authorization": f"Bearer {YOUR_API_KEY}"},
    json=task,
)
if not response.status_code == 200:
    raise Exception("Fragment API issue")

Option 4: direct integration through no-code tools

Zapier

https://zapier.com

There are 2 options to integrate with Zapier.

  1. The first option is to use the Custom Request Webhook via Zapier.
  2. The second option is to use the Code Action from Zapier (available in Python and JavaScript flavors).

Screenshot 2023-07-27 at 21.20.01.png

Here is an example using the Code action (option 2) : from Google sheet → Fragment

Let’s say you have a Google spreadsheet named zapier-demo with one sheet named Sheet 1.

Screenshot 2023-07-27 at 21.22.08.png

  1. Create new Zap
  2. Add a Google Sheet Trigger on New or Updated Row.

Screenshot 2023-07-27 at 21.24.39.png

  1. Add a Code Step. Configure the input data and make an HTTP API request.
    • See code

      task = {
          "fields": {
              "title": input_data["title"],
              "url": input_data["url"],
              "category": input_data["category"],
              "name": input_data["name"],
              "priority": input_data["priority"],
              "external_id": input_data["id"],
          }
      }
      resp = requests.put(
          f"https://api.onfragment.com/api/v1/tasks/",
          headers={"Authorization": f"Bearer {YOUR_API_KEY}"},
          json=task,
      )
      if not resp.status_code == 200:
          raise Exception(resp)
      return resp.json()
      
  2. Navigate to the Fragment dashboard, you should now see the tasks !

Screenshot 2023-07-27 at 21.34.11.png

Make

https://www.make.com

The best option to integrate with Make is to create an HTTP action.

Let’s see an example : from Google sheet → Fragment

Screenshot 2023-07-27 at 21.36.33.png

Let’s say you have a Google spreadsheet named make-demo with one sheet named Sheet 1.

Screenshot 2023-07-27 at 21.22.08.png

  1. Create a Search Rows Google Sheets trigger

  2. Add a JSON action to format the flat data into a proper JSON. This action enables you to define a schema for your data and is thus robust.

    In our case, let’s adopt a simple data structure that fits the Task Data Model

Screenshot 2023-07-27 at 21.44.36.png

  1. Add an HTTP action node. Make sure to

    • Select the PATCH method

    • Enter the header x-api-key for authentication

    • Fill the request content by selecting the output of the JSON step

      Screenshot 2023-07-27 at 21.49.16.png

  2. Navigate to the Fragment dashboard, you should now see the tasks

    Screenshot 2023-07-27 at 21.34.11.png

n8n

https://n8n.io

The best way to integrate with n8n is to use the HTTP request node.

Let’s see an example : from Google sheet → Fragment

Screenshot 2023-07-27 at 21.50.28.png

Let’s say you have a Google spreadsheet named make-demo with one sheet named Sheet 1.

Screenshot 2023-07-27 at 21.22.08.png

  1. Create a Google Sheet Trigger on rowAdded

  2. Transform the data with a Code block (example below)

    • See Code (Javascript)

      // Loop over input items and add a new field called 'myNewField' to the JSON of each one
      for (const item of $input.all()) {
        const new_item = {
          fields: {
              title: item.json.title,
              url: item.json.url,
              category: item.json.category,
              priority: item.json.priority,
              name: item.json.name,
              external_id: item.json.id,
          }
        };
        item.json = new_item;
      }
      
      return $input.all();
      
    • See Screenshot

      Screenshot 2023-07-27 at 21.52.19.png

  3. Add an HTTP node

    Make sure to

    • Select method PATCH
    • Include the header x-api-key
    • Retrieve the body from the previous step (already formatted) with {{ $json }}

Screenshot 2023-07-27 at 21.54.30.png

Screenshot 2023-07-27 at 21.55.26.png

Pro Tip to debug on n8n : open View > Developer Tools > Console. You should see the requests made by the HTTP node.

  1. Navigate to the Fragment dashboard, you should now see the tasks

    Screenshot 2023-07-27 at 21.34.11.png