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

# LocalCard Gift Cards

> Issue LocalCard digital gift cards to contacts automatically with workflows.

## What is it?

The LocalCard connected app lets your workflows issue [LocalCard](https://localcard.io) digital gift cards, for example to prize winners. It adds two workflow steps:

* **Send LocalCard from template**: sends a gift card from a LocalCard card template.
* **Generate LocalCard campaign gift**: issues a gift from an existing LocalCard campaign.

> [!NOTE]
>
> You need a LocalCard account and a LocalCard API key.

## How do I set it up?

### Step 1: Connect LocalCard

* Click the **Workspace initials** in the top right corner, then click **Company Settings**.
* Click **Connected Apps** in the left-hand menu.
* Click **Connect** on LocalCard. If you already have a connection, click **Manage**, then **Add instance**.
* Enter a **Name**, pick a **Scope** and paste your **API Key**:
  * **Company**: workflows in every workspace can use the connection.
  * **Workspace**: only workflows in the workspace you pick can use it.
* Click **Connect**.

![Update LocalCard connection window with Name, Scope (Company or Workspace) and a masked API Key](https://mintcdn.com/komotechnologies/2cIXLo168RMVOflr/images/localcard-update-connection.webp?fit=max\&auto=format\&n=2cIXLo168RMVOflr\&q=85\&s=186d4cf028cc7e8dba0507df88d4f40f)

You can add more than one connection, for example one per LocalCard account or per workspace. To change a connection's name, scope or API key, click **Manage**, then **Edit** on it.

![Manage LocalCard window listing one connection with Edit and Remove buttons, and an Add instance button](https://mintcdn.com/komotechnologies/2cIXLo168RMVOflr/images/localcard-manage-instances.webp?fit=max\&auto=format\&n=2cIXLo168RMVOflr\&q=85\&s=aecc3d61065536fb2133cf301065aafa)

### Step 2: Build your workflow

* Create a workflow at the card, hub or workspace level. See [Workflows](https://knowledge.komo.tech/integrations-automation/workflows.md).
* Set the trigger. For prize winners, use **Prize Awarded** and filter to your gift card prize.
* Search the Steps panel for **LocalCard**, drag in the step you need and connect it to the trigger.

> [!NOTE]
>
> The LocalCard steps only appear when a LocalCard connection is available to the workflow's workspace: a Company connection, or a Workspace connection for that workspace.

![A Prize Awarded trigger connected to a Send LocalCard from template step showing its connection, template, value and delivery method](https://mintcdn.com/komotechnologies/2cIXLo168RMVOflr/images/localcard-workflow-canvas.webp?fit=max\&auto=format\&n=2cIXLo168RMVOflr\&q=85\&s=6de16832bf9d93374f617a9767c978cd)

* Click the **pencil icon** on the step and fill in the fields below.

![The Send LocalCard from template step with LocalCard connection, Card Template ID, Card Value, Delivery Method, Recipient Message, Communication Message, Deliver At, On behalf of and the Response variables, with the Inputs panel on the right](https://mintcdn.com/komotechnologies/2cIXLo168RMVOflr/images/localcard-send-step.webp?fit=max\&auto=format\&n=2cIXLo168RMVOflr\&q=85\&s=c9393ccde335183a918eba74dc86e1e0)

**Send LocalCard from template**

| Field | What to enter |
| - | - |
| **LocalCard connection** (required) | The connection to issue from. |
| **Card Template ID** (required) | The LocalCard card template ID. |
| **Card Value** (required) | The value in dollars, for example `25` or `25.50`. Supports Liquid. |
| **Delivery Method** (required) | **Email** (to the contact's email), **SMS** (to their mobile) or **Link**. Defaults to **Email**. |
| **Recipient Message** | A personal message for the recipient. Supports Liquid, for example `{{contact.first_name}}`. |
| **Communication Message** | Extra text for the delivery message. Supports Liquid. |
| **Deliver At** | A later date and time to deliver the card, in your time zone. Leave empty to deliver straight away. |
| **On behalf of** | Optional. A LocalCard managed account ID (`acct_…`) to issue from instead of the API key's own account. Supports Liquid. |

**Generate LocalCard campaign gift** has the same fields, except:

* **Campaign ID** (for example `gc_ABC123`) replaces **Card Template ID**.
* **Gift Value** replaces **Card Value**.
* **Delivery Method** defaults to **Link**, which returns a **Claim URL** instead of emailing or texting the gift.
* **Recipient Message** overrides the message set on the campaign.
* There's no **Communication Message** or **Deliver At**.

Both steps send the gift to the contact who triggered the workflow, using their first name, last name, email and mobile number. LocalCard needs the email for **Email** delivery and the mobile for **SMS**. A campaign gift with **Link** delivery needs neither, nor the contact's name.

* Under **Response**, you can save the result to String workflow variables (create them with **Manage variables**):
  * **Send LocalCard from template**: **Payment Intent ID** and **Status**.
  * **Generate LocalCard campaign gift**: **Claim URL** and **Gift Reference**.

> [!TIP]
>
> With **Link** delivery, save the **Claim URL** to a variable and add it to a later **Send email** or **Send SMS** step, for example `{{variables.claim_url}}`.

* Click **Save**, then **Save** in the top right-hand corner.
* To start the workflow, click the **3 dots** next to it, select **Run**, then **Yes, start it**.

### Step 3: Check your workflow runs

* Open **Workflow Runs**, or **Usage** under the Workflows dropdown in **Card settings**.
* Open a run. **Step processed** on the LocalCard step means LocalCard accepted the request.

![A successful workflow run with the Generate LocalCard campaign gift step marked Step processed, followed by tag steps and an email step](https://mintcdn.com/komotechnologies/2cIXLo168RMVOflr/images/localcard-workflow-run.webp?fit=max\&auto=format\&n=2cIXLo168RMVOflr\&q=85\&s=65fe630372700815443fb8a94d530f2f)

If LocalCard rejects the request, the step and the run show as **Errored** with the error message. LocalCard steps aren't retried automatically. Fix the cause, then retry the run from [Workflow Runs](https://knowledge.komo.tech/integrations-automation/workflows/workflow-runs.md).

## FAQ

**Why can't I see the LocalCard steps in my workflow?**

No LocalCard connection is available to this workspace. Add a Company connection, or a Workspace connection for this workspace.

**The step says "Connection: needs attention". What does that mean?**

The selected connection was removed or isn't available in this workspace. Open the step and pick another connection.

**Why did the step fail with "Invalid card value" or "Invalid gift value"?**

**Card Value** (or **Gift Value**) must be a number, or Liquid that resolves to a number.

**Why did the campaign gift step fail?**

The error shows LocalCard's campaign status (`NotFound`, `Deleted`, `Expired`, `Inactive`, `InsufficientFunds` or `BudgetExceeded`) or an HTTP code, where `402` means Payment Required. Fix it in LocalCard, then retry the run.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.