> ## 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.

# salestage

> Provider for selecting a stage. AdditionalInfo is used as criteria to filter stages based on SaleType.

## "salestage" MDO List

Provider for selecting a stage. AdditionalInfo is used as criteria to filter stages based on SaleType.

Sold(-2) and Lost(-1) items are appended  at the end of the list.

AdditionalInfo "SaleTypeID=123\&GetDeletedStages=true\&HideOptionalRows=false\&GetDeletedStageLinks=true"

Implemented by the <see cref="T:SuperOffice.CRM.Lists.SaleStageProvider">SaleStageProvider</see> class.
The name of the MDO list is 'salestage'.

## Additional Attributes

| Description                         | Name                 | Example Value |
| ----------------------------------- | -------------------- | ------------- |
| Sale type to get stages for         | SaleTypeID           | 1234          |
| Sale types to get stages for        | SaleTypeIDs          | 1,2,3,4       |
| Include deleted stages              | GetDeletedStages     | True          |
| Filter out deleted sale stage links | GetDeletedStageLinks | False         |
| Filter out optional stages          | HideOptionalRows     | False         |

Separator: &

## Sample Request

```http! theme={null}
GET /api/v1/MDOList/salestage
Authorization: Basic dGplMDpUamUw
Accept: application/json; charset=utf-8
Accept-Language: *

```

## Sample Code

```cs theme={null}
var listProvider = ClassFactory.CreateRequired<SuperOffice.CRM.Lists.ISoListProviderFactory>().Create("salestage", forceFlatList: true);
foreach (var item in listProvider.RootItems) {
    Console.WriteLine("{0} {1} {2} {3}", 
         item.Id, ResourceManager.ParseInlineResources(item.Name), item.StyleHint, item.ExtraInfo);
}
```

## Sample Output

| Id | Name               | StyleHint | ExtraInfo                                               |
| -- | ------------------ | --------- | ------------------------------------------------------- |
| 4  | Første møte        |           | IsDeleted=False\&Probability=20\&SaleTypeStageLinkId=1& |
| 1  | Sendt tilbud       |           | IsDeleted=False\&Probability=30\&SaleTypeStageLinkId=2& |
| 5  | Andre møte         |           | IsDeleted=False\&Probability=50\&SaleTypeStageLinkId=3& |
| 2  | Sluttforhandlinger |           | IsDeleted=False\&Probability=80\&SaleTypeStageLinkId=4& |
| 3  | Muntlig aksept     |           | IsDeleted=False\&Probability=90\&SaleTypeStageLinkId=5& |
| -2 | Sold               |           | Probability=100                                         |
| -1 | Lost               |           | Probability=0                                           |

## Related MDO Lists

* "salestageheadings"
* "salestageheadingswithallitem"
* "salestageheadingswithallitemwithnoselection"
* "salestageheadingswithnoselection"
* "salestagewithallitem"
* "salestagewithallitemwithnoselection"
* "salestagewithnoselection"


## Related topics

- [SuperOffice.WebApi.Data.SaleStageEntity](/en/api/reference/webapi/SuperOffice.WebApi.Data.SaleStageEntity.md)
- [SuperOffice.WebApi.Agents.IListAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IListAgent.md)
- [SuperOffice.WebApi.Agents.ListAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.ListAgent.md)
- [Enum values for TimeKeepingType](/en/database/tables/enums/timekeepingtype.md)
- [SuperOffice.WebApi.Data.SaleTypeEntity](/en/api/reference/webapi/SuperOffice.WebApi.Data.SaleTypeEntity.md)
- [saleguidestage](/en/api/mdo-providers/reference/saleguidestage.md)
