> 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/command-collection/component-templates/component-template-example.md).

# Component Template Example

{% hint style="info" %}
*Template\_02* was created by moving (drag & drop) the components from [Smart Copy Example](/boomi-console/commands/comp-components/smart-copy-explained/smart-copy-example.md).
{% endhint %}

The create a new API Endpoint from a template, we must consider the following:

* What makes the new endpoint?
* What should be different from the original?
* How does it differ from the other end points?

The first and most important thing ist the endpoint' name: the new endpoint is no longer *getContact* but it should be *getAccount*. If you chose s*mart copy* some renaming must be applied the get a *getAccount.*

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

Now, imagine you could create your templates with placeholders, like that:

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

### The template DataSet

Templates contain placeholders `${EndpointName}`, and the question is: where do the values for these placeholder come from when the new components are created?

1. Create a directory in your BC [workspace](/boomi-console/library/the-workspace/workspace-folders.md): *Template02*
2. Create a *dataSet.json* file with the following content: `{ "EndpointName" : "getAccount" }`
3. Run BoomiConsole `COMP SmartCopy` and specify the working directory and the dataSet:

```
bc comp SmartCopy 
   /wd Template02 
   /d dataSet.json 
   /c 77735e3d-..,36595f0b-..,5e49233d-.,b6354ab4-.. 
```

Et voilá, you see four new components created from our template with all placeholders replaced to *getAccount* .

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

### Template components

I recommend creating a *components.txt* file that contains the template's component ids (see [Arguments in a file](/boomi-console/commands/arguments/common-arguments/parameters-in-a-file.md)).

<figure><img src="/files/1A3HKBLRZXruvZspmVhv" alt=""><figcaption></figcaption></figure>

The command changes to

```
bc comp SmartCopy 
   /wd Template02 
   /d dataSet.json 
   @components.txt
```

### Next steps

If you want to create another `getAddress` endpoint, simply edit the *dataSet.json* to `{ "EndpointName" : "getAddress" }`, run the command and you are done!
