Recharge is one of the most popular recurring payment platforms for Shopify customers.
The ReCharge x ReSci integration allows you to import user subscription data from Recharge into the ReSci platform on a daily basis. This lets you have access to this data for segmentation and ultimately lets you know which customers are subscribers, which should be targets for subscription acquisition, win back campaigns, etc.
Installing the ReCharge plugin
Important: Please note, you will need to complete the steps in Enabling the Integration before the ReCharge plugin installation can be completed. |
- Navigate to the Integrations Center in Cortex by navigating to Cortex > Integrations.
- Search for "ReCharge."
- Click on the ReCharge plugin to open the ReCharge plugin page.
- Enter your ReCharge API Key (see Enabling the Integration for how to generate this key) in the box noted in the screenshot below.
- Click Install and wait for for the plugin to complete installation.
- Once installed, your ReCharge data begins to sync over to your ReSci account and you have access to the data for use within 24 hours.
Enabling the integration
- In your recharge admin account, navigate to the Integrations section.
- Click "API tokens" on the right-hand side of the page.
Note: If you do not have access to create an API key, please contact ReCharge directly and request permissions to generate API keys. - Click "Create an API token" and save a new token.
- Copy the API key.
- Enter the Recharge API key into the Recharge Plugin in the Integrations Center as mentioned in the Installing the Plugin section above.
- Add our Checkout Success Event (Conversion Pixel) to Recharge's Checkout Settings. Instructions are below:
- Click on the "Settings" Icon, go to "Checkout" then copy and paste our code snippet into the "Thank You Page" "Additional & scripts and trackers" section.
- Make sure to change the
site_id
variable to thesite_id
provided to you.
<!-- RetentionScience start -->
{% if first_time_load %}
<script type='text/javascript'>
var _rsq = _rsq || [];
_rsq.push(['_setSiteId', 'site_id']); // replace site_id with your static Site ID
_rsq.push(['_enableOnsite']);
_rsq.push(['_setUserId', '{{customer.shopify_customer_id}}']);
_rsq.push(['_setUserEmail', '{{email}}']);
/*** EVENT SPECIFIC CODE ***/
_rsq.push(['_addOrder', {'id': '{{id}}', 'total': '{{total_price}}'}]);
{% for line_item in line_items %}
{% if line_item.variant_id != '' %}
_rsq.push(['_addItem', {'id': '{{line_item.variant_id}}'}]);
{% elif line_item.variant_id == '' %}
_rsq.push(['_addItem', {'id': '{{line_item.product_id}}'}]);
{% endif %}
{% endfor %}
_rsq.push(['_setAction', 'checkout_success']);
/*** END EVENT SPECIFIC CODE ***/
_rsq.push(['_track']);
(function() {
var rScix = document.createElement('script');
rScix.type = 'text/javascript';
rScix.async = true;
rScix.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'd1stxfv94hrhia.cloudfront.net/waves/v3/w.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(rScix);
})();
</script>
{% endif %}
<!-- RetentionScience end -->
Integration data
Currently the user subscriptions updates once per day. Below is how recharge data is mapped to ReSci. For more information on Recharge data, please use your API key to browse the recharge documentation. We are pulling data from both the Subscriptions API and their Customers API.
ReSci Standard Subscription Data
|
ReCharge Subscription Data
|
---|---|
record_id |
subscription.id |
user_record_id |
subscription.customer_id customer.shopify_customer_id |
status | subscription.status |
item_record_id | subscription.shopify_variant_id |
started_at | subscription.created_at |
trial |
subscription.properties *(See Explanation Below) |
churned |
if subscription.status == 'ACTIVE', set churned = 0 if subscription.status == 'CANCELLED', set churned = 1 |
canceled_at | subscription.cancelled_at |
cancel_reason | n/a |
In order to have trial users map to ReSci please set up Recharge to do the following:
- Create a subscription property name "charge_delay". For information on the workaround please see this article from recharge
- The trial flag will be set to false if:
- subscription.properties does not contain an object with a "name" of "charge_delay" and a corresponding "value."
- subscription.next_charge_scheduled_at < subscription.created_at + charge_delay (days).
- The trial flag will be set to true if:
- subscription.next_charge_schedule_at > subscription.created_at + charge_delay (days).
Recharge data usage
Segment conditions
Subscription data is available as conditions in the segment builder. Certain fields that do not exist natively in Recharge (i.e. "cancel_reason") will still be visible within the segment builder but will not contain data and therefore should not be used without further customization.>/p>
To request additional customization, contact help@retentionscience.com.
Comments
0 comments
Please sign in to leave a comment.