> For the complete documentation index, see [llms.txt](https://docs.giftcardfactory.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.giftcardfactory.app/integrations/shopify-flow/actions.md). Agents can also search and read this documentation through its [MCP server](https://docs.giftcardfactory.app/~gitbook/mcp).

# Actions

Shopify Flow Actions with Gift Card Factory

After installing Gift Card Factory, these actions are available in Shopify Flow:

* **Create Gift Card**
* **Create Multiple Gift Cards**
* **Send Gift Card via App Email**
* **Resend Gift Card**
* **Get Gift Card**
* **Get Customer's Gift Cards**
* **Top Up Gift Card**
* **Deduct Gift Card**
* **Update Gift Card**
* **Extend Gift Card Expiration**
* **Disable Gift Card**
* **Convert Gift Card to Store Credit**

Every action run uses **one** Flow credit, except **Send Gift Card via App Email**, which uses one App Email credit instead.

{% hint style="info" %}
Most actions need a gift card ID. Use the ID returned by **Create Gift Card** or **Get Customer's Gift Cards**, or the gift card from a Gift Card Factory trigger.
{% endhint %}

### Create Gift Card

Creates a native Shopify gift card and, unless **Skip sending** is on, Shopify emails it to the recipient with its own gift card notification.

<figure><img src="https://2895247924-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcsKliv3CuXU7kN4gxX9B%2Fuploads%2Fgit-blob-a48401c65ef4fa62eaf8990f98b3da27920ef9b0%2Fimage.png?alt=media" alt="" width="355"><figcaption></figcaption></figure>

* **Skip sending**: Create the gift card without sending it.
* **Email**: The recipient's email address.
* **Value**: The initial value in the store's main currency.
* **Message**: A message shown in the gift card email (max 200 characters).
* **Days to expiry**: Validity period in days from creation.
* **Expires on**: A fixed expiry date (YYYY-MM-DD). Ignored if Days to expiry is set and different from 0.
* **Days to send**: Send the gift card after a number of days (max 90). Ignored if Send on is set.
* **Send on**: The exact date and time to send the gift card (YYYY-MM-DDTHH:mm:ss, e.g. 2025-01-30T14:15:00), within 90 days.
* **Note**: Internal note, not visible to customers.
* **Campaign title**: Optional, used for reporting.

The action returns the created gift card (ID, code, last characters, value, expiry), so later steps can use it.

### Create Multiple Gift Cards

Creates several gift cards with the same value for one recipient. It has the same options as **Create Gift Card**, plus **Quantity** (the number of gift cards, greater than 1).

### Send Gift Card via App Email

Emails an existing gift card with one of your Gift Card Factory email templates (**App Emails > Templates**) instead of Shopify's notification.

* **Gift card ID**: The gift card to send.
* **Gift card code**: The full code of that gift card.
* **Email template**: The ID or exact title of your email template.
* **Recipient email**: Where the gift card is sent.
* **Campaign title**: Optional, used for reporting.

To create and send a gift card with your own template, add **Create Gift Card** with **Skip sending** on, then add **Send Gift Card via App Email** and fill **Gift card ID** and **Gift card code** with the values returned by Create Gift Card.

### Resend Gift Card

Sends the gift card email again. Provide the gift card ID and choose **Send to customer**, **Send to recipient**, or both.

### Get Gift Card

Retrieves the properties of a gift card by its ID. It is useful for checking the current balance, expiry or status before deciding on the next action.

<figure><img src="https://2895247924-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcsKliv3CuXU7kN4gxX9B%2Fuploads%2Fgit-blob-ccfa0261587f1fc79d486858414b373fb1d2f78a%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

### Get Customer's Gift Cards

Returns all gift cards of a customer by their email.

* **Customer email**: The customer to look up.
* **Search by customer**: Include gift cards the customer owns (on by default).
* **Search by recipient**: Include gift cards sent to the customer (on by default).
* **Active gift cards only**: Only return gift cards that are enabled and not expired.

### Top Up Gift Card

Adds funds to a gift card. Provide the gift card ID and the **Top up value** (greater than 0).

### Deduct Gift Card

Removes funds from a gift card. Provide the gift card ID and the **Deduct value** (greater than 0).

### Update Gift Card

Changes an existing gift card. Fields left blank keep their current value.

* **Expires on**: New expiry date (YYYY-MM-DD).
* **Note**: Internal note.
* **Customer ID**: Assigns a customer to the gift card.
* **Recipient customer ID**: Sets the recipient of the gift card.

### Extend Gift Card Expiration

Adds a number of days to the gift card's expiry date. If the gift card has no expiry, the new date is counted from today.

### Disable Gift Card

Disables a gift card by its ID. For an example, see the template flow **Disable gift card after first use**.

### Convert Gift Card to Store Credit

Credits the remaining balance of a gift card to the customer's store credit account. The gift card needs a customer attached and a positive balance.

* **Notify customer**: Send the customer a notification about the new store credit.
* **Try recipient before customer**: Look up the recipient first, then the customer (by default it is the other way round).
* **Disable gift card after conversion**: Disable the gift card after the store credit is issued, so the same value can't be spent twice.
* **Store credit expires on**: Optional expiry date for the store credit.
