> ## Documentation Index
> Fetch the complete documentation index at: https://developers.perkstar.co.uk/llms.txt
> Use this file to discover all available pages before exploring further.

# Zapier recipes

> Build reliable Perkstar Zaps for customer onboarding, loyalty activity, operations, and consented messaging.

These workflow patterns use the [public Perkstar app on
Zapier](https://zapier.com/apps/perkstar/integrations). They are guided build
recipes rather than one-click templates: choose the named Perkstar steps, test
with controlled records, and keep the business's consent and retention rules in
every destination app.

## Add a new member to a CRM or sheet

**Trigger:** New Customer Enrolment

**Then:** Find Customer → create or update the record in the destination

Use the trigger's `enrollmentId`, `customerId` when present, `cardId`, `source`,
and `occurredAt` as durable context. Run **Find Customer** only when the
destination genuinely needs current profile fields; choose **Customer ID** and
map the trigger's `customerId` when it is available.

<Note>
  Joining a loyalty card is not blanket consent for email, SMS, advertising, or
  another app's marketing list. Map a purpose-specific consent field only when
  the business has auditable evidence for that destination and channel.
</Note>

## Enrol an external lead and return available Wallet links

**Trigger:** A qualified lead or checkout in another app

**Action:** Enrol Customer in a Card

**Then:** Send the returned Apple or Google Wallet URL through an appropriate
transactional channel

1. Use a stable external customer reference from the source app.
2. Select the intended Perkstar card explicitly.
3. Map only the identity fields needed to find or create the customer.
4. Store the returned `customer.id` and `enrollment.id` in the source system.
5. If Wallet links are initially unavailable, use **Find Enrolment or Pass** later
   instead of constructing a Wallet URL yourself.

## Record a purchase exactly once

**Trigger:** A paid or completed order in the commerce/POS app

**Action:** Add Stamp or Visit, Award Points, or Record Purchase

Map the source order or payment ID into the action's Source ID field. Perkstar
automatically adds the Zapier action/activity namespace. Add your own source or
store prefix when several stores can emit the same numeric value, for example:

```text theme={null}
shopify:store-12:order:94721
```

Choose the focused action that matches the selected card. Use **Record
Purchase** for cashback or discount cards and map the integer minor-unit total;
use **Add Stamp or Visit** or **Award Points** when the source already knows the
exact balance change. Every action requires a Perkstar card and stable source
activity/order ID. Use **Record Loyalty Activity** only when one Zap genuinely
needs to select the activity type dynamically.

<Warning>
  Do not generate a new external transaction ID when Zapier retries a failed
  task. A stable source ID is what prevents a delayed or repeated order event
  from crediting loyalty twice.
</Warning>

## Reverse a refunded purchase

**Trigger:** A completed refund in the source app

**Action:** Reverse Loyalty Transaction

Prefer the original Perkstar transaction ID saved by the earn Zap. If only the
source order/payment ID is available, choose **Original Source Transaction ID**,
select the exact Perkstar action that recorded it, and map the unchanged source
ID. You can instead map the original action's exact returned External
Transaction ID. Perkstar writes a compensating ledger row and returns an
existing reversal if the same original was already reversed.

Partial-refund business rules differ by integration. Agree the policy before
turning the Zap on; the action does not infer a proportional reversal from an
arbitrary source payload.

## Notify a team about a loyalty event

**Trigger:** Reward Redeemed, Loyalty Tier Changed, Feedback Submitted, or
another named event

**Then:** Send a message to the team's approved operations channel

Include the Perkstar event `id`, business timestamp, and opaque customer or
enrolment ID needed to investigate. Avoid copying full contact details or
free-text feedback into a broad channel. Link authorised staff back to the
Perkstar dashboard when possible.

## Send a consented Wallet reminder

**Trigger:** A deliberate business rule in another app

**Action:** Find Enrolment or Pass → Send Wallet Push

* Confirm the workflow has a clear customer purpose.
* Target one current enrolment.
* Map the source trigger's stable record ID into **Source Event ID**; keep it
  unchanged when Zapier retries.
* Keep the message at or below 180 characters after merge-field expansion.
* Expect `403` when push-marketing consent is absent.
* Respect the shared three-minute per-card cooldown and `Retry-After` on `429`.
* Do not loop a bulk list directly into rapid per-customer sends without an
  upstream rate and frequency cap.

## Production checklist

* [ ] The Zap owner, connected Perkstar business, and destination owner are
  recorded.
* [ ] Every write uses the narrowest action and an explicit card where needed.
* [ ] Purchase flows use a stable permanent external transaction ID.
* [ ] Duplicate, delayed, and out-of-order trigger tests are safe.
* [ ] Consent and suppression behavior is tested with both allowed and blocked
  records.
* [ ] `429`, non-retryable `4xx`, and destination-app failures are visible to an
  operator.
* [ ] A disconnect, rights request, and downstream deletion procedure exists.

For launch failures, use [Troubleshooting](/integrations/zapier/troubleshooting).


## Related topics

- [Zapier](/integrations/zapier/index.md)
- [Zapier troubleshooting](/integrations/zapier/troubleshooting.md)
- [Send push notifications](/guides/wallet-pushes.md)
- [Receive webhooks](/guides/webhooks.md)
- [Connect Perkstar to Zapier](/integrations/zapier/setup.md)
