This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

SugarCRM Connector

The SugarCRM connector allows you to access the SugarCRM API through WSO2 ESB. SugarCRM allows businesses to create extraordinary customer relationships with the most innovative and affordable CRM solutions in the market.

Connecting to Sugar CRM

To use the SugarCRM connector, add the < sugarcrm.init> element in your configuration before any SugarCRM operations. This SugarCRM configuration authenticates with SugarCRM by specifying the session ID, or user name and password. Most of the SugarCRM operations require the session ID for authorization. The init operation internally calls the createSession operation and retrieves the session ID. Therefore, any method that is required to send the session ID must call the init operation. The other operations must specify the user name and password (MD5 hashed).

init
<sugarcrm.init>
    <appUri>http://{sugar_url}/soap.php</appUri>
    <userName>admin</userName>
    <password>bb00347e47b6b24abd37975dfedbf54c</password>
    <version>1</version>
    <appName>appfd</appName>
</sugarcrm.init>
Properties
  • appUri:  SOAP service URL, where "sugar_url" is the URL of your SugarCRM instance.

  • userName: The user name of the created account.

  • password: The MD5 hash of the user's password.
  • version:   Version of the API specific to your release of SugarCRM.
  • appName: The name of the application that is logging in.

Performing operations on Sugar CRM

The following pages describe how to perform various operations with the connector. For general information on using connectors and their operations in your ESB configurations, see Using a Connector. To download the connector, go to https://store.wso2.com/store/assets/esbconnector/sugarcrm, click the Sugar CRM connector, and then click Download Connector. Then you can add and enable the connector in your ESB instance.

Error handling

Errors that are not exceptions will not be sent to the fault handler sequence. Therefore, you need to handle these errors inside the proxy itself. Note that the general HTTP error codes are handled inside the proxy. Every proxy will have a separate filter to handle these error codes. 

For example:

Case : Internal Server Error
<case regex="500">
	<property name="ERROR_CODE" value="600500"/>
	<property name="ERROR_MESSAGE" value="Internal Server Error"/>
</case>

The above case will handle an Internal Server Error. To handle similar kind of errors, add cases inside the filter in the proxy.

Additional information

You can find reference documents and related WSDL files for SugarCRM in the installed SugarCRM instance at: http://<sugar-server>/<sugar-path>/soap.php?wsdl