# Bulk Update

With **Bulk Update** you can update many existing gift cards at once by uploading a CSV file. The fields you can update include:

* Expiry date
* Balance
* Note
* Message (sent in the recipient email)
* Customer (by `customer_id` or `email`)
* Recipient (by `recipient_id` or `recipient_email`)
* Gift card state (only changes from *enabled* to *disabled* are allowed — Shopify does not allow re-enabling a disabled gift card)

To update a gift card, you need its **gift card ID**.

{% hint style="info" %}
Gift card ID is different from gift card code. You can export gift card IDs by going to **Products → Gift Cards**, selecting gift cards and clicking **Export** at the top. We also include gift card IDs in the CSV every time you import or autogenerate gift cards.
{% endhint %}

### 💡 **Common Use Cases**

* **Reloading gift card balances**: Top up partially used cards for customer retention or promotional campaigns. You can increase the balance of multiple cards in one action.
* **Extending gift card validity**: Honor expired cards or adjust expiry dates after a policy change. Gives customers more time to redeem.
* **Bulk disabling unused gift cards**: Deactivate cards to prevent unauthorized use and keep active inventory clean.

### **📋 CSV Columns**

Only `gift_card_id` is required. Remove any columns you don't want to update.

| Column            | Required | Notes                                                                                               |
| ----------------- | :------: | --------------------------------------------------------------------------------------------------- |
| `gift_card_id`    |     ✅    | Numeric gift card ID (not the code).                                                                |
| `disabled`        |          | Set to `true` to disable the card. You can only disable cards — Shopify does not allow re-enabling. |
| `expires_on`      |          | Expiry date in `YYYY-MM-DD` format.                                                                 |
| `customer_id`     |          | Numeric customer ID. Sets the **Customer** field on the gift card.                                  |
| `email`           |          | Customer email. Used as an alternative to `customer_id` to set the customer.                        |
| `recipient_id`    |          | Numeric customer ID. Sets the **Recipient** field on the gift card.                                 |
| `recipient_email` |          | Recipient email. Used as an alternative to `recipient_id`.                                          |
| `message`         |          | Custom message sent in the recipient email.                                                         |
| `note`            |          | Internal note, visible to staff only.                                                               |
| `balance`         |          | New balance for the card.                                                                           |

### **🪜 Step-by-Step Instructions**

1. **Download the CSV template.**\
   Use the file below as a starting point.

{% file src="/files/UUR8tclWG7c3weu8bO5P" %}

Optionally you can open and copy our Google Sheet template:

* [Template](https://docs.google.com/spreadsheets/d/1z-BAHW_JUGbPbClAzIGfiqLb1GD5gkWPpCNsnxJJqS4/edit?usp=sharing)

2. **Remove unused columns and populate rows.**\
   Only `gift_card_id` is required. Remove any columns you don't want to update, then fill in your data.
3. **Upload the file in the app.**\
   The form accepts `.csv`, `.tsv`, and `.txt` files, up to **10 MB**. After upload, a summary shows the detected separator, row count, and column names. Columns highlighted in green match the expected names.
4. **Choose whether to receive a summary email.**\
   Enable **Send a summary with process results** to get a one-time email with a CSV showing the result of each update. You can enter multiple email addresses separated by a comma.
5. **Click Update now or Schedule.**\
   **Update now** runs the operation immediately. **Schedule** runs it at a future date and time you select.

### **▶️ Running the Operation**

Two buttons are available at the bottom of the form:

* **Update now**: Runs the operation immediately.
* **Schedule**: Runs the operation at a future date and time. You select a timezone, start date, and start time.

The submit button stays disabled until a valid file with no row-level errors is uploaded.

### **FAQ**

**My file uploaded but the app says "No matching columns found".**\
The column header names in your file don't match the expected names. Compare against the template above — column names are case-sensitive.

**Why can't I re-enable a disabled gift card?**\
Shopify does not allow re-enabling gift cards once disabled. The `disabled` column only supports going from enabled to disabled.

**I didn't get the summary email.**\
The summary is only sent if **Send a summary with process results** was enabled before the operation ran. Check your spam folder, or contact us at **<support@code57.pl>**.


---

# 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.giftcardfactory.app/bulk-operations/bulk-update.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.
