Pipedrive API

Getting access, Developing, Testing

Back to Pipedrive

Add a new goal

Adds a new goal. Along with adding a new goal, a report is created to track the progress of your goal.

Input

type: object properties: data: title: addGoalRequest type: object required: - type - assignee - expected_outcome - duration - interval properties: title: type: string description: The title of the goal assignee: type: object description: >- Who this goal is assigned to. It requires the following JSON structure: `{ "id": "1", "type": "person" }`. `type` can be either `person`, `company` or `team`. ID of the assignee person, company or team. type: type: object description: >- The type of the goal. It requires the following JSON structure: `{ "name": "deals_started", "params": { "pipeline_id": [1, 2], "activity_type_id": [9] } }`. Type can be one of: `deals_won`, `deals_progressed`, `activities_completed`, `activities_added`, `deals_started` or `revenue_forecast`. `params` can include `pipeline_id`, `stage_id` or `activity_type_id`. `stage_id` is related to only `deals_progressed` type of goals and `activity_type_id` to `activities_completed` or `activities_added` types of goals. The `pipeline_id` and `activity_type_id` need to be given as an array of integers. To track the goal in all pipelines, set `pipeline_id` as `null` and similarly, to track the goal for all activities, set `activity_type_id` as `null`.” expected_outcome: type: object description: >- The expected outcome of the goal. Expected outcome can be tracked either by `quantity` or by `sum`. It requires the following JSON structure: `{ "target": "50", "tracking_metric": "quantity" }` or `{ "target": "50", "tracking_metric": "sum", "currency_id": 1 }`. `currency_id` should only be added to `sum` type of goals. duration: type: object description: >- The date when the goal starts and ends. It requires the following JSON structure: `{ "start": "2019-01-01", "end": "2022-12-31" }`. Date in format of YYYY-MM-DD. "end" can be set to `null` for an infinite, open-ended goal. interval: type: string enum: - weekly - monthly - quarterly - yearly description: The interval of the goal

Output

title: addOrUpdateGoalResponse200 type: object properties: success: type: boolean description: If the request was successful or not data: type: object properties: goal: type: object properties: id: type: string description: The ID of the goal owner_id: type: integer description: The ID of the creator of the goal title: type: string description: The title of the goal type: type: object description: The type of the goal properties: name: type: string description: The name of the goal type params: type: object description: The parameters that accompany the goal type properties: pipeline_id: type: array description: The IDs of pipelines of the goal items: type: integer activity_type_id: type: array description: The IDs of activity types of the goal items: type: integer assignee: type: object description: Who the goal is assigned to properties: id: type: integer description: The ID of the goal assignee type: type: string description: The type of the assignee interval: type: string description: The interval of the goal duration: type: object description: The duration of the goal properties: start: type: string description: The start date of the goal end: type: string description: The end date of the goal expected_outcome: type: object description: The expected outcome of the goal properties: target: type: integer description: The numeric target of the goal tracking_metric: type: string description: The tracking metric of the goal is_active: type: boolean description: Whether the goal is currently active or not report_ids: type: array description: The IDs of the reports that belong to the goal items: type: string