DealsDiscounts
Returns the discounts applied to deals, including the discount type, amount, description, and the users who created and last updated each discount.
Table-Specific Information
SELECT
The provider uses the Pipedrive API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client-side within the provider.
| Column | Supported Operators |
| Id | = |
| DealId | = |
For example, the following queries are processed server-side:
SELECT * FROM DealsDiscounts WHERE DealId = 10
SELECT * FROM DealsDiscounts WHERE Id = 5 AND DealId = 10
Insert
Execute INSERT by specifying the DealId, Type, Amount, and Description columns. You can also insert any columns that are not read-only.
INSERT INTO DealsDiscounts (DealId, Type, Amount, Description) VALUES (10, 'percentage', 15, 'Holiday discount')
Update
Execute UPDATE by specifying the Id and DealId in the WHERE clause. All columns that are not read-only can be updated.
For example:
UPDATE DealsDiscounts SET Amount = 20 WHERE Id = 5 AND DealId = 10
Delete
Execute DELETE by specifying the Id and DealId in the WHERE clause.
For example:
DELETE FROM DealsDiscounts WHERE Id = 5 AND DealId = 10
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | True |
The unique identifier of the discount applied to the deal. | |
| Type | String | False |
The type of discount applied to the deal, such as percentage or fixed currency amount. | |
| Amount | Integer | False |
The numeric amount of the discount applied to the deal. | |
| CreatedAt | Datetime | True |
The date and time at which the discount was created. | |
| CreatedBy | Integer | True |
The unique identifier of the user who created the discount. | |
| DealId [KEY] | Integer | False |
The unique identifier of the deal to which the discount is applied. | |
| Description | String | False |
A text description explaining the reason or purpose of the discount. | |
| UpdatedAt | Datetime | True |
The date and time at which the discount was last updated. | |
| UpdatedBy | Integer | True |
The unique identifier of the user who last updated the discount. |