# How to set up EasyCatalog with publications

### Getting started

To get started, make sure that you have created an XML publication template and a print that uses the specific template. If you do not have that yet, we have guides on how to [set up a template](/tutorials/guides/how-to-use-publications/how-to-create-a-publication-template.md). We will set up a print and template in this guide.

{% hint style="info" %}
To read and automatically fetch XML from your PIM, you will need the XML Data Provider module for EasyCatalog.
{% endhint %}

### Creating the publication print

For EasyCatalog to be able to fetch the publication from the PIM, you will need to have a publication print. A publication print is where you define the rules and conditions for how the print is generated.

To create a new publication print, head to 'Publications' -> 'Print publications'.

<figure><img src="/files/FtIDM2svAyjmA3FWUr99" alt="The publication print overview"><figcaption><p>The publication print overview</p></figcaption></figure>

Click 'Create print publication' in top right corner of the page. This will take you to a new page, where you will be able to fill out the settings for your print.

<figure><img src="/files/9aHnefHMRv23iamWOZO4" alt="The print publication settings page"><figcaption><p>The print publication settings page</p></figcaption></figure>

The two most important settings are the 'Category' and the 'Data template' settings. The category setting determines what product data will be available to EasyCatalog, and the data template is the layout of that data.

Select the one that fits your specific use case.&#x20;

We have selected 'Electronics', which contain products that fit the specific data template.

{% hint style="info" %}
Make sure that the template that you want to use has its type set to 'Data', and not to 'PDF'.
{% endhint %}

If you want to learn more about the rest of the settings on this page, we have a guide walking through how to create print publications here.

### Creating the template

For EasyCatalog to be able to read and understand the XML that you send it, you will need this default tag structure. This will add the context needed for the module to understand how to structure the data.

{% code title="Liquid" lineNumbers="true" %}

```xml
<Entities>
    <Entity Type="Product">
        <PackageSize type="complex">
        ...
        </PackageSize>
        <Variants type="table">
            {% for variant in product.Variants %}
            <Variant>
                <Id>{{variant.Id}}</Id>
                <Sku>{{variant.AttributeValues.SKU}}</Sku>
            </Variant>
                {% endfor %}
        </Variants>
    </Entity>
</Entities>
```

{% endcode %}

#### Let's break it down

{% code overflow="wrap" %}

```xml
<Entity Type="Product">
```

{% endcode %}

The "Type"-property tells EasyCatalog what each row will consist of, and also help it identify where the initial rows start.

***

{% code overflow="wrap" %}

```xml
<PackageSize type="complex">
```

{% endcode %}

The "type"-property with a small "t" is used to describe the structure you are going to be using. You have two options:​

**Complex**\
This enables EasyCatalog to see this element as a complex object where the tags below it will be seen as individual properties.

​**Table**\
This enables EasyCatalog to see this element as a table where each tag below is considered as an individual row.

***

{% code overflow="wrap" %}

```xml
<Variants type="table">
            {% for variant in product.Variants %}
            <Variant>
                <Id>{{variant.Id}}</Id>
                <Sku>{{variant.AttributeValues.SKU}}</Sku>
            </Variant>
                {% endfor %}
</Variants>
```

{% endcode %}

{% columns %}
{% column %}
This is a loop that iterates over the Variants found inside the "Product".

The "product" is the referred type from the Entity above. You can see what properties are available on your entity by going to the 'Data' tab inside the template designer.

{% endcolumn %}

{% column %}

<figure><img src="/files/qSfwB7yRXkZ6Z4rx44m0" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

When that is all set up, we will move on to setting up EasyCatalog inside Adobe InDesign.

### Setting up EasyCatalog in Adobe InDesign

First, create a new file inside Adobe InDesign. Then go to 'File' -> 'New' -> 'EasyCatalog Panel...' -> 'Manage Enterprise Data Providers...'

<figure><img src="/files/yFwPmRC9rapuOzUZSep0" alt="Inside Adobe InDesign"><figcaption><p>Inside Adobe InDesign</p></figcaption></figure>

This will open up a new window from where you will be able to add new data providers. Scroll all the way down until you see 'Struct'. Click on the row and then click 'Install'.

<figure><img src="/files/ZDHeHIC14TVSe0IWstLj" alt="The data providers overview from EasyCatalog within Adobe InDesign"><figcaption><p>The data providers overview from EasyCatalog within Adobe InDesign</p></figcaption></figure>

Once that is installed, you need to set up the data source for Struct PIM. To do that, go to 'File' -> 'EasyCatalog Panel...' -> 'New Struct Data Source'.

<figure><img src="/files/lNIo7p3tI3K9wf150JsN" alt="The data provider configuration window inside Adobe InDesign"><figcaption><p>The data provider configuration window inside Adobe InDesign</p></figcaption></figure>

Give it a name that is recognizable to you, the URL to your PIM API, an API key that has access to publications and select the version of the PIM you are using. You can get all this information inside your API key in 'Settings' -> 'Integration' -> 'API configuration'.

{% hint style="info" %}
Make sure that your API key has permission to get publication prints.
{% endhint %}

Ensure all fields are filled out, then click 'Initialize'. Once the connection is successful, your publications will appear in the 'Print' dropdown menu. Finally, click 'OK'. A new table window will appear which contain data in the order that you have specified in your template.


---

# 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.struct.com/tutorials/guides/how-to-use-publications/how-to-set-up-easycatalog-with-publications.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.
