# Setting Up Automations

{% hint style="warning" %}
The system does not trigger further automations from within an automation, so infinite technical loops are prevented. However, when using AI actions (such as content generation), the generated output may differ each time, potentially causing repeated overwrites if not properly conditioned. To avoid overwriting existing content repeatedly, add a condition to prevent continuous loops. Ex. runs when the description attribute "is empty".
{% endhint %}

{% hint style="info" %}
The execution order of automation follows the sequence in which the automation tasks are created within the system. However, users can modify this order by adjusting the "Order" field for each task.
{% endhint %}

{% hint style="info" %}
For using attribute values, variables must be used. Example prompt: “Use the values of the attribute #color and #size to create a description.”
{% endhint %}

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2F8hMPQ33iN3olY9jaTtnZ%2Fimage.png?alt=media&#x26;token=5cf23d57-afde-4c48-83c9-e3c21f7f2827" alt=""><figcaption><p>Automations - Order</p></figcaption></figure>

* Any automation errors can be viewed via the *"Error log"* button located at the top-right corner of the screen.

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2F3aUDTIZ8YhTr3kNWSUvz%2Fimage.png?alt=media&#x26;token=0af15c7e-19dd-42cb-a34a-eeb24d4db20b" alt=""><figcaption><p>Automations - Error log</p></figcaption></figure>

* To enable or disable automation, use the slider next to the *"Order"* field. The default state for newly created automation is *"Disabled"*.

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2FwlaPnwyXUkU0wCCzOk59%2Fimage.png?alt=media&#x26;token=8ccf890c-ff38-4239-b06e-e612e9ce309d" alt=""><figcaption><p>Automations - Turn on / off</p></figcaption></figure>

* To edit, duplicate, or delete automation, click on the *"three-dot menu"* located next to the activity slider, and select the desired option.

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2FfTnQxpC0skg4UGIg46XD%2Fimage.png?alt=media&#x26;token=3d839175-7d27-4257-9dd5-43396a1140d8" alt=""><figcaption><p>Automations - Three-dot menu</p></figcaption></figure>

* A single automation can have a maximum of  fifteen (15) Conditions and fifteen (15) Actions.

## **Key Components of Automations**

To set up an automation, you need the following elements:

1. **Trigger (When)**: The event that starts the automation.
2. **Conditions (And if)**: Criteria that define when the automation should run.
3. **Actions (Then)**: Tasks performed when conditions are met.

## **Step 1: Create a new automation**

Automations can be accessed from the left-hand side panel in the Ergonode interface:

1. Click on the "**Automations"**.&#x20;
2. If it’s your first time, you’ll see a blank screen. Click on **New Automation** to get started.

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2FdSgCA5iwyHQwKlx02NPE%2Fimage.png?alt=media&#x26;token=8a8bd361-81da-4e16-b299-736c7581503b" alt=""><figcaption><p>Automations - Main screen - No automations</p></figcaption></figure>

## **Step 2: Set name**

Use the field labeled "Name" to specify a clear, concise title for your automation. This name will help you and your team easily identify its purpose or function in the list of automations. Consider choosing a descriptive name that reflects the automation’s triggers, conditions, and actions, making it straightforward to locate and manage later. For instance, names like “Assign to 'Sofas' category when 'Product type' attribute value match” ensure clarity and ease of use. Take your time to make it as informative as possible!

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2FhATIAe53mfRbHVHc8fSK%2Fimage.png?alt=media&#x26;token=41da0df0-4846-492e-8924-9826c6ed8722" alt=""><figcaption><p>Automations - Create automation - Name</p></figcaption></figure>

## **Step 3: Define Conditions**

Conditions specify when an automation should run. These can be based on:

* **Attribute Value**: Characteristics like material (e.g., "100% Cotton") or size (e.g., "45").
* **Category**: Product categories such as "Electronics" or "Herbal Teas."
* **Template**: Specific templates for product pages (e.g., "Furniture").
* **Status**: Workflow status changes, such as "Product Category Updated."

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2Fx3WkKRJjZiscMWx7OLpH%2Fimage.png?alt=media&#x26;token=af3e5641-2935-424b-9614-2c5f0499b32d" alt=""><figcaption><p>Automations - Create automation - Conditions</p></figcaption></figure>

## **Step 4: Choose Actions**

Actions define what happens when conditions are met. Examples include:

* **Edit attribute value**: Modify one or more product attributes.
* **Edit category**: Change a product’s category.
* **Edit template:** Change a product’s template.
* **Edit status:** Change a product’s status.
* **Generate description/name**: Use AI to create product descriptions or names based on custom prompt.
* **Translate**: Automatically translate attribute values into another language.

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2FxJmcsfdtRmAlHoPHbDUa%2Fimage.png?alt=media&#x26;token=af53aad2-250c-483d-bb0c-1f8dfbd2fe0d" alt=""><figcaption><p>Automations - Create automation - Action</p></figcaption></figure>

## **Step 5: Save the automation by clicking "Create"**

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2FHgO1eChSSBVZ6OfvS570%2Fimage.png?alt=media&#x26;token=686f2454-adce-4309-8c3a-75bfca66e139" alt=""><figcaption><p>Automations - Create automation - Create</p></figcaption></figure>
