# Block order

This page provides information on the usage of block orders. For comprehensive details on how block orders function, please refer to MATS functional documentation.
## Understanding the basics
![image.png](/services/api/attachments/c4eaabdc-8c65-40b7-a6d0-b8a1eb37e400)

1. Details, including auction date, closure time, auction, delivery date, bidding level, portfolio, duration and currency can be found in the dark banner.
2. There are four block types, specified by BlockCodes: C01 for Standard, C02 for Linked, C04 for Exclusive, and C88 for Loop.
    1. In specific markets, users can combine C04 and C02 blocks to create Exclusive links.
3. When adding a new block, a dummy Block ID is automatically generated. Upon submission of the block order, an official Block ID is created in the system. A Block ID can be used as a reference for the BlockCodePRM or to overwrite an existing block order.
4. The BlockCodePRM can be used to make a relationship with a different block order within the same block type. The BlockCodePRM is enabled for the C02, C04 and C88 block types. 
5. An optional comment can be added here.
6. The minimum acceptance ratio (MAR) is by default 1.00 which stands for 100%. 
7. A mandatory limit price must be entered here.
8. The total amount of MW can be found here. It is calculated automatically.
9. In this example, the auction lasts for 24 hours, and each period has a duration of 60 minutes. A tooltip will appear, displaying the time of a specific period when hovering over the periods.
10. Within the grid, the amount of megawatts (MW) can be specified. Entering positive values allows MW to be bought, while entering negative values allows MW to be sold. Buying and selling within the same block order is not possible. 
11. Block orders are categorized. A new block will appear at the top in the 'New' category, while submitted block orders will be placed in their respective block type categories.
12. Feedback messages will be displayed in this bar.
13. Option to enable Simple view mode.
14. Sum row, totaling all the volumes (MW) for each delivery period and overall submitted.

```
ℹ️ Each Block order screen represents a combination of Portfolio, Bidding Level and Duration. In case of multiple durations offered, you will have a view for each Duration. All durations are offered under the same Portfolio / Bidding level combination for a given auction or delivery date.
```
```
ℹ️ DST23: In case of short clock change, there will be one less hour available in the screen, meaning that the periods will be:
- 60min orders: 1,2,4,5...24
- 30min orders: 1,2,3,4,7,8...48
- 15min orders: 1,2,3,4,5,6,7,8,13,14...96
```
```
ℹ️ DST25: In case of long clock change, there will be an additional hour available in the screen, meaning that the periods will be:
- 60min orders: 1-25
- 30min orders: 1-50
- 15min orders: 1-100
```
```
ℹ️ Fallback: If an unexpected situation occurs during an auction (for example, a partial decoupling) and the auction switches to Fallback mode, this exceptional status is indicated by a warning message displayed below the auction details on the left-hand side of the screen.
```
## How to update and submit
Block orders can be updated in multiple ways:
* Manually.
* Using the Excel paste functionality.
* [Import orders](https://mats.portal.swaggerhub.com/mats-web-client/default/order-management-1?preview=product#how-to-use-the-block-order-template) within Order management screen.
* Manually, using the Simple view functionality.


**How to create a block order manually**
1. Click the ‘Add block’ button.
2. Selecting different block types.
    1. C01 Standard - The BlockCodePRM field is not enabled.
    2. C02 Linked -  A relationship is made by entering the Block ID of a different block order (the parent can either be a C01 or C02) in the BlockCodePRM column. One parent can have multiple children.
    3. C04 Exclusive - A relationship is made by entering the same code for the blocks of the group in the BlockCodePRM column.
        1. Exclusive links - A relationship is made by entering the Block ID of a different block order (the parent can either be a C04) in the BlockCodePRM column.  
    4. C88 Loop - A relationship is made by entering the same code for the blocks of the family in the BlockCodePRM column.
```
ℹ️ A maximum of two loop block orders are allowed per loop family
```
3. Specify the Minimum Acceptance Ratio (MAR).
4. Specify the Price.
5. Specify the MW quantities for different periods.
```
ℹ️ Use [tab] key to select the cell to the right.
```
6. Once finished, click the 'Submit' button.
**How to edit a block order manually**
![image.png](/services/api/attachments/39a531c6-ed25-4594-af1b-48ee26ee3286)
1. Hover over the block order that needs to be edited.
2. Click the appearing edit icon on the right of the grid
```
ℹ️ It is possible to edit multiple block orders simultaneously.
```
3. Update the block order
```
ℹ️ It is not possible to edit the BlockCode, Block ID or 
BlockCodePRM of an active block order.
```
4. Once finished editing, click the 'Submit' button.  
![image.png](/services/api/attachments/25cd4bf9-afeb-4378-95ac-4e37784ddcb8)
```
ℹ️ If you decide not to make the change while editing the order, you can 
cancel the change by clicking 'x' icon at the end of the row.
```

**How to create a block order using the Excel paste functionality**
By copying from Excel and pasting into the grid, the BlockCode, Block ID, BlockCodePRM, Comment, MAR, Price, and volumes of multiple **new** block orders can be created simultaneously. A block order Excel template can be downloaded in Order management screen.
1. Prepare your order in Excel, including BlockCode, Block ID (optional), BlockCodePRM (for C02, C04 and C88), Comment (optional), MAR, Price, volumes and periods.
2. Select the BlockCode, Block ID, BlockCodePRM, Comment, MAR, Price, volumes and periods.
3. Copy the selected data.
4. Navigate back to the block order screen and select a random cell.
5. Paste the copied data into grid.
6. The grid will be automatically updated, the created orders are placed on top in the ‘New’ category.


**How to edit a block order using the Excel paste functionality**
By copying from Excel and pasting into the grid, the Comment, MAR, Price, and volumes of multiple existing block orders can be updated simultaneously. A block order Excel template can be downloaded from Order management or by using the ‘Export order’ button. 
1. Prepare your order in Excel, including BlockCode, Block ID of the active order(s) to be edited, BlockCodePRM (for C02, C04 and C88), Comment (optional), MAR, Price, volumes and periods.
```
ℹ️ Use the export functionality to easily update the necessary information 
in Excel.
```
2. Select the BlockCode, Block ID, BlockCodePRM, Comment, MAR, Price, volumes and periods.
3. Copy the selected data.
4. Navigate back to the block order screen and select a random cell.
5. Paste the copied data into grid.
6. Active orders with matching block IDs will be automatically updated and switched to Edit mode.


**How to submit**
![image.png](/services/api/attachments/912478aa-78d6-477a-82b3-5b5c772d7581)
By updating the orders, the ‘Submit’ button becomes enabled. By clicking ‘Submit’ the order is either:
1. Rejected. A red feedback message will appear on top. 
2. Successful. A green confirmation message will appear on top. Additionally:
    1. The submitted block order has been placed in its respective block type category.
    2. The dummy Block ID has been updated towards an official Block ID.
    3. The editable cells of the newly submitted block order will be highlighted in green.

**How to create a block order using the Simple view functionality**
![image.png](/services/api/attachments/a9940e40-efee-4f76-8428-be7b44d63978)
1. Switch the screen to simple view mode.
2. Click the ‘Add block’ button.
3. Select block type.
5. Specify the Minimum Acceptance Ratio (MAR).
6. Specify the Price.
7. Specify the MW quantity.
8. Specify the range:
    1. By either double clicking the cell and opening the dropdown of available block definitions OR
    2. By entering a specific range of delivery periods, e.g. 1-7, 9-12
![image.png](/services/api/attachments/757d4614-bb08-456f-a690-df262f46745c)
9.  Once finished, click the 'Submit' button.

**How to edit a block order using the Simple view functionality**
1. Hover over the block order that needs to be edited.
2. Click the appearing edit icon on the right of the grid.
```
ℹ️ It is possible to edit multiple block orders simultaneously.
```
3. Update the block order (either the volume or period range)*
```
ℹ️ It is not possible to edit the BlockCode, Block ID or 
BlockCodePRM of an active block order.
```
4. Once finished editing, click the 'Submit' button.  
```
ℹ️ If you decide not to make the change while editing the order, you can 
cancel the change by clicking 'x' icon at the end of the row.
```
*To update volumes in specific periods, switch back to Advanced view / switch off Simple view and follow the same steps as when editing block orders manually. In case you update several periods with different volumes, when switching back to simple view, you will see an icon in the Volume cell indicating that the volumes are variable between delivery periods.
![image.png](/services/api/attachments/859c890b-1acc-44b8-bbd9-f216c3498b02)

### 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 export
Clicking the 'Export orders' button will automatically export the orders, including the BlockCode, Block ID, BlockCodePRM, Comment, MAR, Price, and volumes.

## How to delete
When an order is active and the order book is open, it’s possible to:
1. Delete a single C01 block order.
2. Delete a C02, C04 and C88 block group or family.
3. Delete all blocks for the Portfolio / Bidding level / Duration combination

**Delete a single C01 block order**
1. Hover over the block order that needs to be deleted.
2. Click the appearing delete icon on the right of the grid.
3. This will activate a confirmation dialogue. Once confirmed, the order will be permanently removed. This action cannot be undone.


**Delete a C02, C04 and C88 block group**
1. Hover over a block order that is part of the group that needs to be deleted.
2. Click the appearing delete icon on the right of the grid.
3. This will activate a confirmation dialogue. Once confirmed, the block order group will be permanently removed. This action cannot be undone.

**Delete all blocks**
1. Navigate to the 'Delete all' button in the bottom left corner of the screen.
2. Click the button.
3. This will activate a confirmation dialogue with the number of block orders that will be deleted. Once confirmed, the orders will be permanently removed. This action cannot be undone. 

## How to customise the grid
![Density menu (1).png](/services/api/attachments/473ed8c3-b4e1-42b1-aee9-a219f7d9b96a)
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 horizontal unit density to modify the width of 'Total' and period columns.
    2. Select your desired vertical row density to modify the height of order rows.
