--- alias: tutorials-creating-batch-from-entity title: Creating a Batch from the Batch Entity description: "Create batches by configuring resources, defining capacities, and specifying materials within the system" --- # Creating a Batch from the Batch Entity There are two ways to create a Batch: from the **Batch Entity page** or the **Resource View**. This section will guide you through all the necessary steps to creating a Batch from the entity pages. By following these instructions, you will be able to properly configure Batch Resources, define Resource Capacities, and successfully create Batches. ## Step 1: Configure a Batch Resource To begin, select a **Resource** — such as `Baker-01` — and navigate to the Scheduling/Batching section. Select the **Manage** button and, within the Schedule Configuration section, change the Scheduling Type to `Batch`. ![Screenshot showing a batch resource configuration interface with options for managing resource scheduling and configuring schedules.](../images/manage_resource_scheduling_schedule.png) Once this setting is applied, the Batch Configuration section becomes available. In this section, fill in all the relevant details, such as: * Set the Minimum Batch Capacity Usage to `25%`, which defines the minimum size of the Batch. If this value is not reached, the system won't allow you to proceed. * Set Material Split Mode to `Allowed`. This defines if the Materials can be split if the Batch reaches full capacity. * Define the Processing Mode as `Batch`. This defines the processing mode of the Resource and has to be defined as `Batch`, otherwise you won't be able to use Batch management. * Select `Standard` as the Batch Type from the [[batchtype-lt]] lookup table. For more information, see [[tutorials-howto-editlookuptable]]. * Set Load Mode to `None`. When set to `None`, the system will automatically load and unload the Materials and the Batch will transition automatically from Created to Queued once the Release Batch operation is performed (skipping the Released system state). * Select `General` from the [[containertype-lt]] lookup table for the Container Type. ![Screenshot showing a configuration step for a batch resource, with a dropdown menu selecting "General" from the [[containertype-lt]] lookup table.](../images/manage_resource_scheduling_batch.png) After filling in the required details, select **Update** to save the configuration. The Scheduling and Batching section will now display a new Batch Configuration section summarizing the configured settings. === "Before" ![Screenshot showing the Scheduling and Batching section of the configuration page.](../images/scheduling_batching_section_before.png) === "After" ![Screenshot showing a configuration page for a batch resource in the Scheduling and Batching section of an application.](../images/scheduling_batching_section_after.png) ## Step 2: Define the Resource Capacity Before creating a **Batch**, it is essential to define the **Resource Capacity** of the **Batch Resource**. This determines how many Batches can be accommodated by the selected Resource. For example, Baker-01 may hold 100 small Batches, 50 medium ones, or only 2 large Batches. To configure the **Resource Capacity**, navigate to the Contexts view of the **Resource** page and select the **Resource Capacity** section. Select the :material-plus: icon to add as many capacity records as necessary, or alternatively, edit the [[resourcecapacity-st]] Smart Table. For more information, see [[tutorials-howto-addvaluetosmarttable]]. When adding a **Resource Capacity** record, specify the **Resource**, **Capacity Class**, and **Capacity**. The values for Capacity Class come from the [[capacityclass-lt]] Lookup Table, which must be populated before proceeding. For more information, see [[tutorials-howto-editlookuptable]]. For Baker-01, create three entries: * Small Capacity Class with a capacity of `100`. * Medium Capacity Class with a capacity of `50`. * Large Capacity Class with a capacity of `2`. ![Screenshot showing a Resource Capacity input field with a Large Capacity Class selected, having a capacity of 2.](../images/add_resource_capacity.png) ## Step 3: Create a Batch With the Batch Resource configured and capacity defined, it is now possible to create a **Batch**. Navigate to the Business Menu, select the **Batch Entity**, and select the **New** button on the top ribbon. This opens the **Create Batch** wizard, where you can: * Enter a name (for example, `Batch-01`) and description. * Assign the **Batch** to a **Resource** (for example, `Baker-01`). * Define the **Step** (for example, `Baking`). * Optionally, set the Priority to `5`. ![Screenshot showing a UI with fields for "Create Batch" and "Priority", with a filename hint of "create batch 01".](../images/create_batch_01.png) Next, select the **Materials** to include in the **Batch**. Only Materials with an assigned Capacity Class are available for selection. Select the :material-plus: icon to add Materials. ![Screenshot showing the step to select materials for a batch, with an icon indicating available capacity class assignments.](../images/create_batch_materials.png) The **Capacity Class** impacts the [[tutorials-batch-batchsize]], as indicated by the blue progress bar at the bottom of the wizard. Sufficient Materials must be added to meet the Minimum Batch Capacity defined in the [[tutorials-creating-batch-from-entity#step-1-configure-a-batch-resource|Configure a Batch Resource]] section; otherwise, the system will not allow you to continue. !!! info For more information, see [[tutorials-batch-batchsize]]. If multiple Materials are selected, one must be designated as the **Main Material**, by enabling the **Set as Main Material** toggle button. This action establishes the **Product** and the **Capacity Class** of the **Batch**. If a Main Material is already set, it must be changed before it can be removed. ![Screenshot showing a batch creation interface with fields for multiple materials and a toggle button to set one as Main Material.](../images/create_batch_materials_02.png) The **Material Search** field provides filtering options to help in the Material selection process. Filters include `Specific Batch Product and Step`, ensuring only **Materials** with the same **Product** and **Step** are displayed. **Materials** can be added as long as the total does not exceed the **Batch Size**. If Material Split Mode was set to `Allowed` during Batch configuration, the primary quantity of the last-added Material will be adjusted to fit within the Batch Capacity. If Material Split Mode is set to `Not Allowed` and the Batch Capacity is exceeded, the system will not allow you to continue until meet the requirements. By default, the system executes a **Split for Step Future Action**, instead of the Split Future Action, meaning the Material is split while in the Queued state and merges back once Processed. !!! info To modify the default setting for the Use Split for Step When Splitting toggle button, access the [[guielementdefaultvalue-gt]] and edit the `Batch.ManageMaterials` entry. ![Screenshot showing a UI with a toggle button labeled "Use Split for Step When Splitting" and an edit field for Batch.ManageMateria… settings.](../images/create_batch_materials_04.png) Finally, **Containers** can be added by selecting the :material-plus: icon. Once all required information is provided, select **Create** to complete the operation. ![Screenshot showing a UI for creating a batch with fields for container details and a "Create" button.](../images/create_batch_containers.png) Upon creation, all Batch details — including Materials and Containers — can be viewed on the Batch page. For more information, see [[user-guide-batch-page]]. ![Screenshot showing a tutorial batch creation page with fields for required information.](../images/tutorial_batch_page.png) !!! info Creating a Batch automatically generates a corresponding Resource Job. All Materials and Containers assigned to the Batch are also included in this Resource Job. When the Batch is executed, the system executes the associated Resource Job simultaneously. For the next steps, see [[tutorials-managing-batch-entity-page]]. !!! tip Take full advantage of the Batch management feature, see [[tutorials-creating-batch-resource-view]].