Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Added `source_deal_id` field to Lead schema to track the deal ID when a lead is converted from a deal
- Added `source_lead_id` field to v2 Deal schema to track the lead ID when a deal is converted from a lead

## [15.4.0](https://github.com/pipedrive/client-php/compare/15.3.0...15.4.0) (2026-02-16)

Expand Down
1 change: 1 addition & 0 deletions docs/versions/v1/Model/LeadResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Name | Type | Description | Notes
**origin_id** | **string** | The optional ID to further distinguish the origin of the lead - e.g. Which API integration created this Lead. | [optional]
**channel** | **int** | The ID of your Marketing channel this Lead was created from. Recognized Marketing channels can be configured in your <a href=\"https://app.pipedrive.com/settings/fields\" target=\"_blank\" rel=\"noopener noreferrer\">Company settings</a>. | [optional]
**channel_id** | **string** | The optional ID to further distinguish the Marketing channel. | [optional]
**source_deal_id** | **int** | The ID of the deal if the lead was converted from a deal. | [optional]
**is_archived** | **bool** | A flag indicating whether the lead is archived or not | [optional]
**was_seen** | **bool** | A flag indicating whether the lead was seen by someone in the Pipedrive UI | [optional]
**value** | [**\Pipedrive\versions\v1\Model\LeadValue**](LeadValue.md) | | [optional]
Expand Down
1 change: 1 addition & 0 deletions docs/versions/v2/Model/DealItem.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Name | Type | Description | Notes
**origin_id** | **string** | The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal. | [optional]
**channel** | **int** | The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your <a href=\"https://app.pipedrive.com/settings/fields\" target=\"_blank\" rel=\"noopener noreferrer\">Company settings</a>. | [optional]
**channel_id** | **string** | The optional ID to further distinguish the Marketing channel. | [optional]
**source_lead_id** | **string** | The ID of the lead if the deal was converted from a lead. Only included when requested via include_fields parameter. | [optional]
**arr** | **float** | Only available in Growth and above plans The Annual Recurring Revenue of the deal Null if there are no products attached to the deal | [optional]
**mrr** | **float** | Only available in Growth and above plans The Monthly Recurring Revenue of the deal Null if there are no products attached to the deal | [optional]
**acv** | **float** | Only available in Growth and above plans The Annual Contract Value of the deal Null if there are no products attached to the deal | [optional]
Expand Down
30 changes: 30 additions & 0 deletions lib/versions/v1/Model/LeadResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class LeadResponse implements ModelInterface, ArrayAccess, JsonSerializable
'origin_id' => 'string',
'channel' => 'int',
'channel_id' => 'string',
'source_deal_id' => 'int',
'is_archived' => 'bool',
'was_seen' => 'bool',
'value' => '\Pipedrive\versions\v1\Model\LeadValue',
Expand Down Expand Up @@ -109,6 +110,7 @@ class LeadResponse implements ModelInterface, ArrayAccess, JsonSerializable
'origin_id' => null,
'channel' => null,
'channel_id' => null,
'source_deal_id' => null,
'is_archived' => null,
'was_seen' => null,
'value' => null,
Expand Down Expand Up @@ -163,6 +165,7 @@ public static function openAPIFormats(): array
'origin_id' => 'origin_id',
'channel' => 'channel',
'channel_id' => 'channel_id',
'source_deal_id' => 'source_deal_id',
'is_archived' => 'is_archived',
'was_seen' => 'was_seen',
'value' => 'value',
Expand Down Expand Up @@ -192,6 +195,7 @@ public static function openAPIFormats(): array
'origin_id' => 'setOriginId',
'channel' => 'setChannel',
'channel_id' => 'setChannelId',
'source_deal_id' => 'setSourceDealId',
'is_archived' => 'setIsArchived',
'was_seen' => 'setWasSeen',
'value' => 'setValue',
Expand Down Expand Up @@ -221,6 +225,7 @@ public static function openAPIFormats(): array
'origin_id' => 'getOriginId',
'channel' => 'getChannel',
'channel_id' => 'getChannelId',
'source_deal_id' => 'getSourceDealId',
'is_archived' => 'getIsArchived',
'was_seen' => 'getWasSeen',
'value' => 'getValue',
Expand Down Expand Up @@ -311,6 +316,7 @@ public function __construct(array $data = null)
$this->container['origin_id'] = $data['origin_id'] ?? null;
$this->container['channel'] = $data['channel'] ?? null;
$this->container['channel_id'] = $data['channel_id'] ?? null;
$this->container['source_deal_id'] = $data['source_deal_id'] ?? null;
$this->container['is_archived'] = $data['is_archived'] ?? null;
$this->container['was_seen'] = $data['was_seen'] ?? null;
$this->container['value'] = $data['value'] ?? null;
Expand Down Expand Up @@ -636,6 +642,30 @@ public function setChannelId($channel_id): self
return $this;
}

/**
* Gets source_deal_id
*
* @return int|null
*/
public function getSourceDealId()
{
return $this->container['source_deal_id'];
}

/**
* Sets source_deal_id
*
* @param int|null $source_deal_id The ID of the deal if the lead was converted from a deal.
*
* @return self
*/
public function setSourceDealId($source_deal_id): self
{
$this->container['source_deal_id'] = $source_deal_id;

return $this;
}

/**
* Gets is_archived
*
Expand Down
30 changes: 30 additions & 0 deletions lib/versions/v2/Model/DealItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class DealItem implements ModelInterface, ArrayAccess, JsonSerializable
'origin_id' => 'string',
'channel' => 'int',
'channel_id' => 'string',
'source_lead_id' => 'string',
'arr' => 'float',
'mrr' => 'float',
'acv' => 'float',
Expand Down Expand Up @@ -134,6 +135,7 @@ class DealItem implements ModelInterface, ArrayAccess, JsonSerializable
'origin_id' => null,
'channel' => null,
'channel_id' => null,
'source_lead_id' => 'uuid',
'arr' => null,
'mrr' => null,
'acv' => null,
Expand Down Expand Up @@ -198,6 +200,7 @@ public static function openAPIFormats(): array
'origin_id' => 'origin_id',
'channel' => 'channel',
'channel_id' => 'channel_id',
'source_lead_id' => 'source_lead_id',
'arr' => 'arr',
'mrr' => 'mrr',
'acv' => 'acv',
Expand Down Expand Up @@ -237,6 +240,7 @@ public static function openAPIFormats(): array
'origin_id' => 'setOriginId',
'channel' => 'setChannel',
'channel_id' => 'setChannelId',
'source_lead_id' => 'setSourceLeadId',
'arr' => 'setArr',
'mrr' => 'setMrr',
'acv' => 'setAcv',
Expand Down Expand Up @@ -276,6 +280,7 @@ public static function openAPIFormats(): array
'origin_id' => 'getOriginId',
'channel' => 'getChannel',
'channel_id' => 'getChannelId',
'source_lead_id' => 'getSourceLeadId',
'arr' => 'getArr',
'mrr' => 'getMrr',
'acv' => 'getAcv',
Expand Down Expand Up @@ -376,6 +381,7 @@ public function __construct(array $data = null)
$this->container['origin_id'] = $data['origin_id'] ?? null;
$this->container['channel'] = $data['channel'] ?? null;
$this->container['channel_id'] = $data['channel_id'] ?? null;
$this->container['source_lead_id'] = $data['source_lead_id'] ?? null;
$this->container['arr'] = $data['arr'] ?? null;
$this->container['mrr'] = $data['mrr'] ?? null;
$this->container['acv'] = $data['acv'] ?? null;
Expand Down Expand Up @@ -1056,6 +1062,30 @@ public function setChannelId($channel_id): self
return $this;
}

/**
* Gets source_lead_id
*
* @return string|null
*/
public function getSourceLeadId()
{
return $this->container['source_lead_id'];
}

/**
* Sets source_lead_id
*
* @param string|null $source_lead_id The ID of the lead if the deal was converted from a lead. Only included when requested via include_fields parameter.
*
* @return self
*/
public function setSourceLeadId($source_lead_id): self
{
$this->container['source_lead_id'] = $source_lead_id;

return $this;
}

/**
* Gets arr
*
Expand Down