Purchasely
4
Search
K

Brevo(ex Sendinblue)

Why combine Sendinblue and Purchasely?

Pre-requisites

The minimal version of the Purchasely SDK supporting this integration is v3.2.0. If the Purchasely SDK integrated in your app is under the minimal version, please update it.
The Sendinblue SDK also needs to be integrated inside the app.

Subscription events

General overview

Sendinblue is a customer engagement solutions for Email and CRM.
This integration will allow you to get all Purchasely subscription events to Sendinblue making you able to trigger automated communication based on those events, messages that could be linked to a Purchasely powered paywall to engage, upsell, retain customers.
Purchasely provides a unified dataset to track the subscription events for all stores. These events are generated by the Purchasely Backend and can be sent to Sendinblue or used to update your Sendinblue users' properties.
Subscription events generated by Purchasely will be sent to Sendinblue using a server-to-server integration. As a result, you will be able to see all the subscription events along with your user's updated properties in your Sendinblue Dashboard.

Events

The following events are the main ones that will trigger an udpate of your Sendinblue users by Purchasely. See the full list here.
Event
Description
SUBSCRIPTION_STARTED
Sent when the user purchased a product wether it is the start of a trial or a regular purchase of a consumable product.
SUBSCRIPTION_RENEWED
Sent when a subscription renews
SUBSCRIPTION_EXPIRED
Sent when the subscription actually ends
SUBSCRIPTION_REACTIVATED
Sent when an expired subscription is reactivated. This event is particularly useful for win-back & retargeting campaigns
SUBSCRIPTION_REFUNDED_REVOKED
Sent when the subscription actually ends
RENEWAL_DISABLED
Sent when the user deactivates the renewal of a subscription wether it is in trial period or not.
RENEWAL_ENABLED
Sent when the user reactivates
TRIAL_STARTED
Sent when a trial starts
TRIAL_CONVERTED
Sent when a user converts from a free trial to a normal paid-period
TRIAL_NOT_CONVERTED
Sent when a user finishes it's trial period without renewing to a paid-period

Properties

The following properties are the main ones this integration can set and update in your Sendinblue users as tags:
Property
Description
USER_ID
Contains the user_id that holds the purchase.
PLAN
Contains the Plan id that was bought.
SUBSCRIPTION_STATUS
Filled for events that regards a subscription.
Possible Values :
  • AUTO_RENEWING
  • ON_HOLD
  • IN_GRACE_PERIOD
  • AUTO_RENEWING_CANCELED
  • DEACTIVATED
  • REVOKED
  • PAUSED
  • UNPAID
STORE
Contains the name of the Store through which the purchase was made.
Possible values:
  • APPLE_APP_STORE
  • GOOGLE_PLAY_STORE
  • AMAZON_APPSTORE
  • HUAWEI_APPGALLERY
STORE_COUNTRY
Contains the store country where the purchase was made.
PURCHASED_AT
Contains the date of the last transaction (original purchase or renewal).
NEXT_RENEWAL_AT
Contains the next automatic renewal date**.**
OFFER_TYPE
Contains the current offer the subscription is under.
Possible values:
  • NONE: the user is paying the normal price, no offer associated
  • FREE_TRIAL
  • INTRO_OFFER
  • PROMO_CODE
GRACE_PERIOD_EXPIRES_AT
Contains the date when the grace period will end.
LAST_EVENT
Name of the last event received for that subscription
IS_FAMILY_SHARED
Contains true or false depending on if the user has access to the subscription thanks to family sharing.
OFFER_IDENTIFIER
Contains the promo code used at the time of the purchase.
ORIGINAL_PURCHASED_AT
Contains the date of the first transaction.
The properties' names set in Sendinblue can be overriden when setting up the integration.

Integrating Purchasely with Sendinblue

The integration requires 2 steps:
  1. 1.
    Associate the user to events by providing the email associated with the user in Sendiblue to the Purchasely SDK
  2. 2.
    Activate the Sendinblue integration in the Purchasely Console

1. Associating users to events

See the Sendinblue Documentation for more information
Swift
Kotlin
Java
React Native
Purchasely.setAttribute(.sendinblueUserEmail, value: "[email protected]")
Purchasely.setAttribute(Attribute.SENDINBLUE_USER_EMAIL, "[email protected]")
Purchasely.setAttribute(Attribute.SENDINBLUE_USER_EMAIL, "[email protected]");
Purchasely.setAttribute(Attributes.SENDINBLUE_USER_EMAIL, "[email protected]");

2. Activating the Sendinblue integration

The activation requires 2 steps:
  1. 1.
    Retrieving your app's id and API key in the Sendinblue Dashboard
  2. 2.
    Enabling the Sendinblue integration in the Purchasely Console

a. Retrieving your Sendiblue Tracker ID in the Sendinblue Dashboard

  1. 1.
    Log into your Sendinblue dashboard: https://app.sendinblue.com/account/login
2. Access the Automation tab
3. Go into the Settings, in the left menu
4. Click on "Tracking Code"
5. Extract your Sendinblue MA Key from the Javascript tracking code snippet (client_key: "YOUR_SENDINBLUE_MA_KEY")

b. Enabling the Sendinblue integration in the Purchasely Console

  1. 1.
    Go in the "External integrations" section, and open the edition form for Sendinblue:
2. Enable the integration
3. Set your Sendinblue Tracker ID in the Sendinblue MA Key field
4. Enable the events you want to be sent to Sendinblue
5. (Optional) Override the names of the events that will be sent to Sendinblue
6. Enable the properties you want to be set and updated as Sendinblue properties for your users
7. (Optional) Override the property names that will be used when updating your users' Sendinblue properties
8. Save

Testing your integration

To test your integration, you can perform a set of in-app purchases in a Sandbox environment (eg: TestFlight for the App Store) and verify your user's properties are properly updated in the Sendinblue dashboard ( https://app.sendinblue.com/account/login).
If testing using Automated Messages, bear in mind that xxxx automated messages are sent roughly every 4-6 hours if you are on a free plan, and within a few minutes if you are on a paid plan.
© Purchasely 2020-2023