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 Pipedrive
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.
Operation | Description |
|---|---|
Adds a new deal. | |
Retrieves details of a specific deal. | |
Retrieves the followers of a deal. | |
Retrieves all deals. | |
Retrieves open and won deals, grouped by defined interval of time. | |
Updates the properties of a deal. | |
Retrieves products attached to a deal. |
Operation details
This section provides further details on the operations related to deals.
Adding a new deal
The createDeal operation adds a new deal.
createDeal
<pipedrive.createDeal>
<title>{$ctx:title}</title>
<customFields>{$ctx:customFields}</customFields>
<value>{$ctx:value}</value>
<currency>{$ctx:currency}</currency>
<userId>{$ctx:userId}</userId>
<personId>{$ctx:personId}</personId>
<organizationId>{$ctx:organizationId}</organizationId>
<stageId>{$ctx:stageId}</stageId>
<status>{$ctx:status}</status>
<lostReason>{$ctx:lostReason}</lostReason>
<addedTime>{$ctx:addedTime}</addedTime>
<visibility>{$ctx:visibility}</visibility>
<prettyOutput>{$ctx:prettyOutput}</prettyOutput>
<fields>{$ctx:fields}</fields>
</pipedrive.createDeal>Properties
title:The title of the deal.customFields:JSON object specifying the values for the deal's custom fields created in the account, keys for the object are the 40-character hashes assigned for the respective custom fields.value:The value of the deal. If omitted, value will be set to 0.currency:The currency of the deal, Accepts a 3-character currency code. If omitted, will be set to the default currency of the authorized user.userId:The identifier of the user who will be marked as the owner of this deal. If omitted, the authorized user Identifier will be used.personId:The identifier of the person this deal will be associated with.organizationId:The identifier of the organization this deal will be associated with.stageId:The identifier of the stage this deal will be placed in a pipeline. If omitted, the deal will be placed in the first stage of the default pipeline.status:Specifies the status of the deal, possible values are Open, Won, Lost, Deleted, defaults to Open.lostReason:Optional message about why the deal was lost (to be used when status=lost).addedTime:Optional creation date and time of the deal in UTC. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS.visibility:Visibility of the deal. If omitted, visibility will be set to the default visibility, possible values are 0,1,2.prettyOutput:If the prettyOutput is specified as 1, will return an indented response of the output.fields:The array of fields to be returned in the output.
Sample request
Following is a sample REST/JSON request that can be handled by the createDeal operation.
Sample Request for createDeal
{
"apiToken":"39126d07e28ce7e3a62bc49b50ad51adc82b5f91",
"apiUrl":"https://api.pipedrive.com",
"title" : "testTitle",
"customFields" : {"ea4c0246c80f5df831af9e8c48d1841b6a5f2886":"testQuoteId", "898f551845e6603dd1a0aa61186a04ed593bdd65":"testPotentialId"},
"value" : "5400",
"currency" : "LKR",
"userId" : 545970,
"personId" : 10,
"organizationId" : 2,
"stageId" : 2,
"status" : "Lost",
"lostReason" : "testReason",
"addedTime" : "2015-05-01 11:12:13",
"visibility" : 1,
"prettyOutput":1,
"fields":["id", "user_id"]
}Related Pipedrive documentation
https://developers.pipedrive.com/v1#methods-Deals
Retrieves details of a specific deal
The getDeal operation retrieves details of a specific deal.
getDeal
<pipedrive.getDeal>
<id>{$ctx:id}</id>
<prettyOutput>{$ctx:prettyOutput}</prettyOutput>
<fields>{$ctx:fields}</fields>
</pipedrive.getDeal> Properties
id:The unique identifier of the deal.prettyOutput:If the prettyOutput is specified as 1, will return an indented response of the output.fields:The array of fields to be returned in the output.
Sample request
Following is a sample REST/JSON request that can be handled by the getDeal operation.
Sample Request for getDeal
{
"apiToken":"23e5036a3fbea622c27ec5fbc09cad17b97f1c04",
"apiUrl":"https://api.pipedrive.com",
"id":4,
"prettyOutput":1,
"fields":["id","title"]
}Related Pipedrive documentation
https://developers.pipedrive.com/v1#methods-Deals
Retrieving the followers of a deal
The listDealFollowers operation retrieves the followers of a deal.
listDealFollowers
<pipedrive.listDealFollowers>
<id>{$ctx:id}</id>
<prettyOutput>{$ctx:prettyOutput}</prettyOutput>
</pipedrive.listDealFollowers> Properties
id:The unique identifier of the deal.prettyOutput:If the prettyOutput is specified as 1, will return an indented response of the output.
Sample request
Following is a sample REST/JSON request that can be handled by the listDealFollowers operation.