Integration Approaches
Sugar platform is extremely powerful and easy to integrate with. Determining the right approach for your use case scenario is the key to success.
- Push/Pull from Sugar via REST API
- Recommended approach
- Developers have full control over integration
- Integration can be stopped and systems will continue to work
- Retry mechanism: Resume integrations at any time (bringing only delta changes through "last_udpdate_time" flags)
- Time delay from/to Sugar is minimum and bearable
- Sugar REST API offers everything you need, but can be extended
- Push to Sugar, Sugar pushes to external queue in realtime
- Uses Sugar Events to trigger through Logic Hooks
- Requires Logic Hooks to be created and deployed
- Does not offer "retry mechanism", if a logic hook fails to deliver to a queue or contact external system
- Synchronous in nature, requires a response from external system
- Needs to handle dependencies manually (contact can only be created after account)
- Good to have a middleware/queue in front of Sugar to receive those event triggers (not mandatory but would make it "asynchronous"
- Realtime: Embed your app into Sugar through Dashlets
- Simplest approach
- Often requires user-based authentication
- All load/traffic goes directly to your system, careful with bottlenecks
Integrating with Sugar
Accessing your data when you want is good. Accessing your data however you want is better. When you decide to build an integration with Sugar, you’ll need an easy way to access and interact with the data stored in Sugar. The REST (representational state transfer) API (application programming interface) is perfect for this.
- Sugar REST API Overview
- Fully RESTfull (GET, POST, PUT, DELETE)
- OAuth2 token based
- All fields and modules are available through the API automatically
- Metadata API provides everything you need to know about your Sugar instance.
- Topics
Common APIs
It is important to understand our most commonly used APIs and their functions within Sugar. Your integration might need data within Sugar's module structure that could potentially change over time, so you can use Metadata for it as well as CRUD onto Sugar.
- Metadata
- Endpoint with current system's structure
- Modules, fields, relationships, layouts
- Use carefully, its payload can be MBs in size, cache as much as possible
- GET /metadata (use filters as much as possible)
- It does not retrieve lables for dropdowns, use language api to do so
- 3 Tips for using the Sugar Metadata API
- Language
- Endpoint to retrieve labels
- Dropdown list values
- Any language specific content
- GET /lang/<language_code>
- CRUD (Create, Read, Update, Delete) records
- Read:
GET /<module>/:record
- Create:
POST /<module>
- Update:
PUT /<module>/:record
- Delete:
DELETE /<module>/:record
- Filter:
POST /<module>/filter
- You can use GET as well
- POST solves the issue when a query is too long and hits HTTP limits
- Retrieve records related to another module:
GET /<module>/:record/link/:link_name
- Creates a relationship to a pre-existing record:
POST /<module>/:record/link/:link_name/:remote_id
- Read:
Performance and Best Practices
SugarBPM enables administrators to streamline common business processes by managing approvals, sales processes, call triaging, and more. SugarBPM is an easy-to-use business process management (BPM) and workflow tool that adds advanced BPM functionality to Sugar.
The SugarBPM suite features an extensive toolbox of modules that provide the ability to easily create digital forms and map out robust workflows using a drag-and-drop interface.
- Prerequisites
- Basic knowledge of process design is required.
- Basic knowledge of process standards such as BPMN is preferred. BPMN is a flowchart-based notation used to define business processes within an organization.
- You should know which business processes you want to automate in Sugar.
- SugarBPM Overview
- Introduction to Business Process Automation via SugarBPM
- Getting Started With SugarBPM for Sugar Serve
- Using SugarBPM to Notify a Team or User on Record Creation
- Understanding Email Direction in Process Definitions
- Understanding Round Robin Activities vs. Round Robin Actions