# Sc. complex order

This page provides information on the usage of scalable complex orders. For comprehensive details on how scalable complex orders function, please refer to MATS functional documentation.
```
ℹ️ Please note that scalable complex orders are only available on 
SEMOpx markets.
```
## Understanding the basics
![image.png](/services/api/attachments/3ca6f39f-0473-473c-81ff-95820e8edc1e)
1. Details, including auction date, closure time, auction, delivery date, bidding level, portfolio, duration and currency can be found in the dark banner.
2. The minimum acceptance volume (MAV) needs to be specified in megawatts (MW). 
3. The minimum and maximum price for this order can be found here. It is possible to add prices within this range. 
4. In this example the auction lasts for 24 hours and each period has a duration of 30 minutes. A tooltip will appear, displaying the time of a specific period, by hovering over the periods. 
5. Within the grid the amount of megawatts (MW) can be specified. By entering negative values MW can be sold. Please note that for sc. complex order, only selling is possible.
6. Feedback messages will appear in this bar. 
7. The fixed term can only be positive.
8. Within the gradients the amount of megawatts (MW) can be specified. Enter only positive values. Please also note that the gradients are optional. 
9. As default the Schedule Stop Periods is 0. Select in the dropdown the preferred period amount.
10. In this example, bottom period pinning is applied, ensuring the 48th period remains visible at all times.
11. The pinned bottom row contains a SUM function, totaling the values for each price. 

```
ℹ️ Each Sc. complex order screen represents a combination of Portfolio, Bidding Level and Duration. 
```
```
ℹ️ DST23: In case of short clock change, there will be one less hour available in the screen, meaning that the periods will be:
- 30min orders: 1,2,3,4,7,8...48
```
```
ℹ️ DST25: In case of long clock change, there will be an additional hour available in the screen, meaning that the periods will be:
- 30min orders: 1-50
```

## How to update and submit
Sc. complex orders can be updated in multiple ways:
1. Manually.
2. Using the Excel paste functionality.
3. [Import orders](https://mats.portal.swaggerhub.com/mats-web-client/default/order-management-1?preview=product#how-to-use-the-scalable-complex-order-template) within Order management screen.

**Manually**
* Click on the desired cell within the grid.
* Type the amount of MW directly into the cell.
```
ℹ️ Use the [enter] key key to select the next period.
```
```
ℹ️ Use the [tab] key to select the next price.
```
To add prices within the minimum and maximum price range, click the ‘Edit prices’ button and enter prices in the dialogue.
![image.png](/services/api/attachments/495e1862-b9d7-4027-ab5e-7ea3c80331dd)

```
ℹ️ Use the [enter] key to add prices and click 'Confirm' button to add the desired prices to the grid.
```

When added prices are selected, the delete functionality becomes available. If the same price is entered twice, an arrow appears, allowing the order of the prices to be switched.
![image.png](/services/api/attachments/766a5d47-3bba-4a41-aad3-ab61515b39e9)
By confirming the prices, the grid will be updated.

**Using the Excel paste functionality**
By copying from Excel and by pasting in the grid, fixed term, gradients, Schedule Stop Periods, comments, prices, MAV and volumes can be updated. A sc. complex order template can be downloaded from Order management or by using the ‘Export order’ button.

1. Prepare your order in Excel, including parameters (fixed term, gradients, ...), comments, periods, prices, and volumes.
2. Select the parameters, comments, periods, prices, and volumes.
```
ℹ️  Select the comment column, even if it's empty.
```
3. Copy the selected data.

4. Navigate back to the sc. complex order screen and select a random cell.

5. Paste the copied data into grid.

6. The grid will be automatically updated.

By updating the order, the ‘Submit’ button becomes enabled. By clicking ‘Submit’ the order is either:

1. Rejected. A red feedback message will appear on top.
2. Accepted. A green confirmation message will appear on top. The dark banner is updated and will display the date and time of the last update, along with the order status and Order ID.

### Discard changes
```
In case of mistake or need to annul the entry in the grid, you can easily revert the change by clicking 'Discard changes' button in the bottom of the screen.
```


## How to submit multiple delivery dates
![image.png](/services/api/attachments/80c0c8d6-46d7-4bff-9433-8cc474b3ed5a)
Click the chevron next to 'Submit' to select multiple delivery dates.
![](/services/api/attachments/d4b47313-78ae-4e77-91d8-e1ab472e4b17)
Hover over calendar dates to highlight the maximum of seven consecutive days. Select the first date to start the range. Unavailable dates are disabled.
![](/services/api/attachments/d2d341ab-0aa3-43ed-9b2a-aecc8942689e)
In this example 7, 10 and 12 November are selected. Clicking dates within the highlighted range selects them. Clicking outside the range resets the selection.
```
ℹ️ Hold the [shift] key and click the start and end dates to select the entire range.
```
Click 'Submit' to confirm the selected dates.
![](/services/api/attachments/23eddb35-9958-4f35-9135-de82ce771721)
The dialogue displays feedback confirming whether submission was successful or rejected. Closing the dialogue will result in returning to the sc. complex order with the original date. 
### Impact of clock change on multiple delivery date submission
#### Long clock change (DST25)
In case the period under multiple delivery dates submission include the long clock change day, MATS will duplicate the values from the second hour to the third hour, while shifting all the remaining values. 

This means that: 
- For orders in 30min duration, values from periods 5-6 will be duplicated in periods 7-8

## How to export
Clicking the 'Export order' button will automatically export the order, including the order ID, in Excel format if the order is active. For inactive orders, a confirmation dialogue will appear.

## How to view and reactivate versions
Each time an order is updated and submitted, a new version is added. Clicking the 'Select version' field will reveal a dropdown menu, enabling to switch to previous versions.

When an inactive order is selected from the dropdown menu, it can be reactivated by clicking the 'Submit' button in the bottom right. All other versions will remain available.

## How to delete
When an order is active and the order book is open, the order can be deleted by clicking the 'Delete order' button. This will open a confirmation dialogue. Once confirmed, all versions of the order will be permanently removed, and this action cannot be undone.

## How to customise the grid
![Default (17).png](/services/api/attachments/8797d432-2a3b-4bbf-8c95-e95c48592fa7)
1. To modify how you view the grid, click on the top right corner of the grid to open the 'more' menu. From there, you can:

    1. Select your desired density option to modify the height of period rows.

    2. Enable the comment feature by clicking the toggle.

    3. Select your preferred decimal separator for Excel paste functionality (and viewing the grid).
