Create an On-Demand Packaging service and generate or regenerate assets in its catalog.

## Creating a new On-Demand Packaging service

The operations available to you depend on the permissions assigned in the Controller.

To create a new On-Demand Packaging service, follow these steps:

1. Access the MediaKind Packager user interface and click the **Services** link in the left panel.

2. Click the **Add service** button, then select On-Demand Packaging.

3. Enter the service name.

4. Select one of the **Catalog** you previously created in the drop-down list:

   - The table is empty: no asset is currently configured for this service nor the associated catalog.
   - The table contains one or more asset: the displayed assets are managed by the associated catalog with another On-Demand Packaging service.

5. Do one of the following:

   - Click **Save and continue** to complete the service creation and start adding On-Demand Assets.
   - Click **Save and exit** to save and finalize the service creation and go back to the **Services** page.
   - Click **Cancel** to go back to the **Services** page without saving.

## Creating and generating a new On-Demand asset

To add an On-Demand asset to a catalog, follow these steps:

1. Click the **Add new On-Demand asset** button.

2. Enter the appropriate value for each parameter:

   - **Name**
   - **Access URL**
   - **Source URL**
   - **Network name for POIS**
   - **Default content ID**
   - Content ID Mapping (**Parameter Key** and **Parameter Value**)

3. Do one of the following:

   - Click **Save and continue** to save and continue working.
   - Click **Save and exit** to save the asset and return to **Services**.
   - Click **Cancel** to go back to the **Services** page without saving.

Clicking **Save and exit** will start the On-Demand asset creation. Asset creation status is shown in the status column:

- **Valid** indicates that the asset is successfully generated.
- **Invalid** indicates that there was an error during the asset generation.

The On-Demand asset contains the same number of outputs as configured in the catalog.

## Regenerating On-Demand assets

You may need to regenerate an On-Demand asset after having for example modified or added one or several output of a catalog. MediaKind Packager allows you to regenerate either:

- All the On-Demand assets of a catalog
- One On-Demand asset including all the outputs that compose the asset
- One specific output of an On-Demand asset

1. Access the MediaKind Packager user interface  and click the **Services** link in the left panel.

2. Depending on your need, select one of the following:

   - To regenerate all of the On-Demand assets of the related catalog, click the Generate catalog asset button on the top right corner of the Catalog On-Demand Assets table.
   - To regenerate one On-Demand asset including all its outputs, click the circular arrow button in the Actions column of the related asset.
   - To regenerate one specific output of an On-Demand asset, click the valid/invalid button in the Status column of the related asset and click the circular arrow button of the related output.

The assets/outputs are then generated with the following status:

- **Valid** indicates that the asset is successfully generated.
- **Invalid** indicates that there was an error during the asset generation.
