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 Activities in Pipedrive


Overview

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

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

OperationDescription

createActivity

Creates a new activity.

getActivityRetrieves details of a specific activity.
listActivitiesRetrieves all activities assigned to a particular user.

Operation details

This section provides further details on the operations related to activities.

Creating a new activity

The createActivity operation creates a new activity.

createActivity
<pipedrive.createActivity>
    <dueTime>{$ctx:dueTime}</dueTime>
    <duration>{$ctx:duration}</duration>
    <prettyOutput>{$ctx:prettyOutput}</prettyOutput>
    <subject>{$ctx:subject}</subject>
    <userId>{$ctx:userId}</userId>
    <isDone>{$ctx:isDone}</isDone>
    <personId>{$ctx:personId}</personId>
    <organizationId>{$ctx:organizationId}</organizationId>
    <dealId>{$ctx:dealId}</dealId>
    <type>{$ctx:type}</type>
    <dueDate>{$ctx:dueDate}</dueDate>
    <note>{$ctx:note}</note>
	<fields>{$ctx:fields}</fields>
</pipedrive.createActivity>
Properties
  • dueTime: Due time of the activity in UTC, Format: HH:MM.
  • duration: The duration of the activity, Format: HH:MM.
  • prettyOutput: If the prettyOutput is specified as 1, will return an indented response of the output.
  • subject: The subject of the activity.
  • userId: The unique identifier of the user whom the activity will be assigned to.
  • isDone: Indicates whether the activity is done or not.
  • personId: The unique identifier of the person the activity will be associated with.
  • organizationId: The unique identifier of the organization the activity will be associated with.
  • dealId: The unique identifier of the deal the activity will be associated with.
  • type: The type of the activity.
  • dueDate: Due date of the activity, Format: YYYY-MM-DD.
  • note: The note of the activity in HTML format.
  • 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 createActivity operation.

Sample Request for createActivity
{
	"apiToken":"23e5036a3fbea622c27ec5fbc09cad17b97f1c04",
	"apiUrl":"https://api.pipedrive.com",
	"dueTime":"10:11",
	"duration":"10:11",
	"subject":"subject one",
	"userId":545982,
	"isDone":0,
	"personId":1,
	"organizationId":1,
	"dealId":1,
	"type":"call",
	"dueDate":"2016-01-02",
	"note":"The create activity",
	"prettyOutput":1,
	"fields":["id"]
}
Related Pipedrive documentation

https://developers.pipedrive.com/v1#methods-Activities

Retrieving details of a specific activity

The getActivity operation retrieves details of a specific activity.

getActivity
<pipedrive.getActivity>
    <id>{$ctx:id}</id>
    <prettyOutput>{$ctx:prettyOutput}</prettyOutput>
	<fields>{$ctx:fields}</fields>
</pipedrive.getActivity>
Properties
  • id: The unique identifier for an activity.
  • 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 getActivity operation.

Sample Request for getActivity
{
	"apiToken":"7ccee3fe30e479ae845169ec8601ba8b4ab2be0d",
	"apiUrl":"https://api.pipedrive.com",
	"id":1,
	"prettyOutput":1,
	"fields":["id","subject"]
}
Related Pipedrive documentation

https://developers.pipedrive.com/v1#methods-Activities

Retrieving all activities

The listActivities operation retrieves all activities.

listActivities
<pipedrive.listActivities>
    <limit>{$ctx:limit}</limit>
    <isDone>{$ctx:isDone}</isDone>
    <startDate>{$ctx:startDate}</startDate>
    <start>{$ctx:start}</start>
    <prettyOutput>{$ctx:prettyOutput}</prettyOutput>
    <userId>{$ctx:userId}</userId>
    <endDate>{$ctx:endDate}</endDate>
    <type>{$ctx:type}</type>
	<fields>{$ctx:fields}</fields>
</pipedrive.listActivities>
Properties
  • limit: The number of items shown per page.
  • isDone: The status of the activity, possible values are 0,1.
  • startDate: The date, activities to fetch from. Format: YYYY-MM-DD.
  • start: The start of the pagination.
  • prettyOutput: If the prettyOutput is specified as 1, will return an indented response of the output.
  • userId: The ID of the user who's activities to fetch.
  • endDate: The date, activities to fetch until. Format: YYYY-MM-DD.
  • type: The type of the activity. This is in correlation with the key_string parameter of ActivityTypes.
  • 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 listActivities operation.

Sample Request for listActivities
{
   
	"apiToken":"7ccee3fe30e479ae845169ec8601ba8b4ab2be0d",
	"apiUrl":"https://api.pipedrive.com",
	"limit":10,
	"isDone":0,
	"startDate":"2015-01-01",
	"start":0,
	"prettyOutput":1,
	"userId":589352,
	"endDate":"2015-10-10",
	"type":"call",
	"fields":["id","subject"]

}
Related Pipedrive documentation

https://developers.pipedrive.com/v1#methods-Activities

Sample configuration

Following is a sample proxy service that illustrates how to connect to Pipedrive with the init operation and use the createActivity operation. The sample request for this proxy can be found in the createActivity sample request.

Sample Proxy
<?xml version="1.0" encoding="UTF-8"?>
	<proxy xmlns="http://ws.apache.org/ns/synapse" name="pipedrive_createActivity" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
	 <target>
	 <inSequence>
      <property name="apiToken" expression="json-eval($.apiToken)"/>
      <property name="apiUrl" expression="json-eval($.apiUrl)"/>
      <property name="dueTime" expression="json-eval($.dueTime)"/>
      <property name="duration" expression="json-eval($.duration)"/>
      <property name="prettyOutput" expression="json-eval($.prettyOutput)"/>
      <property name="subject" expression="json-eval($.subject)"/>
      <property name="userId" expression="json-eval($.userId)"/>
      <property name="isDone" expression="json-eval($.isDone)"/>
      <property name="personId" expression="json-eval($.personId)"/>
      <property name="organizationId" expression="json-eval($.organizationId)"/>
      <property name="dealId" expression="json-eval($.dealId)"/>
      <property name="type" expression="json-eval($.type)"/>
      <property name="dueDate" expression="json-eval($.dueDate)"/>
      <property name="note" expression="json-eval($.note)"/>
      <property name="fields" expression="json-eval($.fields)"/>
      <pipedrive.init>
         <apiToken>{$ctx:apiToken}</apiToken>
         <apiUrl>{$ctx:apiUrl}</apiUrl>
      </pipedrive.init>
      <pipedrive.createActivity>
         <dueTime>{$ctx:dueTime}</dueTime>
         <duration>{$ctx:duration}</duration>
         <prettyOutput>{$ctx:prettyOutput}</prettyOutput>
         <subject>{$ctx:subject}</subject>
         <userId>{$ctx:userId}</userId>
         <isDone>{$ctx:isDone}</isDone>
         <personId>{$ctx:personId}</personId>
         <organizationId>{$ctx:organizationId}</organizationId>
         <dealId>{$ctx:dealId}</dealId>
         <type>{$ctx:type}</type>
         <dueDate>{$ctx:dueDate}</dueDate>
         <note>{$ctx:note}</note>
         <fields>{$ctx:fields}</fields>
      </pipedrive.createActivity>
	   <respond/>
	 </inSequence>
	  <outSequence>
	   <send/>
	  </outSequence>
	 </target>
   <description/>
  </proxy>