> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# QuoteVersion table

> There may be multiple Versions of a Quote, with one of them active

## QuoteVersion Table (39)

There may be multiple Versions of a Quote, with one of them active

## Fields

| Name                      | Description                                                                                                                                                                                                                                                                                                                                                                 | Type                                                    | Nullable |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | :------: |
| quoteversion\_id          | Primary key                                                                                                                                                                                                                                                                                                                                                                 | PK                                                      |    No    |
| ERPQuoteVersionKey        | Key in the ERP system that uniquely identifies this Version within the ERP system (if available, the field may be empty).                                                                                                                                                                                                                                                   | String(254)                                             |    Yes   |
| QuoteId                   | Foreign key to CRM quote (the conceptual parent). Owning Quote of this Quote Version.                                                                                                                                                                                                                                                                                       | FK [Quote](./quote.mdx)                                 |    No    |
| Description               | Description of Version. Potentially longer text description, typically used in a tooltip. Max 2K.                                                                                                                                                                                                                                                                           | String(2047)                                            |    Yes   |
| Number                    | A quote number that the user (or ERP connector) can fill out.                                                                                                                                                                                                                                                                                                               | String(254)                                             |    Yes   |
| State                     | Current state of this quote version.                                                                                                                                                                                                                                                                                                                                        | Enum [QuoteVersionState](./enums/quoteversionstate.mdx) |    Yes   |
| ArchivedState             | State that this quote version had, right before it was changed to Archived; in this way we can show what happened before the archiving.                                                                                                                                                                                                                                     | Enum [QuoteVersionState](./enums/quoteversionstate.mdx) |    Yes   |
| Status                    | If there was a problem with for instance calculation, this field is set to warning or error.                                                                                                                                                                                                                                                                                | Enum [QuoteStatus](./enums/quotestatus.mdx)             |    Yes   |
| Reason                    | If there was a problem, this field contains a localized explanation of the problem and possible steps to fix it that the user can be shown.                                                                                                                                                                                                                                 | String(2047)                                            |    Yes   |
| LikelyQuoteAlternativeId  | The alternative that is considered most likely to be accepted. Used to calculate probable income.                                                                                                                                                                                                                                                                           | FK [QuoteAlternative](./quotealternative.mdx)           |    Yes   |
| SentDate                  | The date the version was sent to the customer.                                                                                                                                                                                                                                                                                                                              | DateTime                                                |    Yes   |
| FollowupId                | Link to a follow-up activity, created when this quote version was sent to the customer.                                                                                                                                                                                                                                                                                     | FK [appointment](./appointment.mdx)                     |    Yes   |
| ExpirationDate            | Last date the quote Version is valid, expiration is at midnight end of this day.                                                                                                                                                                                                                                                                                            | DateTime                                                |    Yes   |
| DeliveryCountryId         | Country of delivery address, typically copied from the contact record                                                                                                                                                                                                                                                                                                       | FK [country](./country.mdx)                             |    Yes   |
| HasOwnDeliveryAddress     | The delivery address is not the same as the contact's Street address                                                                                                                                                                                                                                                                                                        | Bool                                                    |    Yes   |
| InvoiceCountryId          | Country of invoice address, typically copied from contact record                                                                                                                                                                                                                                                                                                            | FK [country](./country.mdx)                             |    Yes   |
| HasOwnInvoiceAddress      | The quote has an address for Invoicing. This will typically be copied from the company's addresses.                                                                                                                                                                                                                                                                         | Bool                                                    |    Yes   |
| ERPPaymentTermsKey        | Either a List id to an id from a connector provided list, or, if the connection doesn’t support lists, a text. For instance: ‘Standard 30 days’.                                                                                                                                                                                                                            | String(254)                                             |    Yes   |
| ERPPaymentTypeKey         | Either a List id to an id from a connector provided list, or, if the connection doesn’t support lists, a text. For instance: 'Invoice'.                                                                                                                                                                                                                                     | String(254)                                             |    Yes   |
| ERPDeliveryTermsKey       | Either a List id to an id from a connector provided list, or, if the connection doesn’t support lists, a text. For instance: ‘FOB’ (‘Free on board’).                                                                                                                                                                                                                       | String(254)                                             |    Yes   |
| ERPDeliveryTypeKey        | Either a List id to an id from a connector provided list, or, if the connection doesn’t support lists, a text. For instance: ‘Air’.                                                                                                                                                                                                                                         | String(254)                                             |    Yes   |
| Rank                      | Rank/Version number, starts at 1                                                                                                                                                                                                                                                                                                                                            | Int                                                     |    Yes   |
| ApprovedBy                | Id of associate who approved (or rejected approval) for this version                                                                                                                                                                                                                                                                                                        | FK [associate](./associate.mdx)                         |    Yes   |
| ApprovedText              | Text with comments on why approval was granted (or rejected)                                                                                                                                                                                                                                                                                                                | String(1023)                                            |    Yes   |
| ApprovedRegisteredBy      | Id of associate who actually entered the approval; might be different from ApprovedBy (f.x. due to telephone consultation/approval)                                                                                                                                                                                                                                         | FK [associate](./associate.mdx)                         |    Yes   |
| ApprovedRegisteredDate    | When was approval granted or rejected                                                                                                                                                                                                                                                                                                                                       | DateTime                                                |    Yes   |
| extraField1               | Optional information added by Quote Connector; usable in the quote document merge process                                                                                                                                                                                                                                                                                   | String(1023)                                            |    Yes   |
| extraField2               | Optional information added by Quote Connector; usable in the quote document merge process                                                                                                                                                                                                                                                                                   | String(1023)                                            |    Yes   |
| extraField3               | Optional information added by Quote Connector; usable in the quote document merge process                                                                                                                                                                                                                                                                                   | String(1023)                                            |    Yes   |
| extraField4               | Optional information added by Quote Connector; usable in the quote document merge process                                                                                                                                                                                                                                                                                   | String(1023)                                            |    Yes   |
| extraField5               | Optional information added by Quote Connector; usable in the quote document merge process                                                                                                                                                                                                                                                                                   | String(1023)                                            |    Yes   |
| LastRecalculated          | When this version was last subjected to a total recalculation. This field must be set by the connector, since the connector may choose to ignore a RecalculateVersion call based on policies and possibly the current value of this field. SuperOffice will set this field to 1.1.1760 whenever any change occurs to the quote, to indicate that a recalculation is needed. | DateTime                                                |    Yes   |
| registered                | Registered when                                                                                                                                                                                                                                                                                                                                                             | UtcDateTime                                             |    No    |
| registered\_associate\_id | Registered by whom                                                                                                                                                                                                                                                                                                                                                          | FK [associate](./associate.mdx)                         |    No    |
| updated                   | Last updated when                                                                                                                                                                                                                                                                                                                                                           | UtcDateTime                                             |    No    |
| updated\_associate\_id    | Last updated by whom                                                                                                                                                                                                                                                                                                                                                        | FK [associate](./associate.mdx)                         |    No    |
| updatedCount              | Number of updates made to this record                                                                                                                                                                                                                                                                                                                                       | UShort                                                  |    No    |
| request\_associate\_id    | User to whom the request proposal should be delivered                                                                                                                                                                                                                                                                                                                       | FK [associate](./associate.mdx)                         |    Yes   |
| request\_comment          | Comment for why quote should be approved                                                                                                                                                                                                                                                                                                                                    | String(1023)                                            |    Yes   |

<img src="https://mintcdn.com/superofficeas/3ZhivzBeXAvFeVZx/media/loc/en/database/tables/QuoteVersion.png?fit=max&auto=format&n=3ZhivzBeXAvFeVZx&q=85&s=1512f7850ad6fb292d2b5713ede82f26" alt="QuoteVersion table relationship diagram" width="867" height="718" data-path="media/loc/en/database/tables/QuoteVersion.png" />

## Indexes

| Fields             | Types       | Description |
| ------------------ | ----------- | ----------- |
| ERPQuoteVersionKey | String(254) | Index       |
| QuoteId            | FK          | Index       |

## Relationships

| Table                                              | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [appointment](./appointment)                       | Tasks, appointments, followups, phone calls; and documents (document\_id != 0). An appointment always has a corresponding record in VisibleFor specifying who may see this.                                                                                                                                                                                                                                                                                                                                                                                                                             |
| [associate](./associate)                           | Employees, resources and other users - except for External persons                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| [country](./country)                               | Country information                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| [Quote](./quote)                                   | Quote root level, at most one per Sale, always connected to one Sale                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [QuoteAlternative](./quotealternative)             | Quote Version is made up of one or more Alternatives. One of 1..n possible alternatives in a Quote Version. The reason we have alternatives is that a quote can say to a customer, “we can solve you problem in two (or more) different ways, with different technology and sideeffects (and price)”. An Alternative may have discounts on the total amount. The Alternative tracks whether the user on the order level entered the Discount , Earning amount or the TotalPrice fields so that the discount and earning and total can be re-calculated correctly when Quote Lines are added or changed. |
| [QuoteVersionAttachment](./quoteversionattachment) | Actual attachments to a quote                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |

## Replication Flags

* Area Management controlled table. Contents replicated to satellites and traveller databases.
* Copy to satellite and travel prototypes.

## Security Flags

* Sentry controls access to items in this table using user's Role and data rights matrix.


## Related topics

- [QuoteVersionAttachment table](/en/database/tables/quoteversionattachment.md)
- [SuperOffice.WebApi.Data.QuoteVersion](/en/api/reference/webapi/SuperOffice.WebApi.Data.QuoteVersion.md)
- [Update quote](/en/automation/crmscript/howto/quote/update.md)
- [quoteversion](/en/api/mdo-providers/reference/quoteversion.md)
- [Save Quote Version](/en/api/reference/restful/agent/quote_agent/save-quote-version.md)
- [Quote table](/en/database/tables/quote.md)
