Skip to main content
The Custom REST connector lets you integrate CommissionKit with any system that has a REST API — no code changes needed. Configure field mappings, authentication, and pagination via JSON.

When to use

  • ERP or CRM not in the official connector list
  • In-house or custom ERP systems
  • Legacy systems with REST APIs
  • Any system that can expose reps and deals as JSON

Setup

Step 1: Connect

  1. Go to Integrations and select Custom REST API
  2. Enter your API’s Base URL (e.g. https://api.erp.example.com)
  3. Click Test Connection — the connector sends a HEAD request to verify the URL is reachable
  4. Click Connect

Step 2: Configure

After connecting, paste the full configuration JSON into the Edit Mapping editor on the integrations page. This tells CKit how to talk to your ERP — what endpoints to call, how to authenticate, and how to map fields. Navigate to Settings > Integrations in the web UI, find your new connection, and click Edit Mapping. Replace the editor contents with the JSON below and click Save:

Step 3: Sync

Once configured, a manual sync is automatically triggered. You can also use the menu to manually Sync Reps or Sync Deals, or set an auto-sync schedule.

Configuration reference

baseUrl (required)

Root URL of your ERP’s REST API. All endpoints are relative to this.

auth (required)

pagination (optional)

Default: { "type": "offset", "limitParam": "limit", "offsetParam": "offset", "limitValue": 100 }

responsePath (optional)

JSONPath to the array of results in the API response. Examples:
  • "data" — if the response is { "data": [...] }
  • "results.items" — if it’s { "results": { "items": [...] } }
  • Omit if the response body is already a top-level array
Most APIs wrap results — the connector auto-detects the array by checking common wrapper keys (data, results, items, records) and recursing into nested objects. For example, { "data": { "workspaceMembers": [...] } } works with responsePath: "data" or even without it entirely.

entities (required)

At least one of reps or deals must be enabled.

Entity fields

Field mapping (reps)

Field mapping (deals)

Use dot notation for nested fields: "salesRep.id" reads record.salesRep.id. Compute fields: prefix with $div:N: to divide a numeric value. For example, Twenty CRM stores amounts in micros — "$div:1000000:amount.amountMicros" converts 990000000 to 990.

Payment status mapping

Map your ERP’s payment status strings to CommissionKit’s four values:
Strings are matched case-insensitively.

Stage filtering

Optional filter to only sync deals at certain stages:
Deals whose status field is not "confirmed" or "delivered" are skipped.

Testing

After configuring, verify the connector works:
  1. Click Sync Reps in the menu
  2. Check the sync stats — you should see new records created
  3. If you see failed, check the error banner for details
  4. Adjust field mappings if needed and sync again

Example: Twenty CRM

This walkthrough connects CommissionKit to a Twenty CRM instance. The same approach works for any REST API.

Step 1: Understand the API response

Here is a real response from Twenty’s GET /rest/opportunities endpoint:

Step 2: Map the fields

Reps (from GET /rest/workspaceMembers):
Deals (from GET /rest/opportunities):

Step 3: Write the config

Paste this JSON into the Edit Mapping editor (⋮ menu) — replace the token and URL with yours:

Step 4: What happens

  1. Reps: The connector calls GET /rest/workspaceMembers?order_by=createdAt&limit=60. The responsePath is "data", and the connector auto-detects the workspaceMembers array inside. Each member is mapped as a CommissionKit rep.
  2. Deals: The connector calls GET /rest/opportunities?order_by=createdAt&limit=60. With responsePath: "data", the connector finds the opportunities array. Each opportunity is mapped as a deal, linking createdBy.workspaceMemberId back to the rep synced in step 1.
  3. Cursor pagination reads pageInfo.endCursor and passes it as starting_after for the next page.
  4. Only opportunities with stage in ["ON_HOLD", "NEW", "MEETING"] are synced.
Run Sync Reps first, then Sync Deals. Your Twenty workspace members and opportunities will appear in CommissionKit.