# Recharge

## Connection <a href="#check-platforms" id="check-platforms"></a>

When setting up your first workflow with Recharge, you will need to create a [connection](https://docs.getmesa.com/going-further/credentials) through MESA's Recharge connector. Enter your subdomain in the Recharge Subdomain field and click the Sign in with Recharge button to complete the process.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2F566DMwoYjgGfPyU9ZApH%2Fimage.png?alt=media&#x26;token=e1b72175-47ef-41d6-a200-65e50fde8c20" alt=""><figcaption></figcaption></figure>

Once redirected, scroll until you see a blue Install button and click on it.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FUBytJq80Ch0Xw3hINaSq%2Fimage.png?alt=media&#x26;token=5f60082b-86ad-4cfc-a940-1babe09a59f2" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
If you're redirected to a 'Not Found' message, it means Recharge is not installed on the Shopify store where MESA is currently set up.
{% endhint %}

{% hint style="info" %}
The Recharge app utilizes [Recharge’s SCI API](https://developer.rechargepayments.com/2021-11/).
{% endhint %}

## Configure <a href="#triggers" id="triggers"></a>

### Getting Shopify Data from Recharge Actions

Recharge has its own system for identifying orders, customers, and products. To reference Shopify orders, customers, or products within a Recharge action, you must use the "external ecommerce" variables.

For example, select the "Recharge > External Order ID > Ecommerce" variable to get the Shopify data for a Recharge order.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2F7xt8QboL0hfk8Z4OUhgA%2Fimage.png?alt=media&#x26;token=eaff0495-a086-4e03-9741-d6e5e234fc13" alt=""><figcaption></figcaption></figure>

### Orders Count

When using the Orders Count action, be sure to add a Filter step afterward to ensure the comparison conditions for the total number of orders meet your desired criteria.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FektzTcy0tD5T5umBpIbz%2FEF-recharge-steps-2.png%20-%20Step%202.png?alt=media&#x26;token=87c751f7-facc-4e63-9e36-bb9f9d12986f" alt=""><figcaption></figcaption></figure>

The Orders Count action receives the total number of orders placed by a customer's email address.

## Technical Notes <a href="#configuring" id="configuring"></a>

### Parameters

* limit: Get List actions in Recharge default to a limit of 50, but the maximum limit can be set at 250 with parameters. Click [here](https://developer.rechargepayments.com/2021-11/cursor_pagination) for more information.
* sort\_by: Please refer to this [table](https://developer.rechargepayments.com/2021-11/sorting) for more details.

{% hint style="info" %}
View Recharge templates and tutorials [here](https://www.getmesa.com/apps/recharge/integrate)!
{% endhint %}


---

# 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.getmesa.com/connect/recharge.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.
