# Forge Concepts

Understanding how Forge works under the hood is essential to properly implementing it in your system. Let's take a look.

### Stakeholders

When building a Forge integration, it's important to identify the core stakeholders affected. If you're implementing Forge into your platform, then we call you a **SaaS Vendor**. The SaaS Vendor defines what integrations to show to your users (who we call the **merchant**).

Make sure you understand this lingo as we'll be making extensive references to it moving forward.

### Building the Workflow

Everything in Forge starts with the Forge Dashboard. Let's say you want to allow your merchants to link their Shopify stores to their Mailchimp mailing list. So for the purposes of our example, we'll say that every time a customer is created in Shopify -> we'll automatically add that customer to a mailing list in Mailchimp. Simple enough, right?

The first step in implementing this flow is to scope it out in the Forge dashboard. Every integration (also known as a workflow) begins there. So let's build out this workflow in Forge.

As you can see below, we'll use a Shopify Trigger block and then add a Mailchimp block. The trigger block tells Alloy Forge *when* to invoke the workflow – in other words, every time a customer is created in Shopify do X.

Then, we add a Mailchimp block on the canvas. Note that we're doing some "field mapping" in the example below. Using Forge, you can map any data point from previous blocks to your current block. As you can see, we're telling Forge to add the `Customer Email` to a Mailchimp list. This `Customer Email` value *represents* a dynamic value every time this workflow runs. In other words, if a customer with the email <joe@runalloy.com> creates an account, then that email will be dynamically added to Mailchimp. Similarly, if <jane@runalloy.com> creates an account a few hours later, her email will also be added to the Mailchimp list.&#x20;

![](/files/QqsCqHAX9xuyCHr55IL4)

Note that we selected the **Show field to merchants** checkbox. When selected, this checkbox allows your merchant to customize this part of the workflow. Why would we want to do this? In this instance, we can dynamically map the `Customer Email` value to the **Email** field in Mailchimp however, the **List** value is ultimately up to the customer. Your customers likely have unique list names so you'll want them to specify the list to use. Because this data is user-specific, we'll select the show fields to merchants checkbox to allow our merchants to customize it.

{% hint style="success" %}
Wondering why we're asking you to authenticate your accounts? When building your Forge workflows, it's imperative you properly link "test" accounts – in this case, Shopify and Mailchimp accounts. We need this because in order to properly configure the workflow, Forge needs to pull in real data from your Shopify and Mailchimp accounts. Note that we use this as *representational dynamic data* like in our example with `Customer Email`. The accounts you link are only used to build the workflow and are never exposed or shared with your merchants.
{% endhint %}

So now that we've built this simple workflow, **activate** the workflow by turning on the switch at the top right hand corner of the canvas.

![](/files/DMRuM9uLeL9pri58xOJs)

Perfect. You've just activated the workflow. Notice the green checkmarks on every block. These indicate that the blocks are configured correctly. If you see a red or orange icon then you haven't configured something properly and won't be able to activate the workflow until you have.

### Parent and Child Workflows <a href="#parent-and-child-workflows" id="parent-and-child-workflows"></a>

So what exactly did we just do you might be asking. To better understand *why* we just created this workflow, it's imperative you understand the concept of Parent and Children workflows in Forge.

The workflow we just created is called a **Parent Workflow**. You can think of a parent workflow like a template – it provides the *structure* of the workflow your merchants will install. When a merchant installs this workflow from your integration page, Forge asks them to authenticate their accounts (in this case, your merchant would need to authenticate their Shopify and Mailchimp accounts) *and* select the Mailchimp list to add the customers to. Because every merchant will have a different configuration (i.e. authentication and the Mailchimp list will be unique to every merchant), behind the scenes Forge creates a copy of the parent workflow specific to the merchant. We call this a **Child Workflow** because it has the basic structure of the parent workflow but is specific and unique to every merchant who has enabled it.


---

# 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://gregg.gitbook.io/alloy-developer/forge-concepts.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.
