# DealProductsByDealId ## Documentation The products of 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 `DealProductsByDealId`. 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 `DealProductsByDealId` 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 | |---|:---:|---|:---:|---| | `add_time` | `datetime` | | ☐ | The date and time when the product was added to the deal. | | `billing_frequency_cycles` | `int64` | | ☐ | The number of times the billing frequency repeats for a product in a deal. Only on the Growth plan and above. | | `billing_frequency` | `varchar2` | | ☐ | How often a customer is billed for access to a service or product. Only on the Growth plan and above. | | `billing_start_date` | `datetime` | | ☐ | The billing start date. Only on the Growth plan and above. | | `comments` | `varchar2` | | ☐ | The comments of the product. | | `currency` | `varchar2` | | ☐ | The currency associated with the deal product. | | `deal_id` | `int64` | | ☐ | The ID of the deal. | | `discount_type` | `varchar2` | | ☐ | The type of the discount's value. | | `discount` | `decimal` | | ☐ | The value of the discount. | | `id` | `int64` | | ☑ | The ID of the deal-product (the ID of the product attached to the deal). | | `is_enabled` | `char` | | ☐ | Whether this product is enabled for the deal. | | `item_price` | `decimal` | | ☐ | The price value of the product. | | `name` | `varchar2` | | ☐ | The product name. | | `order_nr` | `int64` | | ☐ | The order number of the product within the deal. | | `product_id` | `int64` | | ☐ | The ID of the product. | | `product_variation_id` | `int64` | | ☐ | The ID of the product variation. | | `quantity` | `decimal` | | ☐ | The quantity of the product. | | `sum` | `decimal` | | ☐ | The sum of all the products attached to the deal. | | `tax_method` | `varchar2` | | ☐ | The tax option to be applied to the products. | | `tax` | `decimal` | | ☐ | The product tax. | | `update_time` | `datetime` | | ☐ | The date and time when the deal product was last updated. |