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/.
Working with Case in Sugar CRM
Overview
The following operations allow you to work with cases. Click an operation name to see details on how to use it.
For a sample proxy service the illustrates how to work with cases, see Sample configuration.
Operation | Description |
Creates a case. |
Operation details
This section provides details on each of the operations.
Creating a case
This method involves in creating a case. This helps to track and manage services-related problems reported by users and customers. This operation is not required to be called through the init method as it needs only the user name and password.
<sugarcrm.createCase> <appUri>{$ctx:appUri}</appUri> <userName>{$ctx:userName}</userName> <password>{$ctx:password}</password> <name>{$ctx:name}</name> </sugarcrm.createCase>
Properties
appUri:
SOAP service URL, and "sugar_url" is the URL of your Sugar instance.userName:
The user name of the user.password:
The MD5 hashed password of the user.name:
The name of the case.
Sample request
Following is a sample SOAP request that can be handled by the creatCase
operation.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sug="wso2.connector.sugarcrm.createcase"> <soapenv:Header/> <soapenv:Body> <root> <sug:appUri>https://ixojiv6278.trial.sugarcrm.com/soap.php</sug:appUri> <sug:userName>admin</sug:userName> <sug:password>bb00347e47b6b24abd37975dfedbf54c</sug:password> <sug:name>testcase</sug:name> </root> </soapenv:Body> </soapenv:Envelope>
Sample configuration
Following is a sample proxy service that illustrates how to connect to Sugar CRM with the init operation and use the createCase
operation. The sample request for this proxy can be found in createCase sample request.You can use this sample as a template for using other operations in this category.
<proxy xmlns="http://ws.apache.org/ns/synapse" name="sugarcrm_createCase" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence onError="faultHandlerSeq"> <property xmlns:ns="wso2.connector.sugarcrm.createcase" name="appUri" expression="//ns:appUri/text()"/> <property xmlns:ns="wso2.connector.sugarcrm.createcase" name="userName" expression="//ns:userName/text()"/> <property xmlns:ns="wso2.connector.sugarcrm.createcase" name="password" expression="//ns:password/text()"/> <property xmlns:ns="wso2.connector.sugarcrm.createcase" name="name" expression="//ns:name/text()"/> <sugarcrm.createCase> <appUri>{$ctx:appUri}</appUri> <userName>{$ctx:userName}</userName> <password>{$ctx:password}</password> <name>{$ctx:name}</name> </sugarcrm.createCase> <filter source="$axis2:HTTP_SC" regex="^[^2][0-9][0-9]"> <then> <switch source="$axis2:HTTP_SC"> <case regex="401"> <property name="ERROR_CODE" value="600401"/> <property name="ERROR_MESSAGE" value="Unauthorized"/> </case> <case regex="404"> <property name="ERROR_CODE" value="600404"/> <property name="ERROR_MESSAGE" value="Not Found"/> </case> <case regex="400"> <property name="ERROR_CODE" value="600400"/> <property name="ERROR_MESSAGE" value="Bad Request"/> </case> <case regex="500"> <property name="ERROR_CODE" value="600500"/> <property name="ERROR_MESSAGE" value="Internal Server Error"/> </case> </switch> <makefault version="soap11"> <code expression="get-property('ERROR_CODE')"/> <reason expression="get-property('ERROR_MESSAGE')"/> <detail/> </makefault> </then> </filter> <respond/> </inSequence> <outSequence> <send/> </outSequence> <faultSequence> <makefault version="soap11"> <code expression="get-property('ERROR_CODE')"/> <reason expression="get-property('ERROR_MESSAGE')"/> <detail/> </makefault> <send/> </faultSequence> </target> <description/> </proxy>