> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firmhouse.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Trigger Shopify Admin webhooks

> Use Shopify Admin webhooks in Firmhouse to trigger Shopify Admin GraphQL calls in response to outgoing webhook events from your subscription project.

Shopify Admin Webhooks let you trigger Shopify Admin GraphQL calls from Firmhouse webhook events.

This is useful when you want to automate Shopify updates from lifecycle events in Firmhouse, for example adding tags when a subscription is activated.

## Requirements

Your Firmhouse project must have the Shopify subscriptions app configured. Shopify projects can then create outgoing webhooks with the **Shopify Admin** content type.

## Create a Shopify Admin webhook

1. Go to **Apps** in the sidebar.
2. Open **Webhooks** and click **Configure**.
3. Click **New outgoing webhook**.
4. Enter a **Name**.
5. Set **Content type** to **Shopify Admin**.
6. Choose an **Event**.
7. Add your payload template (see below).
8. Click **Save**.

## Template format

The template must render valid JSON with a top-level `query` field.

* `query` is required and must contain a GraphQL `query` or `mutation`.
* `variables` is optional.

Example:

```json theme={null}
{
  "query": "mutation tagsAdd($id: ID!, $tags: [String!]!) { tagsAdd(id: $id, tags: $tags) { node { id } userErrors { field message } } }",
  "variables": {
    "id": "{{ subscription.shopify_customer_id }}",
    "tags": ["subscription-active"]
  }
}
```

If template validation fails, check that:

* The rendered payload is valid JSON.
* `query` exists at the top level.
* GraphQL syntax is valid.

## How delivery works

For **Shopify Admin** webhooks:

* Firmhouse sends the request to Shopify Admin GraphQL.
* The request is sent as `application/json`.
* `X-Shopify-Access-Token` is added automatically.
* `Http-Firmhouse-Signature` is included like other outgoing webhooks.
* Failed responses are retried automatically (up to 3 attempts).

## Verify and troubleshoot

Open the webhook detail page and inspect **Webhook event log**:

* Request body
* Response code
* Response body

If a request fails, fix the template/query and use **Resend**.

## Related articles

* [Adding, managing, and removing webhooks](/configure/integrations/webhooks)
* [API access tokens](/configure/integrations/api-access-tokens)
* [Shopify Admin GraphQL API docs](https://shopify.dev/docs/api/admin-graphql/latest)
