--- alias: tutorials-create-sampling-plan title: Creating a Sampling Plan description: "Create a sampling plan with default sampling rules and context definitions" --- # Creating a Sampling Plan The [[user-guide-sampling-plan-page|Sampling Plan]] entity defines when and/or how often sampling occurs at each production **Step**. Example: a sample is taken every 3 lots or every 2 hours of production. ## How to Create a Sampling Plan In the **Business Data** section, select the **Sampling Plan** entity. ![Screenshot showing the Sampling Plan entity in the Business Data area.](../images/sampling_01.png) Select **New** to create a new **Sampling Plan**. ![Screenshot showing the action used to create a new Sampling Plan.](../images/sampling_02.png) Provide a **Name**, **Type**, and optionally add a **Description**. In **Default Sampling**, select a **Type** that matches the purpose of the **Sampling Plan** in the real use case. The available options are Counter And Time-Based, Counter-Based, and Time-Based. ![Screenshot showing the general data step for a Sampling Plan.](../images/sampling_03.png) For scenarios where sampling must be executed according to time, select **Time-Based** and choose the **Time Frequency** in hours. ![Screenshot showing a Time-Based Sampling Plan configuration.](../images/sampling_04.png) For scenarios where sampling must be executed according to counting materials, select **Counter-Based** and choose the **Counter Frequency** in number of materials. ![Screenshot showing a Counter-Based Sampling Plan configuration.](../images/sampling_05.png) For scenarios where sampling must be executed based on either time or count, whichever occurs first, select **Counter And Time-Based** and choose both **Counter Frequency** and **Time Frequency**. ![Screenshot showing a Counter and Time-Based Sampling Plan configuration.](../images/sampling_06.png) In the **Contexts** step of the wizard, select the :material-plus: icon to add contexts to the **Sampling Plan**. ![Screenshot showing the contexts step of the Sampling Plan wizard.](../images/sampling_07.png) A **Context** of a **Sampling Plan** adds flexibility and lets you define [[user-guide-manage-instances-sampling-plan|Sampling Plan Instances]] in advance. Define at least one **Context**. For more information about **Sampling Plan Contexts** and which ones are available, refer to [[user-guide-create-sampling-plan]]. !!! tip Although the system creates [[user-guide-manage-instances-sampling-plan|Sampling Plan Instances]] automatically whenever the first Material of a given Context enters the specified Step, you can also create a Sampling Plan Instance in advance. To do so, use a Sampling Plan Context on the [[user-guide-sampling-plan-page|Sampling Plan]] page and define its values, which can differ from the values configured in the Sampling Plan entity. ![Screenshot showing Sampling Plan context details.](../images/sampling_08.png) ![Screenshot showing Sampling Plan instance context values.](../images/sampling_09.png) ### Example ![Screenshot showing an example Sampling Plan configuration.](../images/sampling_10.png) For more information about **Sampling Plan**, refer to [[user-guide-create-sampling-plan]] and [[user-guide-sampling-plan-page]].