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 Deals in Base CRM



Overview

The following operations allow you to work with deals. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with deals, see Sample configuration.

OperationDescription

createDeal

Creates a new deal.

createDealNoteCreates a new deal note.
createDealReminderCreates a deal reminder.
getDealNotesRetrieves deal notes.
getDealRemindersRetrieves deal reminders.
listDealsLists deals.
setDealUpdates a deal.

Operation details

This section provides details on the operations.

Creating a deal

The createDeal operation creates a new deal.

createDeal
<basecrm.createDeal>
	<name>{$ctx:name}</name>
    <entityId>{$ctx:entityId}</entityId>
	<contactIds>{$ctx:contactIds}</contactIds>
    <scope>{$ctx:scope}</scope>
    <dealTags>{$ctx:dealTags}</dealTags>
    <hot>{$ctx:hot}</hot>
    <stage>{$ctx:stage}</stage>
    <sourceId>{$ctx:sourceId}</sourceId>
</basecrm.createDeal> 
Properties
  • name: Required - The name of the deal.
  • entityId: Required - The ID of the contact (either a company or individual) that will be assigned to the deal.
  • contactIds: A list of additional contact IDs that will be assigned to a deal.
  • scope: Refers to the scope of a deal.
  • dealTags: The list of comma separated tags which will be assigned to a deal.
  • hot: This allows to mark the deal as hot.
  • stage: The stage of the deals. Possible values: incoming, qualified, quote, custom1, custom2, custom3, closure, won, lost and unqualified.
  • sourceId: The ID of a source which will be assigned to a deal.
Sample request

Following is a sample REST/JSON request that can be handled by the createDeal operation.

Sample Request for createDeal
{
	"apiUrl":"https://sales.futuresimple.com",
	"email":"wso2connector.abdera@gmail.com",
	"password":"1qaz2wsx@",
	"responseType":"json",
	"name":"Test Deal",
  	"entityId":"64659226",
  	"scope":"200",
  	"hot":"true",
  	"dealTags":"one,two,three",
  	"contactIds":"1,2,3",
  	"sourceId":"1",
  	"stage":"won"
} 
Related Base documentation

http://dev.futuresimple.com/api/methods/deal-create

Creating a deal note

The createDealNote operation creates a new note for a specific deal.

createDealNote
<basecrm.createDealNote>
	<noteContent>{$ctx:noteContent}</noteContent>
    <dealId>{$ctx:dealId}</dealId>
</basecrm.createDealNote> 
Properties
  • noteContent: Required - Content of the note.
  • dealId: Required - ID of the deal to which a note should be added. 
Sample request

Following is a sample REST/JSON request that can be handled by the createDealNote operation.

Sample Request for createDealNote
{
	"apiUrl":"https://sales.futuresimple.com",
	"email":"wso2connector.abdera@gmail.com",
	"password":"1qaz2wsx@",
	"responseType":"json",
	"dealId":"3954980",
	"noteContent": "Test Note Message"
} 
Related Base documentation

http://dev.futuresimple.com/api/methods/deal-note-create

Creating a deal reminder

The createDealReminder operation creates a new reminder.

createDealReminder
<basecrm.createDealReminder>
	<reminderContent>{$ctx:reminderContent}</reminderContent>
    <dealId>{$ctx:dealId}</dealId>
	<reminderRemind>{$ctx:reminderRemind}</reminderRemind>
    <reminderHour>{$ctx:reminderHour}</reminderHour>
    <reminderDate>{$ctx:reminderDate}</reminderDate>
    <reminderDone>{$ctx:reminderDone}</reminderDone>
</basecrm.createDealReminder> 
Properties
  • reminderContent: Required - Content of the reminder.
  • dealId: Required - The ID of the deal for which the reminder should be created. 
  • reminderRemind: Whether a reminder should be sent to the user. Defaults to "false".
  • reminderHour: The hour of the reminder. Must be a 24-hour time representation. This field is only required if reminderRemind is set to "true".
  • reminderDate: The date of the reminder (YYYY/MM/DD). This field is only required if reminderRemind is set to "true".
  • reminderDone: Whether the task in the reminder was done. Defaults to "false".
Sample request

Following is a sample REST/JSON request that can be handled by the createDealReminder operation.

Sample Request for createDealReminder
{
	"apiUrl":"https://sales.futuresimple.com",
	"email":"wso2connector.abdera@gmail.com",
	"password":"1qaz2wsx@",
	"responseType":"json",
	"dealId":"3954980",
	"reminderContent":"Test Reminder Content",
    "reminderDone":"true",
    "reminderRemind":"true",
    "reminderDate":"2011/03/16",
    "reminderHour":"12"
}
Related Base documentation

http://dev.futuresimple.com/api/methods/deal-reminder-create

Retrieving deal notes

The getDealNotes operation retrieves a list of notes of a specific deal. 

getDealNotes
<basecrm.getDealNotes>
	<dealId>{$ctx:dealId}</dealId>
</basecrm.getDealNotes> 
Properties
  • dealId: Required - The ID of the deal whose notes you want to retrieve. 
Sample request

Following is a sample REST/JSON request that can be handled by the getDealNotes operation.

Sample Request for getDealNotes
{
	"apiUrl":"https://sales.futuresimple.com",
	"email":"wso2connector.abdera@gmail.com",
	"password":"1qaz2wsx@",
	"responseType":"json",
	"dealId":"3954980"
} 
Related Base documentation

http://dev.futuresimple.com/api/methods/deal-notes-index

Retrieving deal reminders

The getDealReminders operation retrieves a list of reminders of a specific deal.

getDealReminders
<basecrm.getDealReminders>
	<dealId>{$ctx:dealId}</dealId>
</basecrm.getDealReminders> 
Properties
  • dealId: Required - The ID of the deal whose reminders you want to retrieve.
Sample request

Following is a sample REST/JSON request that can be handled by the getDealReminders operation.

Sample Request for getDealReminders
{
	"apiUrl":"https://sales.futuresimple.com",
	"email":"wso2connector.abdera@gmail.com",
	"password":"1qaz2wsx@",
	"responseType":"json",
	"dealId":"3954980"
} 
Related Base documentation

http://dev.futuresimple.com/api/methods/deal-reminders-index

Listing deals

The listDeals operation retrieves a collection of deals that belong to a user.

listDeals
<basecrm.listDeals>
	<page>{$ctx:page}</page>
    <stage>{$ctx:stage}</stage>
</basecrm.listDeals> 
Properties
  • page: The page of the list of deals. A collection has 20 deals. If it is not provided, it is assumed that the page is 1.
  • stage: The stage of the deals. Possible values: incomingqualifiedquotecustom1custom2custom3closurewonlost, and unqualified. Default is incoming.
Sample request

Following is a sample REST/JSON request that can be handled by the listDeals operation.

Sample Request for listDeals
{
	"apiUrl":"https://sales.futuresimple.com",
	"email":"wso2connector.abdera@gmail.com",
	"password":"1qaz2wsx@",
	"responseType":"json",
	"page":"1",
	"stage":"won"
} 
Related Base documentation

http://dev.futuresimple.com/api/methods/deals-index

Updating a deal

The setDeal operation updates a deal.

setDeal
<basecrm.setDeal>
	<dealId>{$ctx:dealId}</dealId>
	<name>{$ctx:name}</name>
    <entityId>{$ctx:entityId}</entityId>
	<contactIds>{$ctx:contactIds}</contactIds>
    <scope>{$ctx:scope}</scope>
    <dealTags>{$ctx:dealTags}</dealTags>
    <hot>{$ctx:hot}</hot>
    <stage>{$ctx:stage}</stage>
    <sourceId>{$ctx:sourceId}</sourceId>
</basecrm.setDeal> 
Properties
  • dealId: Required - The unique ID of the deal to be updated.
  • name: Required - The name of the deal.
  • entityId: Required - The ID of a contact (either company or individual) that will be assigned to the deal.
  • contactIds: A list of additional contact IDs that will be assigned to the deal.
  • scope: The scope of the deal.
  • dealTags: The list of comma-separated tags that will be assigned to the deal.
  • hot: Whether to mark the deal as hot.
  • stage: The stage of the deal. Possible values: incoming, qualified, quote, custom1, custom2, custom3, closure, won, lost and unqualified.
  • sourceId: The ID of a source which will be assigned to a deal.
Sample request

Following is a sample REST/JSON request that can be handled by the setDeal operation.

Sample Request for setDeal
{
	"apiUrl":"https://sales.futuresimple.com",
	"email":"wso2connector.abdera@gmail.com",
	"password":"1qaz2wsx@",
	"responseType":"json",
	"dealId":"3954980",
	"name":"Updated Deal Name",
  	"entityId":"64659226",
  	"scope":"555",
  	"hot":"false",
  	"dealTags":"one,two,three, four, five",
  	"contactIds":"4,3,2,1",
  	"sourceId":"1",
  	"stage":"won"
} 
Related Base documentation

http://dev.futuresimple.com/api/methods/deal-update

Sample configuration

Following is a sample proxy service that illustrates how to connect to Base CRM with the init operation and use the createDeal operation. The sample request for this proxy can be found in createDeal sample request. You can use this sample as a template for using other operations in this category.

Sample Proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="basecrm_createDeal"
       transports="https,http"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
   <target>
      <inSequence onError="faultHandlerSeq">
         <property name="email" expression="json-eval($.email)"/>
         <property name="responseType" expression="json-eval($.responseType)"/>
         <property name="apiUrl" expression="json-eval($.apiUrl)"/>
         <property name="password" expression="json-eval($.password)"/>
         <property name="contactIds" expression="json-eval($.contactIds)"/>
         <property name="scope" expression="json-eval($.scope)"/>
         <property name="dealTags" expression="json-eval($.dealTags)"/>
         <property name="name" expression="json-eval($.name)"/>
         <property name="entityId" expression="json-eval($.entityId)"/>
         <property name="hot" expression="json-eval($.hot)"/>
         <property name="stage" expression="json-eval($.stage)"/>
         <property name="sourceId" expression="json-eval($.sourceId)"/>
         <basecrm.init>
            <email>{$ctx:email}</email>
            <responseType>{$ctx:responseType}</responseType>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <password>{$ctx:password}</password>
         </basecrm.init>
         <basecrm.createDeal>
            <contactIds>{$ctx:contactIds}</contactIds>
            <scope>{$ctx:scope}</scope>
            <dealTags>{$ctx:dealTags}</dealTags>
            <name>{$ctx:name}</name>
            <entityId>{$ctx:entityId}</entityId>
            <hot>{$ctx:hot}</hot>
            <stage>{$ctx:stage}</stage>
            <sourceId>{$ctx:sourceId}</sourceId>
         </basecrm.createDeal>
         <respond/>
      </inSequence>
      <outSequence>
        <send/>
      </outSequence>
   </target>
   <description/>
</proxy>