# Product Cloning

Managing thousands of IoT devices efficiently requires standardised setups. In Datacake, this is achieved through **Products**, which define shared elements like dashboards, payload decoders, and downlinks.

Previously, products created in one workspace were not available in others. With the **Product Cloning** feature, you can now duplicate products across workspaces, making it easier to manage large-scale deployments while retaining flexibility.

### The Challenge Before Cloning

* Products were **workspace-bound**: each workspace had to create its own product from scratch or from the template catalog.
* Products in the main workspace were not available in sub-workspaces.
* This meant duplicating setup work whenever you added new workspaces.

Product Cloning solves this limitation. It allows you to **copy an existing product** from one workspace into another.

#### Key Benefits

* Save time by reusing product definitions across multiple workspaces.
* Maintain consistency in dashboards, payload decoders, and downlinks.
* Retain flexibility: cloned products are independent of the original.

If you prefer, you can watch our YouTube video:

{% embed url="<https://youtu.be/WU9qAUQ5ctw?si=KtnjL6_gc-dL2OR1>" %}

## How to Clone a Product

### 1. Create Your First Product

Of course to clone a Product, there needs to be a Product first. The first time you create a product, it must be linked to a device, so:

* Click on "**+Add Device"**
* For LoRaWAN or API devices choose:
  * **New product from template** → Create a product based on one of Datacake’s templates (with dashboard, fields, decoders, etc.).
  * **New product** → Create an empty product from scratch.

{% hint style="warning" %}
The Cloning Product feature only works for LoRaWAN and API devices!
{% endhint %}

### 2. You can add more devices later...

When you want to add additional devices of the same kind:

* Next time you +Add Devices, select "**Existing product"**.
* This way, all devices stay linked through the **Product definition** and share:
  * Dashboards
  * Payload decoders
  * Downlinks
  * Fields

### 3. Now, Clone an Existing Product

To clone a product into another workspace:

1. Go to one of the devices belonging to the product in the original workspace.
2. Open **Configuration/Product & Hardware**.
3. Scroll down to **Advanced Actions**.
4. Click **Clone Product**.

<figure><img src="/files/DfeNba0aLqtfBK0Fjp2d" alt=""><figcaption></figcaption></figure>

### 4. Configure the Clone

When cloning, you can change the **product's name**. This will appear in the new workspace and can only be configured once, so be mindful!

Then, select the **target workspace** (only workspaces where you have device permissions will be shown).

Choose whether to copy **Integration settings** (LNS, MQTT, HTTP).

{% hint style="warning" %}
For devices using the **Datacake LNS**, the LNS configuration is always cloned automatically.
{% endhint %}

### 5. Add Devices to the Cloned Product

At first, the cloned product will not contain any devices. Don’t worry!

* Go to **+Add Device** in the target workspace.
* Select **LoRaWAN** or **API device**.
* Choose **Existing product** → The cloned product will appear here.
* Add your device keys and add devices to your cloned product.

## Remove a Product

To remove a product from a workspace:

* Delete all devices belonging to that product.
* Once no devices are left, the product will be removed automatically as well.

{% hint style="warning" %}
Cloned products are **independent from the original products**: changes you make to dashboards, decoders, or downlinks in the cloned product will not affect the original. So the products are still workspace dependent!
{% endhint %}

That’s it! You can now quickly replicate your setups across multiple workspaces with **Product Cloning**.

## Example Use Case

Imagine you manage multiple customer deployments across different workspaces. Instead of rebuilding products for each customer, you can:

1. Define a product once (including dashboard, decoder, downlinks).
2. Clone it into customer-specific workspaces.
3. Adjust cloned products locally, while keeping the base setup consistent.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.datacake.de/device/product/product-cloning.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
