> For the complete documentation index, see [llms.txt](https://boomi.markusschmidt.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://boomi.markusschmidt.pro/boomi-console/commands/comp-components/smart-copy-explained.md).

# SMARTCOPY

*SmartCopy* allows you to copy one or more components with great control over how to handle references and referenced (dependent) components.

Boomi copy allows you to copy a component by

1. including **all** referenced components or
2. not including any dependent component.

However, in 99% of all use-cases you want to copy a component with *some* other dependent components. This is, where SmartCopy comes into play.

#### Three main use-cases for SmartCopy

1. **Copy a single component** (like a process) and create copies of only those dependent components which are in the same folder (`/folder`). Referenced components which are 'outside' of the current folder, like Connectors or global profiles, mapping are not duplicated. Optionally you can include subfolders (`/recursive`) more..\
   `bc COMP SMARTCOPY /c bf83e604-.. /folder /recursive`
2. Specify a **list of source components** to create a copy of each, while updating all references to the new (copied) components and retaining (global) references to the components that were not copied. With other word, a set of specified components is copied and all links inside of this set is kept intact by point to the new copies.\
   `bc COMP SMARTCOPY /c bf83e604-.., afb456a-...`
3. You can use component templates with placeholders to easily create new component (sets) based on a component template. This is extremely helpful, if you have a fixed pattern to create, for example, API Listener Components. See[Component Templates](/boomi-console/command-collection/component-templates.md)

### Smart Copy Explained

A quick example why Smart Copy is smart and how it differs from Boomi's copy functionality. The following example is probably not a real world use-case but it explains the *Smart Copy* functionality quite good, using a very simple example.

Imagine you have a Map component like this, with the *FlatFile Empty* profile you all know, which is a shared and global profile. No second copy of this profile must exist.

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

A look behind the scenes shows us that *MyMap* references (depends on) *j.Profile\_B* and *flatFile Empty*.

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

## Built-In "Copy Component"

<div align="left"><figure><img src="/files/Nit5jw7bsdWJoTtudweD" alt="" width="344"><figcaption></figcaption></figure></div>

If you chose the built-in copy component function, you have two options: copy with or without *all* dependent components. Neither of the two options is what we want. We would either get a new *MyMap* component that references the two existing profiles (no dependencies), or we would get a copy of all components, incl. *flatfileEmpty.* In both cases we must manually edit the Map and fix the referenced components. This takes time and it is error prone. Especially when the copy process refers to more complex situations than a simple Map.

### Smart Copy

If we chose *Smart Copy* we name the two components we want to copy: *MyMap* and *j.Profile\_B*, leaving out *flatfile.Empty SHARED.*

```
bc COMP SmartCopy /c bf83e604-..,3ba38b6a-..
```

What we get is a new *MyMap 3* which references the new *j.Profile\_B 5* but it kept the reference to the shared *flatfile* profile. This is smart!

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://boomi.markusschmidt.pro/boomi-console/commands/comp-components/smart-copy-explained.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
