SugarCRM
API Integration Guide
Before you start
In order to avoid login conflicts, you will need to set up a custom "platform" name in the portal. It is best to name it something that describes and identifies your current integration.
Registering a New SugarCRM "Platform" Value
As an admin in your SugarCRM instance, go to the Administration panel.
Select
Configure API Platforms
.
Enter a value of your choosing for the new platform and click
Add
and thenSave
.
You'll then provide that Platform value when authenticating the SugarCRM Connector in Cyclr.
Authentication using Cyclr's API
SugarCRM uses OAuth 2 Password Credentials.
If installing the SugarCRM connector using Cyclr's API, we won’t redirect your users to the SugarCRM sign-in screen. Instead, it requires three account connector properties to be provided: Domain, Username and Password.
First provide a SugarCRM Domain:
curl -X POST
-H 'Content-Type: application/json'
-H 'Accept: application/json'
-d '{
"Name": "Domain",
"Value": "myaccount.sugarcrm.eu"
}'
'https://{CyclrAPIDomain}/v1.0/account/connectors/SUGAR\_ACCOUNT\_CONNECTOR\_ID/properties'
SugarCRM Domain should be in the format of “http://myaccount.sugarcrm.eu “. There’s no “https://” or final forward slash if your URL is “_https://myaccount.sugarcrm.eu/_%E2%80%9C .
Platform should be the custom platform value you set earlier.
Set up SugarCRM Username and Password as account connector properties:
curl -X POST
-H 'Content-Type: application/json'
-H 'Accept: application/json'
-d '{
"Name": "Username",
"Value": "myuser"
}'
'https://{CyclrAPIDomain}/v1.0/account/connectors/SUGAR\_ACCOUNT\_CONNECTOR\_ID/properties'
curl -X POST
-H 'Content-Type: application/json'
-H 'Accept: application/json'
-d '{
"Name": "Password",
"Value": "mypassword"
}'
'https://{CyclrAPIDomain}/v1.0/account/connectors/SUGAR\_ACCOUNT\_CONNECTOR\_ID/properties'
Same as the OAuth Redirect flow, call /UpdateAccountConnectorOAuth with a one-time token. If the Domain, Username and Password are all correctly set up, your end-user will simply be redirected back to your application.
Apply filters to calls
The following methods support the use of additional filters to refine your request:
Get New And Updated Opportunities
Search Opportunities
Search Custom Objects
To apply an additional filte, you can add a custom field to the request with a** Field Location** in the format: field.operator
, for example, campaign_name.$contains
. You can then supply a value for that field when you make your requests, such as Leads
.
The supported filter operators are as follows:
Operator | Description |
---|---|
$equals | Performs an exact match on that field. |
$not_equals | Matches on non-matching values. |
$starts | Matches on anything that starts with the value. |
$ends | Matches anything that ends with the value. |
$contains | Matches anything that contains the value. |
$in | Finds anything where field matches one of the values as specified as an array. |
$not_in | Finds anything where field does not match any of the values as specified as an array. |
$is_null | Checks if the field is null. This operation does not need a value specified. |
$not_null | Checks if the field is not null. This operation does not need a value specified. |
$lt | Matches when the field is less than the value. |
$lte | Matches when the field is less than or equal to the value. |
$gt | Matches when the field is greater than the value. |
$gte | Matches when the field is greater than or equal to the value. |
For more information, see the Cyclr documentation on how to [add custom fields]](https://docs.cyclr.com/adding-custom-fields ).