---
alias: user-guide-sampling-plan-index
description: "Defines a method for implementing sampling within a manufacturing process flow"
---
# Sampling Plan
:lock: SamplingPlan.**Show**
!!! info
Sampling is a Critical Manufacturing optional module.
## Overview
A **Sampling Plan** is used to implement counter based and time based sampling. The **Sampling Plan** defines the contexts, the counter and time frequency and can be attached to multiple **Steps**. A **Step**, in turn, can have multiple **Sampling Plans** attached.
Sampling works in combination with the MoveNext operation. It requires the following:
1. A **Step** marked as Sampling Evaluation Step, where the **Sampling Plans** are attached, and where a decision to perform sampling or not is taken.
2. A single optional Sampling Step after the Sampling Evaluation Step.
At the MoveNext operation, the system will lookup the sampling information and determine whether the **Material** must perform or skip the optional Sampling step. This process is illustrated in the next picture.
```mermaid
flowchart LR
subgraph Materials
M5[Material
M5]
M4[Material
M4]
M3[Material
M3]
end
subgraph
direction LR
subgraph Step1
S1(("Sampling
Evaluation
Step"))
end
subgraph "Step2 (Optional)"
S2(("Sampling
Step"))
end
subgraph Step3
S3(("Process
Step"))
end
S1 --- M1[Material
M1] ---> S2 --> S3
S1 --- M2[Material
M2] ---> S3
end
Materials --> S1
class M1,M2,M3,M4,M5 mermaid_flowchart_material
class S1,S2,S3 mermaid_flowchart_step
```
## Tying Everything Together
```mermaid
graph TD
A1[Step] === Main[Sampling Plan] === L1[Sampling Context Information] --- L2[Sampling Plan Instance Context Values] --- L3[Sampling Plan Instance]
Main === L3
classDef mermaid_title color:#000, fill:#fafafa, stroke:#fafafa, stroke-width:0x, font-size:100%, font-weight:200;
classDef mermaid_start color:#000, fill:#fafafa, stroke:#fafafa, color:#fafafa, stroke-width:0x, font-size:100%, visibility: hidden;
classDef mermaid_businessdata color:#000, fill:#65CDE8, stroke:#65CDE8, stroke-width:0px, font-size:100%;
classDef mermaid_nonbusinessdata color:#000, fill:#B7DEE8, stroke:#B7DEE8, stroke-width:0px, font-size:100%;
classDef mermaid_entity color:#000, fill:#FB9F53, stroke:#FB9F53, stroke-width:0px, font-size:100%;
classDef mermaid_entitylinked color:#000, fill:#FCD5B5, stroke:#FCD5B5, stroke-width:0px, font-size:100%;
classDef mermaid_context color:#000, fill:#B9CDE5, stroke:#B9CDE5, stroke-width:0px, font-size:100%;
classDef mermaid_optional color:#000, fill:#B7DEE8, stroke:#65CDE8, stroke-width:1px, font-size:100%, stroke-dasharray: 5 5;
class Main mermaid_entity
class A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14 mermaid_businessdata
class L1,L2,L3,L4,L5,L6,L7 mermaid_entitylinked
class C1,C2,C3,C4,C5,C6 mermaid_context
class N1,N2,N3,N4,N5,N6 mermaid_nonbusinessdata
click Main "../../business-data/sampling-plan"
click A1 "../../business-data/step"
```
## Sequence Of Steps
The necessary steps for correctly using a **Sampling Plan** are the following:
1. Create a **Flow** with an Evaluation Step, followed by an optional Sampling Step.
2. Create the Sampling Plan.
3. Mark the Evaluation Step as Evaluation Step and then attach the created **Sampling Plan** to the **Step**.
{{ generate_index() }}