# 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.&#x20;

{% 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.&#x20;
{% 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.&#x20;

> 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, we have the <mark style="color:blue;">**Balance Updated**</mark> trigger available to power your work flows, along with several action events like Get available balance, Set available balance, and Increment available balance.

### 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. To learn more [contact](mailto:undefined) our team.

### With Zapier&#x20;

This option is also no-code, however, you do need a [Zapier](https://zapier.com/) account with Premium access to Shopify events. To setup a zap that triggers a top up, follow this [guide](https://cdn.shopify.com/s/files/1/0605/5765/6280/files/Zapier_for_Product_Purchase_Topup_with_Shopwaive.pdf?v=1686517077).

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

{% 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>" %}


---

# 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.shopwaive.com/shopify/zapier.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.
