--- alias: howto-iot-import-dee-action title: "How To: Create or Import a DEE Action" description: "Two ways to add a DEE Action to MES: import a pre-written C# file directly into the DEE Actions page, or create a new action manually in the MES UI." --- # How To: Create or Import a DEE Action DEE (Dynamic Execution Engine) Actions are C# code blocks that extend MES behavior. In the context of **Automation Scheduled Action**, they can be used at any pipeline stage to integrate with external systems or express logic that built-in types cannot cover. The tutorial provides pre-written DEE stubs in `scenarios/dees/`. The fastest path is to import those files directly (Option 1). If you need to create a new action from scratch, use Option 2. ## Option 1 - Import a C# File 1. Navigate to **Administration → DEE Actions**. 2. Select **Import** on the top ribbon. 3. Select and upload the `.cs` file. 4. MES creates the action and validates the code automatically. 5. Open the imported action and confirm **Is Enabled** is set correctly before use. For reference, see [Importing a DEE Action](https://help.criticalmanufacturing.com/userguide/administration/dee_actions/#importing-a-dee-action). ## Option 2 - Create Manually 1. Navigate to **Administration → DEE Actions**. 2. Select **New DEE Action**. 3. Enter a name - you will reference it in the **ASA** Definition. 4. Optionally, enter a description and classification. 5. Set `Is Enabled` to the desired state. A disabled action will not execute. 6. If the **DEE Action** should run automatically as part of pre-action or post-action logic, add it to one or more **DEE Action Groups**. For ASA-specific actions, groups are not required. 7. The Test Condition must return `true` for the action code to run as `false` to skip it. 8. Edit the **DEE Action Code** and paste or write your C# implementation. 9. Select **Save**. The code is validated automatically. You can also validate explicitly at any time using **Validate**. For reference, see [Creating DEE Actions](https://developer.criticalmanufacturing.com/explore/guides/customizations/business/createdeeactions/#creating-dee-actions).