# Product serial combinations

## Product serial combinations

Product serial combinations is the configuration screen where you set the serial
components used when new products receive serial combinations. A serial component is
one part of that combination. This is a reference screen for the product serial format,
not a product-record detail page.

| If you need to… | Go to |
|---|---|
| Check what the screen controls and which products it affects | [Product serial combinations](#product-serial-combinations) and [Understand the screen](#understand-the-screen) |
| Check whether editing is available | [Before you start](#before-you-start) |
| Open the screen | [Find the configuration screen](#find-the-configuration-screen) |
| Add or adjust a serial component | [Add and adjust serial components](#add-and-adjust-serial-components) |
| Save or leave your changes | [Save or leave changes](#save-or-leave-changes) |
| Work with year, text, month, day, or numeric detail options | [Serial combination details](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/configuration-serial-combinations-record) |

> **Note:** Changing this configuration does not alter serial combinations already
> assigned to existing products.

![The Product serial combinations screen with its note and existing rows](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/dd3b87c0cb3b839673410375662b6ddd.png)

## Before you start

Product serial combinations is available only when the subscription includes the
screen and the current account has the appropriate editing state.

| Before you start | What it controls |
|---|---|
| Your subscription includes the feature | The configuration screen is available. Otherwise, the upgrade surface appears. |
| You can edit the configuration | **Save**, the close or leave icon in the screen header, and **Component** are available according to the screen state. |
| Serial components are available | The grid and its **Serial Component** list can appear. |

When the subscription does not include the feature, the screen shows the upgrade
surface rather than the configuration grid. The upgrade surface includes **Back**.

When editing is not allowed, the screen uses the leave icon in the screen header and
does not provide **Component**. When editing is allowed, the screen provides the close
icon and **Component**.

## Find the configuration screen

**Prerequisites**

- The application is available at its normal signed-in address.
- The subscription includes Product serial combinations.

**Steps**

1. Select **Product serial combinations** in the side menu.

**Result:** The Product serial combinations screen opens.

## Understand the screen

The screen presents the current serial-component rows in a grid so you can review the
component type, its quantity setting, and its default value before changing the
configuration.

When a serial preview is available, it appears above the grid as the component values
are assembled.

The visible grid has these columns:

| Column | What you use it for |
|---|---|
| **Serial Component** | Choose the component type for a non-empty row. |
| **Digits** | Choose the quantity setting when the selected component type permits it. |
| **Default Value** | Enter a value for a non-separator component or choose a separator value for a separator row. |
| Unlabelled order column | Reorder rows with the row's drag handle. |
| Final column | Use the actions available for the row. |

The screen displays **Save** and **Component**. It opens without a loading spinner or
 an error page.

There is no serial-type list on this screen. Serial-combination detail options
such as year, text, month, day, and numeric quantities belong on [Serial combination
details](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/configuration-serial-combinations-record).

![The grid headers, Save, and Component controls](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/50ea8f7469e9275a83c703f360ca2008.png)

## Add and adjust serial components

Add a row or adjust the component type and value shown in an existing row. The
available editors change with the selected component.

**Prerequisites**

- Editing is allowed.
- The serial-component grid is available.

**Steps**

1. Select **Component** to add a serial-component row.
2. In the new or existing row, select **Serial Component**.
3. Choose **category code** or another component type in **Serial Component**. A new
   choice initially shows **Select A Component** until you choose a type.
4. If the selected type provides a **Digits** list, choose its value.
5. If the selected type is **separator**, choose `-`, `_`, or `.` in the **Default Value** list.
6. If the selected type is not **separator**, enter the required free-text value in **Default Value** when one is needed.
7. If you choose **category code**, review the initial `XX` value in **Default Value**.
8. If you choose **Auto serial**, enter a numeric value in **Default Value**.

The **Digits** list excludes the component types listed for this screen, so those
component types do not provide a **Digits** choice here.

**Result:** The row shows the selected serial-component type and the value editor
appropriate to that type. The changes remain on the screen until you save or leave.

### Check the combination before saving

The saved combination needs at least one component and one Auto serial. Auto serial
must be the last component, and the total combination length must be no more
than 12 characters.

> **Important:** Saving a combination with more than one Auto serial, without an Auto
> serial, with Auto serial before the last component, or with more than 12
> characters produces a validation message. Correct the component rows before selecting
> **Save**.

## Save or leave changes

Use **Save** to commit the configuration. To exit, use the close or leave icon in the
screen header.

| Screen state | Available control or behavior |
|---|---|
| Editing is allowed | **Save**, the close action, and **Component** are available. |
| Editing is not allowed | The leave action is available instead of the editable close action. |
| A save is in progress | **Save** is disabled while the screen is `Saving`. |
| A shared unsaved-change popup opens | Its declared choices are save and close, cancel, and don't save. |

**Prerequisites**

- You have reviewed the rows and their values.
- Editing is allowed if you need to use **Save** or **Component**.

**Steps**

1. Select the action that matches your decision:

   | If you want to… | Select |
   |---|---|
   | Submit the configuration | **Save** |
    | Save the changes and close after the shared popup opens | **Save** |
    | Remain on the screen after the shared popup opens | **Cancel** |
    | Leave without saving after the shared popup opens | **Don't Save** |
   | Leave when you cannot edit the configuration | The leave icon in the screen header |

**Result:** The screen closes or remains open according to the exit action you select.

## Handle unavailable and conditional surfaces

The screen changes its available surfaces according to subscription, editing
permission, and the selected component type.

| Condition | Surface you see |
|---|---|
| The subscription does not include the feature | The upgrade surface with **Back**. |
| The subscription includes the feature | The main configuration screen. |
| Editing is allowed | **Save**, the editable close action, **Component**, and row editors can be available. |
| Editing is not allowed | The leave action replaces the editable close action. |
| A row is not empty | **Serial Component** is required. |
| The component type permits digits | **Digits** can appear. |
| The component type is **separator** | The **Default Value** separator list appears and is required. |
| The component type is not **separator** | The **Default Value** text box branch applies. |
| The row-end controls are shown | The row-end controls do not include **Delete**. |

The **Last Modifications** surface is not available on this screen.

## When validation or saving goes wrong

The following messages are tied to the conditions that raise them. Correct the row
that fails validation before trying the save again.

| Message | Condition or corrective action |
|---|---|
| `Component is required.` | A non-empty row has no component. Choose a value in **Serial Component**. |
| `Invalid component.` | The component value is not valid. Choose a valid **Serial Component** value. |
| `Quantity is required.` | A quantity is required for the row. Complete **Digits** when it is available. |
| `Invalid quantity.` | The quantity value is invalid. Choose a valid quantity. |
| `this is required.` | A separator row has no separator value. Choose `-`, `_`, or `.` in **Default Value**. |
| `Auto Serial must be the last item In product serial` | Move Auto serial to the last serial component. |
| `Cannot have multiple Auto Serials In product serial` | Remove the additional Auto serial component. |
| `Must have one Auto Serial In product serial` | Add one Auto serial component. |
| `Cannot have Multiple AutoSerials  ` | The configuration contains multiple Auto Serial values. Keep one. |
| `Please Note that you can't add serial combination larger than 12 characters In product serial` | Reduce the serial combination to 12 characters or fewer. |
| `Please Note that you can't add serial combination larger than 12 characters  ` | Reduce the serial combination to 12 characters or fewer. |
| `Auto Serial Must Be a Number  ` | Enter a numeric Auto Serial value. |
| `Your combination number saved successfully` | The save completes successfully. |
| `Saving Failed In product serial` | Saving failed; review the rows and try **Save** again. |
| `Please add serial components In product serial` | Add a serial component with **Component**. |

If the message does not match the row condition, stop before changing other rows.

## Out of scope

Upload, import, confirmation, and subscription-upgrade dialog messages belong to the
shared popup and subscription-upgrade surfaces. Use the owning surface when you need
those messages.

The serial-type messages belong to the serial-combination detail page:

| Message | Owning surface |
|---|---|
| `Serial type is required In product serial` | Serial combination details |
| `Please select a serial type In product serial` | Serial combination details |

## What happens next

Use this configuration for products created after the change; existing products are not
affected. For serial-combination detail options such as year, month, day, and numeric
quantities, continue to [Serial combination details](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/configuration-serial-combinations-record).

**Result:** You know which products the configuration affects and where to find the
serial-combination detail options outside this screen.
