Skip to main content
Technical Preview

Overview

A client-mode connector for the SugarCRM REST API (Sugar Sell, Sugar Serve and Sugar Enterprise, SugarCloud or on-premise) that connects plant and product events to CRM records. A connected machine that raises an alarm can open a Case on the customer’s Account, the team can add notes while it is handled, and the Case can be closed when the alarm clears. Records can be upserted by an external id kept in the sync_key field (an asset serial, for example), Accounts can be kept current from live data, and any module can be listed, filtered, counted and searched. Most events take the module name from the payload (Cases, Accounts, Contacts, Bugs, custom modules), so one connector covers the whole instance. Topics use crm/sugarcrm/<object>/<verb>; each response is published on <source topic>/response.
The template was checked against the Sugar 25.2 REST API endpoint reference (each packaged endpoint is still published in the 26.1 reference) and a local mock of a Sugar instance. Sugar is hosted per customer, so there is no shared public host to probe. It has not been run against a real Sugar instance yet, so status stays blocked until an authenticated smoke passes.

Setup

  1. Set BASE_ADDRESS in the connector to your instance URL, for example https://acme.sugarondemand.com. Endpoints carry /rest/v11_24, the version the 25.2 reference covers. Newer releases keep serving older versions (26.1 goes up to v11_27), so change the prefix only if you need a newer endpoint.
  2. Create a dedicated integration user. The sync_key events (RecordGetBySyncKey, RecordUpsertBySyncKey) need an admin user.
  3. In Admin > Configure API Platforms, add a platform name for the broker (for example coreflux). Logging in with the default base platform can sign the same user out of the web client.

Authentication

Sugar uses two-legged OAuth 2.0 with a password grant (see REST API authentication):
  1. Publish to crm/sugarcrm/oauth/token (event TokenGet):
  2. Read access_token (valid 3600 seconds) and refresh_token (valid 14 days) from crm/sugarcrm/oauth/token/response. Pass access_token in every other payload; the connector sends it in the OAuth-Token header.
  3. When a call answers 401, publish {"body": {"grant_type": "refresh_token", "refresh_token": "<refresh token>", "client_id": "sugar", "client_secret": "", "platform": "coreflux"}} to crm/sugarcrm/oauth/refresh for a new pair. Keep only the refresh token, never the password, in long-term storage.
Store the integration user’s credentials as broker secrets (for example SUGARCRM_USERNAME and SUGARCRM_PASSWORD) and have a LoT action add them with GET SECRET. The token response topics carry live tokens: restrict them with a rule, never retain them, and do not put tokens in retained messages.

Payload fields

Events

No DELETE events are packaged on purpose. TokenGet, TokenRefresh and Logout are POSTs but only handle the session; RecordsFilter, RecordsCount, CasesFilter and DuplicateCheck are POSTs that only read.

Connector excerpt

The full connector is in SugarcrmRestApi.lot. The first events look like this:

Examples

Find the customer’s Account with crm/sugarcrm/accounts/filter ("query": "filter%5B0%5D%5Bname%5D%5B%24starts%5D=ACME&fields=id,name"), then publish to crm/sugarcrm/cases/create:
The response is the created Case, including its id.

Receiving changes from Sugar

Sugar pushes record changes out with Web Logic Hooks (Admin > Web Logic Hooks): pick a module, a trigger event (for example after save) and a URL, and Sugar sends the record as JSON. Deliveries are queued and sent by the “Dispatch Web Logic Hook” scheduled job, so they arrive on the next cron run, not instantly. Point the hook at a separate server-mode REST_API connector that enables ENABLE_SERVER; Sugar does not sign deliveries, so restrict that endpoint (network or a secret path).

Troubleshooting

Last modified on October 21, 2026