Deals
To Create, update, delete, and query from Deals table.
Table Specific Information
Select
For datetime columns only the '>' and '>=' operators are supported in the WHERE clause. The following query selects Deals that were updated after a given date.
SELECT * FROM Deals WHERE UpdatedAt > '2012-01-12'
Insert
Name, CategoryId, Background, Currency, Price, PriceType, Duration, and PartyId are required to create a new Deal.
INSERT INTO Deals (Name, CategoryId, Background, Currency, Price, PriceType, Duration, PartyId) VALUES ('deal with someone', 4195389, 'black', 'usd', 500, 'fixed', 123545, 149760370)
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | Integer | True |
The unique identifier of the deal. | |
| Name | String | False |
The name of the deal. | |
| AccountId | Integer | True |
The Id of the account associated with the deal. | |
| AuthorId | Integer | True |
The Id of the user who created the deal. | |
| Background | String | False |
Background notes for the deal. | |
| CategoryId | Integer | False |
The Id of the DealCategory associated with the deal. | |
| Currency | String | False |
The three-character ISO 4217 currency identifier for the deal price. | |
| Duration | Integer | False |
The expected duration of the deal. The unit is defined by PriceType. | |
| VisibleTo | String | False |
Who the deal is visible to. The allowed values are Everyone, Owner, and NamedGroup. | |
| GroupId | Integer | False |
The Id of the group associated with the deal. | |
| OwnerId | Integer | False |
The Id of the user who owns the deal. | |
| PartyId | Integer | False |
The Id of the person or company that the deal is with. | |
| Price | Long | False |
The price of the deal. | |
| PriceType | String | False |
The pricing model for the deal. The allowed values are fixed, hour, month, and year. | |
| ResponsiblePartyId | Integer | False |
The Id of the user responsible for the deal. | |
| Status | String | True |
The status of the deal. The allowed values are pending, won, and lost. | |
| StatusChangedOn | Date | True |
The date when the status of the deal was last changed. | |
| CreatedAt | Datetime | True |
The date and time when the deal was created. | |
| UpdatedAt | Datetime | True |
The date and time when the deal was last updated. |