> For the complete documentation index, see [llms.txt](https://docs.shopwaive.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.shopwaive.com/shopify/zapier.md).

# Zapier

Optimizing your CRM has never been easier with the Shopwaive API and Zapier

{% hint style="info" %}
Don't have a Zapier account? If you prefer, you can choose to use Shopify Flow to create your automations. See [Shopify Flow](/shopify/shopify-flow.md)
{% endhint %}

## Deposits and debits

Trigger an event like customer credit top ups that deposit credits based on customer actions, such as when customers purchase a Product or SKU, or pay an invoice. For example, after customers purchase X quantities of product XYZ, then a credit deposit of Y is automatically made to the customers account.

{% hint style="info" %}
For example, after customers purchase A quantities of product B, then a credit deposit of C is automatically made to the customers account.
{% endhint %}

{% hint style="success" %}
Another example, a customer pays an invoice in the amount of Y and their credit account is automatically topped up by X\*Y, Y, or Z amount, where X is any multiplier you define, Y is the amount of the invoice paid, and Z is any amount you choose.
{% endhint %}

### Multipliers

You can also include multipliers, such that the amount of credit deposited is a multiple of the Order or Line Item subtotal that triggered the top up.

> For example, your customer purchased five units of SKU #90183749 for a subtotal of $45.10 USD. This SKU was defined in a Shopwaive Trigger with a multiplier of 10 to top up a customers credit balance.

In the example above, the customer's available credit balance is increased by $451.00 USD. If you'd like a 1:1 exchange for purchases and deposits, then use a multiplier of 1.

## Setup a trigger

There are several ways to setup Shopwaive Triggers for your store. You can use any of the three [Shopify Flow Triggers](/shopify/shopify-flow.md#triggers), the [Shopwaive API](https://api.shopwaive.com/) (development required), or setup a [Zapier](https://zapier.com/) zap no-code required. On Zapier, Shopwaive offers the actions Get available balance, Set available balance, and Increment available balance. To start an automation when a balance changes, use the <mark style="color:blue;">**Balance change**</mark> trigger in [Shopify Flow](/shopify/shopify-flow.md#balance-change).

### With Shopify Flow

This option is no-code and takes advantage of the Shopwaive Triggers and Actions available on Shopify Flow. Make an [HTTP POST](/shopify/shopify-flow.md#http-post) to the [Shopwaive API](https://api.shopwaive.com/) to trigger a Flow, or listen to [balance change events](/shopify/shopify-flow.md#balance-change) to power a flow.

### With API or NPM package

This option requires your development team to make requests to the API or using the [@shopwaive/credit](https://www.npmjs.com/package/@shopwaive/credit) NPM package while listening or subscribing to your platform's webhook events. Send a Shopwaive API key in the `X-Shopwaive-Access-Token` header of each request: create one in the Shopwaive app under **Settings > Develop > Shopwaive API keys**. A token you already use keeps working. To learn more [contact](mailto:support@shopwaive.com) our team.

### With Zapier

This option is also no-code, however, you do need a [Zapier](https://zapier.com/) account with Premium access to Shopify events. To set up a zap that tops up a balance, start from one of the shared zaps below; each uses a Shopwaive action. When you connect Shopwaive in Zapier, use a Shopwaive API key as the access token: create one in the Shopwaive app under **Settings > Develop > Shopwaive API keys**. A token you already use keeps working.

To record redemptions in a Google Sheet, use the [Connect Google Sheets](/shopify/shopify-flow.md#connect-google-sheets) workflow in Shopify Flow.

{% embed url="<https://zapier.com/shared/129fca8fe6a333baacbef490747399d211e350a4>" %}

{% embed url="<https://zapier.com/shared/668c38fd658b512312ef1811448894f4902b0b64>" %}

{% embed url="<https://zapier.com/shared/b2fe77fc9720a0eaee0d7aec95050fd6f6f1c6a4>" %}

{% embed url="<https://zapier.com/shared/f0e83c2f52687703fd25b78157e20dee1444b2fd>" %}
