How to Set Up Statistical Sampling for a Quality Inspection in NetSuite

Create a Statistical Sampling Template with lot-size bands in NetSuite Quality Management, build an inspection that uses it, and see the four sampling summary data fields NetSuite adds to it.

The quick answer

Go to Quality > Setup > Statistical Sampling Template and click New QM Statistical Sampling Template. Enter a name, a sampling rate and the allowable critical, major and minor defects, and save. On the saved template's Sampling Details tab, add one line for each lot-size band. Then go to Quality > Setup > Inspections, click New Quality Inspection, choose Statistical Sampling as the Sampling Requirement and pick the template. Saving the inspection automatically adds four sampling summary data fields to it. The inspection still needs pass rules and a quality specification before it does any work.

The screenshots show sample data. Person and company names are fictional. Use your own template, bands and inspection names when following the steps.

This guide sets up the sampling plan and the inspection that points to it, in one account. It doesn't add the inspection to a quality specification, create pass rules or run an inspection, and those still decide whether a receipt or work order ends up using the plan. It also doesn't test lots outside the Sampling Details ranges, automatic calculation of the summary counts or other versions of Quality Management. Menu names, columns and fields can vary by version, role and form.

Before you start

In this example, Alex Morgan at Example Supply Co. wants finished sealed packs checked by sampling, with a bigger share inspected on small lots and a smaller share on large ones. You need:

  • Quality Management installed, so the Quality tab has a Setup group with Data Fields, Inspections, Specifications, Assign Inspections and Statistical Sampling Template.
  • Permission to create QM Statistical Sampling Template, QM Statistical Sampling Details and Quality Inspection records.
  • A decision on percentages or counts. The Enable Sampling Rates by Number box decides how the sampling rate and the allowable defects are read: as percentages when it is cleared, as counts when it is checked. In the reviewed account the box was greyed out when a saved template was opened for edit, so decide before you save. This example leaves it cleared, so its rates and limits are percentages.
  • The lot-size bands. The example covers 1 to 500 units. The bands should cover every lot size you expect and shouldn't overlap.

01. Create the sampling template

Go to Quality > Setup > Statistical Sampling Template. The list shows the templates in the account. In this example there are two, Incoming Carton Plan and Count Based Plan, and the total reads 2. The columns run past the right edge of a normal window.

Two templates exist before the new one.

Click New QM Statistical Sampling Template. Name, Sampling Rate and the three allowable-defect fields are required on this form. Enter Sealed Pack Sampling Plan as the Name, 2 as the Quality Level and G-II as the Inspection Category. Enter 20 as the Sampling Rate and 0, 2 and 5 as the Allowable Critical, Major and Minor Defects. Leave Enable Sampling Rates by Number cleared. Quality Level and Inspection Category are free text boxes that classify the template. They don't pick the template for an inspection, and nothing in this setup ties them to an item or a transaction.

The header values of the Sealed Pack Sampling Plan.

Click Save. The saved template opens on its Notes tab, with Files, Workflow and Sampling Details beside it. The header holds the template's general sampling rate and limits. The Sampling Details lines you add next apply by lot size.

The saved template. Sampling Details is the last tab.

02. Add the lot-size bands

Click the Sampling Details tab, then New QM Statistical Sampling Details. The Template Name is already filled in. Enter C as the Code, 1 as the Minimum Quantity, 100 as the Maximum Quantity, 30 as the Sampling Rate and 0, 3 and 6 as the allowable critical, major and minor defects. Click Save.

The first line covers lots of 1 to 100 units.

NetSuite returns to the template. Open Sampling Details to see the line, then click New QM Statistical Sampling Details again and add a second line: Code F, Minimum Quantity 101, Maximum Quantity 500, Sampling Rate 15 and allowable defects 0, 2 and 4. Both lines are now listed, the smaller lots with the larger sampling rate.

Two lines cover lots from 1 to 500 units.

Lots above 500 units have no line in this example. Whether the header values apply to a quantity outside every line, or the lot isn't sampled, wasn't tested here, so add a line for every lot size you expect and test the boundary quantities in a sandbox.

03. Create the statistical inspection

Go to Quality > Setup > Inspections and click New Quality Inspection. Enter Sealed Pack Final Sampling as the Name and a description, which is required, such as Statistical sampling check of finished sealed packs, and choose Qualitative as the Type.

Under Inspection Sampling, the form first shows only Sampling Requirement. Choose Statistical Sampling. A required Statistical Sampling Template field and Collect Sample Data appear. Choosing Simple Sampling instead shows Sampling Rate and Allowable Failures. Choose Sealed Pack Sampling Plan in the template field. Collect Sample Data is a check box about collecting sample data while the inspection runs. This example leaves it cleared and doesn't run the inspection.

Choosing Statistical Sampling reveals the template field.
The inspection points to Sealed Pack Sampling Plan.

04. Read the saved inspection

Click Save. The Inspection Sampling section shows Statistical Sampling and the template as a link, and the owner and save time appear beneath it.

The saved inspection links to its sampling template.

Open the Data Fields tab. In the reviewed account, saving the statistical inspection added four integer fields to it that nobody entered: Samples Inspected (sequence 1, tag SS_SAMPLES_INSPECTED), Critical Defects (2, SS_CRITICAL_DEFECT_COUNT), Major Defects (3, SS_MAJOR_DEFECT_COUNT) and Minor Defects (4, SS_MINOR_DEFECT_COUNT). The validation tags tell Quality Management which field holds which statistical sampling value, so the label alone doesn't do that. Other versions may show different fields, sequences or tags, so check your own. Inspection Standards and Pass Fail Criteria are empty.

The four sampling summary fields and their tags.

05. Check the sampling summary fields

Go to Quality > Setup > Data Fields. In the Sampling Summary Field column, Samples Inspected, Critical Defects, Major Defects and Minor Defects read Yes. They are standard data fields that the inspection now uses, not four new records. Other fields can carry the flag too, so don't assume every Yes belongs to the four statistical fields.

The four fields are marked as sampling summary fields.

Check the result

  1. The Sealed Pack Sampling Plan template is saved, and its Sampling Details tab lists line C for 1 to 100 units and line F for 101 to 500 units.
  2. The Sealed Pack Final Sampling inspection shows Sampling Requirement Statistical Sampling and links to the template.
  3. Its Data Fields tab lists Samples Inspected, Critical Defects, Major Defects and Minor Defects with their SS_ validation tags.

The sampling plan alone doesn't make inspections happen. Before this inspection does any work you still need to:

  1. Add pass rules on its Pass Fail Criteria tab that name a Defect Type of Critical, Major or Minor. An existing statistical inspection in the reviewed account pairs its fields with such rules.
  2. Add the inspection to a quality specification and set the specification's context, so it applies to the item and the kind of transaction you care about.
  3. Check how the four summary counts are filled in. Whether they are calculated from sample data or typed in by the inspector depends on a Quality Management parameter in your account.

Common questions

What does a Statistical Sampling Template contain?

A header with a name, a Quality Level, an Inspection Category, a Sampling Rate and Allowable Critical, Major and Minor Defects, plus Sampling Details lines. Each line has a Code, a Minimum Quantity, a Maximum Quantity, its own Sampling Rate and its own allowable defects, so different lot sizes can use different plans. Your version may show more fields, so compare with your own form.

What does Enable Sampling Rates by Number do?

It decides how the numbers are read. With the box cleared, the Sampling Rate and the allowable defects are percentages, and with it checked they are counts. In the reviewed account the box was greyed out when a saved template was reopened, so choose it before you first save. Whether it stays locked can depend on your version.

What are the Sampling Details lines for?

Each line gives a sampling rate and defect limits for a range of lot quantities. Make the lines cover every lot size you expect and keep them from overlapping. This guide didn't test what happens for a quantity outside every line.

Why don't I see the Statistical Sampling Template field on my inspection?

It appears after you choose Statistical Sampling as the Sampling Requirement. With Simple Sampling the form shows Sampling Rate and Allowable Failures instead. The fields shown can vary with your version and form, and your role needs permission to create the inspection.

What are SS_SAMPLES_INSPECTED and SS_CRITICAL_DEFECT_COUNT?

They are validation tags on the inspection's data fields. They tell Quality Management that the Samples Inspected field holds the number of samples inspected and that the Critical Defects field holds the critical defect count. The major and minor fields carry SS_MAJOR_DEFECT_COUNT and SS_MINOR_DEFECT_COUNT. The tag, not the label, is how Quality Management finds each field. Check the tags in your own account.

What is a Sampling Summary Field?

It is a flag on an inspection data field that marks it as holding a sampling summary value. In the reviewed account the four statistical sampling fields are flagged Yes in the Data Fields list. Other fields can be flagged as well, so a Yes doesn't mean the field is one of those four.

Do Quality Level and Inspection Category choose which template an inspection uses?

No. They classify the template and don't replace the Statistical Sampling Template field on the inspection, which is where the template is chosen. A quality specification and its context decide when the inspection is triggered.

Does this setup make receipts or work orders use statistical sampling?

Not by itself. After the template and the inspection, you add pass rules that name a Defect Type, add the inspection to a quality specification, and set that specification's context so it matches the item and the transaction you care about. A work order or receipt only calls for the inspection when its transaction type and context match, so don't assume every one does. This guide doesn't run an inspection, so it doesn't show how the sample size or the defect limits are applied.