SaaSquatch Help Center

Referral SaaSquatch uses email for three separate things: Identifying users, sharing between users, and notifications of referrals.

Email Identification: Referral SaaSquatch tracks email addresses to identify users.

Email Sharing: Referral SaaSquatch lets your users make referrals by letting them send their friends an email.

Email Notifications: Referral SaaSquatch can automatically send email notifications to keep your users informed about their progress in the referral program.


Email Identification

Referral SaaSquatch tracks an email field for each of your users. Emails can be included as an optional field for users created via the API or Squatch.js javascript library. If you provide email addresses for your users, then SaaSquatch can use that information for analytics, fraud management, sharing optimization and email notifications.


Email Sharing

Users can initiate sending a share message by email directly through the Referral SaaSquatch widget on your website or in your app. The mail link is a standard "mailto:" where a user clicking the email share link directs opens their email client of choice to complete the share process. In their email client the referrer can then simply input the email address of the desired recipient and make any personalizations to your referral program's standard email message.

Example


Email Notifications

Referral SaaSquatch provides a complete notification email service for your referral program.

Email notifications are available to be sent whenever a referred user signs up for a new trial or free account, and then again whenever a referred user converts to "paid" as a successful referral. These notifications allow the referrer to track the progress of their referrals and be notified when they have earned a reward.

Email Theming

The content of the emails sent to your customers through Referral SaaSquatch can also be customized.

Basic Plans

Basic plans have the ability to customize many aspects of their notification emails through the portal. Available fields include:

  • From Name: The display name you would like the email to show it was sent from.
  • From Address: The address you would like the email to show it was sent from.
  • Subject: The Subject of the type of notification email.
  • Header Image URL: Link to the image you would like to use in the email header.
  • Header Content: The content you would like to display in the email header.
  • Body Content: The content you would like to display in the email body.
  • Share Code CTA: The messaging you would like to display with the share code in the email.
  • Enable Share Link: Toggle for enabling/disabling the inclusion of the user's share links
  • Share Button Header: The mesagging you would like to include above the share links
  • Footer: The content you would like to include in the email footer.
Pro and Enterprise

Pro and Enterprise accounts are also able to fully customize the email theme through the Theme Engine in a similar manner to their widget customization.

Default ESP

By default, notifications are sent using Referral SaaSquatch's internal email service provider (ESP) SendGrid.

Name Formatting Delivery
We format & we deliver Default
Emails are formatted by the SaaSquatch Theme Engine and sent using SaaSquatch's default email service provider.
SaaSquatch SaaSquatch
We format & you deliver
Emails are formatted by the SaaSquatch Theme Engine and sent using via your email servers using SMTP or Webhooks.
SaaSquatch You
You format & you deliver
Intended for advanced use cases. Emails are formatted and delivered entirely by you building off the SaaSquatch API or Webhooks
You You

In addition to the default email notification option, the Pro and Enterprise plans provide the ability to setup more advanced email functionality. There are three options for more advanced email notification functionality; SMTP, Webhooks, and SPF Record setup. Setup instructions, examples, and the advantage of each of these options will be covered below:

SMTP

It is possible to set up your own SMTP Server to manage notification emails.

To disable SaaSquatch sending notification emails, and start using your own SMTP Server, head over to the Integrations page under the Setup sidebar heading in your SaaSquatch portal.

Here you can input the details of your SMTP server. The required fields are:

  • SMTP Server Hostname and Port
  • Authentication Method (options include "No Encryption", "TLS", and "SSL")
  • Username and Password

Test the connection to your SMTP Server to make sure all the information if correct, and then connect the SMTP server to your program.

Webhooks

Webhooks provide a solution for retrieving information through services, either not directly responsible for making an API request, or for events, like coupon created, which are not the result of a direct API request.

The two webhook events which are relevant to the email notifications are email.referral.started, for notifications when a referred user signs up for a trial, and email.referral.paid to notify whenever a referred user upgrades to a paid subscription.

Picking up these two webhook events gives you the flexibility to send out your own notification emails using your preferred email service, without needing to integrate directly with Referral SaaSquatch or make API calls.

To create a webhook subscription to SaaSquatch use:

Type: POST
URL: https://app.referralsaasquatch.com/api/v1/{tenant_alias}/subscription

Example curl request:

curl -X POST https://app.referralsaasquatch.com/api/v1/{tenant_alias}/subscription \
-u API_KEY: \
-H "Content-Type: application/json" \
-d '{
    "endpointUrl": "http://app.example.com/endpoint/sqtch",
    "name": "Zapier"
}'

Which, if successful, should return a response code: HTTP 201

You will then start receiving events via webhooks to the endpoint URL that was included above.

Please refer to the webhook documentation for a detailed look at all the Webhook events, restrictions, and best practices.

All webhook data conform to the same data format:

id String - A unique identifier for this event
type String - The type of event
tenantAlias String - The tenant used to create this data
live Boolean - True for live tenants and false for test tenants
created Number - The timestamp when this event was created
data An abitrary JSON object containing data related to this event

Check for the email.referral.started and email.referral.paid type strings in the webhook data.

The email.referral.started event will return data in the format:

{
    "id": "1337049u0194u2105",
    "type": "email.referral.started",
    "tenantAlias": "AAA111BBB222DDD333",
    "live": false,
    "created": 1337001337,
    "data": {
        "recipientUserId": "u1234",
        "recipientAccountId": "a1234",
        "subject": "Congratulations! Susy Example signed up for a trial account.",
        "message": "<p>This is rendered HTML content.</p>"
    }
}

While the email.referral.paid event will be in the format:

{
    "id": "1337049u0194u2105",
    "type": "email.referral.paid",
    "tenantAlias": "AAA111BBB222DDD333",
    "live": false,
    "created": 1337001337,   
    "data": {
        "recipientUserId": "u1234",
        "recipientAccountId": "a1234",
        "subject": "Congratulations! Susy Example signed up for a paid subscription.",
        "message": "<p>This is rendered HTML content.</p>"
    }
}

You can then make use of the Lookup User API call to grab the email address of the referrer based on the recipientUserId parameter in the webhook event.

This information provides everything needed to send out your own emails to the referrer informing them about the trial or paid status of their referrals.

SPF Record Setup

The SPF (Sender Policy File) allows you to define a hostname or IP address from which email for a given domain can originate.

Setting up the SPF Record will allow you to utilize our email servers for sending out notifications, but make it look like the emails were sent from your domain.

The SPF Record is a text record that is kept as part of the domain’s DNS zone file and is stored in the same format as the A, MX, and CNAME records. Once this is set there are no further changes that need to be made.

To allow your notification emails to be sent by Referral SaaSquatch you will need set the SPF Record to list our IP address in the SPF Record. If you are looking at setting up your email SPF Record with Referral SaaSquatch please contact our success team so that they can help you with this process. It is discouraged to create more than one SPF Record for a given domain as they can cause authorization problems. This can become a problem when trying to send out emails from your own domain as well as allowing Referral SaaSquatch to send out notifications for referral events from the same domain. This limitation should be taken into consideration before deciding to make use of our SPF email support.

Silverpop

Silverpop is an email marketing automation platform. Referral SaaSquatch supports integration with Silverpop for sending notification emails. To enable our Silverpop integration head over to the Integrations page under the Setup sidebar heading in your SaaSquatch portal.

Here you can input the details for your Silverpop account:

  • HTTP Submit Address
  • Referral Complete Email Campaign ID
  • Supplemental Values:
    • Name, and Value

Test the connection to your Silverpop account to make sure all the information is correct, and then connect Silverpop to your referral program.

Examples