# DealParticipantsByDealId ## Documentation The persons participating in one deal. Each request costs 10 tokens of the daily budget of the company. - Catalog: `Pipedrive` - Schema: `Deals` - Primary Keys: `id` - Retrieve: True - Insert: True - Update: False - Delete: False ## Parameters of Table Function The following parameters can be used to control the behaviour of the table function `DealParticipantsByDealId`. A value must be provided at all times for required parameters, but optional parameters in general do not need to have a value and the execution will default to a pre-defined behaviour. Values can be specified by position and by name. In both cases, all parameters not specified will be evaluated using their default values. Value specification by position is done by listing all values from the first to the last needed value. For example: a `select * from table(value1, value2, value3)` on a table with four parameters will use the default value for the fourth parameter and the specified values for the first three. Value specification by name is done by listing all values that require a value. For example with `select * from table(name1 => value1, name3 => value3)` on the same table will use the default values for the second and fourth parameters and the specified values for the first and third. | Name | Data Type | Required | Default Value | Documentation | |---|:---:|:---:|:---:|---| | `deal_id` | `int64` | ☑ | | The deal id. | ## Columns of Table Function The columns of the table function `DealParticipantsByDealId` are shown below. Each column has an SQL data type. A new non-null value must be provided for every required column at all times during insert. | Name | Data Type | Label | Required | Documentation | |---|:---:|---|:---:|---| | `active_flag` | `char` | | ☐ | Whether the participant is active or not. | | `add_time` | `datetime` | | ☐ | The date and time when the participant was added. | | `added_by_user_id_data` | `varchar2` | | ☐ | The added by user id data. | | `added_by_user_id_success` | `char` | | ☐ | If the response is successful or not. | | `deal_id` | `int64` | | ☐ | The deal id the rows were read for. | | `id` | `int64` | | ☑ | The ID of the participant. | | `person_active_flag` | `char` | | ☐ | Whether the person is active or not. | | `person_activities_count` | `int64` | | ☐ | The count of activities related to the person. | | `person_add_time` | `datetime` | | ☐ | The date and time when the person was added/created. | | `person_cc_email` | `varchar2` | | ☐ | The BCC email associated with the person. | | `person_closed_deals_count` | `int64` | | ☐ | The count of closed deals related with the item. | | `person_company_id` | `int64` | | ☐ | The ID of the company related to the person. | | `person_done_activities_count` | `int64` | | ☐ | The count of done activities related to the person. | | `person_email_messages_count` | `int64` | | ☐ | The count of email messages related to the person. | | `person_email` | `varchar2` | | ☐ | An email address as a string or an array of email objects related to the person. | | `person_files_count` | `int64` | | ☐ | The count of files related to the person. | | `person_first_char` | `varchar2` | | ☐ | The first letter of the name of the person. | | `person_first_name` | `varchar2` | | ☐ | The first name of the person. | | `person_followers_count` | `int64` | | ☐ | The count of followers related to the person. | | `person_id_active_flag` | `char` | | ☐ | Whether the person is active or not. | | `person_id_company_id` | `int64` | | ☐ | The ID of the company related to the person. | | `person_id_email` | `varchar2` | | ☐ | An email address as a string or an array of email objects related to the person. | | `person_id_name` | `varchar2` | | ☐ | The name of the person. | | `person_id_owner_id` | `int64` | | ☐ | The ID of the owner of the person. | | `person_id_phone` | `varchar2` | | ☐ | A phone number supplied as a string or an array of phone objects related to the person. | | `person_id_value` | `int64` | | ☐ | The ID of the person. | | `person_id` | `int64` | | ☐ | The ID of the person. | | `person_label_ids` | `varchar2` | | ☐ | The IDs of labels assigned to the person. | | `person_label` | `int64` | | ☐ | The label assigned to the person. | | `person_last_activity_date` | `datetime` | | ☐ | The date of the last activity associated with the deal. | | `person_last_activity_id` | `int64` | | ☐ | The ID of the last activity associated with the deal. | | `person_last_incoming_mail_time` | `datetime` | | ☐ | The date and time of the last incoming email associated with the person. | | `person_last_name` | `varchar2` | | ☐ | The last name of the person. | | `person_last_outgoing_mail_time` | `datetime` | | ☐ | The date and time of the last outgoing email associated with the person. | | `person_lost_deals_count` | `int64` | | ☐ | The count of lost deals related with the item. | | `person_name` | `varchar2` | | ☐ | The name of the person. | | `person_next_activity_date` | `datetime` | | ☐ | The date of the next activity associated with the deal. | | `person_next_activity_id` | `int64` | | ☐ | The ID of the next activity associated with the deal. | | `person_next_activity_time` | `datetime` | | ☐ | The time of the next activity associated with the deal. | | `person_notes_count` | `int64` | | ☐ | The count of notes related to the person. | | `person_open_deals_count` | `int64` | | ☐ | The count of open deals related with the item. | | `person_org_id` | `varchar2` | | ☐ | The person org id. | | `person_org_name` | `varchar2` | | ☐ | The name of the organization associated with the person. | | `person_owner_id` | `varchar2` | | ☐ | The person owner id. | | `person_owner_name` | `varchar2` | | ☐ | The name of the owner associated with the person. | | `person_phone` | `varchar2` | | ☐ | A phone number supplied as a string or an array of phone objects related to the person. | | `person_picture_id` | `varchar2` | | ☐ | The person picture id. | | `person_related_closed_deals_count` | `int64` | | ☐ | The count of related closed deals related with the item. | | `person_related_lost_deals_count` | `int64` | | ☐ | The count of related lost deals related with the item. | | `person_related_open_deals_count` | `int64` | | ☐ | The count of related open deals related with the item. | | `person_related_won_deals_count` | `int64` | | ☐ | The count of related won deals related with the item. | | `person_undone_activities_count` | `int64` | | ☐ | The count of undone activities related to the person. | | `person_update_time` | `datetime` | | ☐ | The last updated date and time of the person. | | `person_visible_to` | `varchar2` | | ☐ | The visibility group ID of who can see the person. | | `person_won_deals_count` | `int64` | | ☐ | The count of won deals related with the item. | | `related_item_data_deal_id` | `int64` | | ☐ | The ID of the deal. | | `related_item_data_title` | `varchar2` | | ☐ | The title of the deal. | | `related_item_id` | `int64` | | ☐ | The ID of the related item. | | `related_item_type` | `varchar2` | | ☐ | The type of the related item. | ## Foreign Keys The values of these columns refer to a row of another table. | Columns | Referenced Table | Referenced Columns | Guarantee | |---|---|---|---| | `related_item_id` | [[Deals-Deals\|Deals.Deals]] | `id` | In words only: The deal the participant takes part in, when related_item_type is 'deal'. |