This article applies if you run your store on Cratejoy — it walks through connecting Cratejoy to ReferralCandy using the email integration.
The email integration is the recommended connection type for Cratejoy stores. Cratejoy can't BCC its invoice emails to ReferralCandy directly, so this guide sets up a workaround: Cratejoy's "Order received" notifications are automatically forwarded from your own inbox to ReferralCandy, which uses them to detect your store's purchases and referrals.
Cratejoy's dashboard labels and template structure may shift over time — if a menu or file isn't where this guide describes, Cratejoy's support site has the current locations.
Step 1: Get your ReferralCandy email address
On the ReferralCandy dashboard, go to Integrations > Standalone.
If your connection type isn't Email Integration yet, click Change, select Email Integration, and click Save.
Copy your unique ReferralCandy email address shown in the setup instructions — invoice emails forwarded to this address are how ReferralCandy detects your Cratejoy store's purchases.
Step 2: Set up automatic forwarding
The email integration uses invoice emails to detect purchases and referrals. Since Cratejoy can't send them to ReferralCandy directly, set up automatic forwarding in the email inbox that receives your Cratejoy "Order received" notifications.
Note: Setting up automatic forwarding varies by email client. If yours isn't covered here, search your email client's support site for "automatic forwarding".
In your email client (for example, Gmail), create an automatic-forwarding rule with these criteria:
Sent from: support@cratejoy.com
Subject: "New Order #"
Forward all emails matching the criteria to your ReferralCandy email address (from Step 1).
If your email client asks for a verification code before it allows forwarding, that code is emailed to your ReferralCandy address — find it on the Invoice History tab of your Purchases & referrals page and enter it in your email client. Using Gmail? Follow the Gmail walkthrough below.
Once automatic forwarding is set up and verified, let us know — our support team will double-check that your forwarded invoice emails are parsed correctly. You can use this message: "I've followed the integration steps in your help center article to integrate ReferralCandy with my Cratejoy store. Please help ensure my invoice emails get parsed correctly."
Automatic forwarding verification with Gmail
Automatic forwarding verification with Gmail
If you use Gmail to receive your Cratejoy order notifications, here's how to set up and verify automatic forwarding to ReferralCandy:
In Gmail, go to Settings > See all settings > Forwarding and POP/IMAP, click Add a forwarding address, and enter your ReferralCandy email address.
Gmail sends a confirmation code to that address. On the ReferralCandy dashboard, open the Invoice History tab of the Purchases & referrals page — the Gmail confirmation email appears there as a new entry. If you don't see it, refresh the page.
Open the entry and copy the confirmation code.
Back in Gmail's Forwarding and POP/IMAP tab, paste the code into the verification field and click Verify.
Create the forwarding rule as a Gmail filter: from support@cratejoy.com, subject "New Order #", with the action Forward it to your ReferralCandy address.
To test the whole flow end to end, place a test order at your Cratejoy store — the "Order received" notification should be forwarded automatically and appear on the Invoice History tab.
Step 3: Add the referral tracking code to Cratejoy
On the ReferralCandy dashboard, go to Integrations > Standalone. The tracking code is in the Add ReferralCandy to your online store section — click Copy.
On your Cratejoy dashboard, go to the Design tab.
Click Code.
Navigate to components > customer > thank_you > Customer Thank You Content > component.html.
Paste the code after the closing
</section>tag.Click Save.
The tracking code records visits to your thank-you (purchase completed) page, which helps ReferralCandy detect which purchases came from referrals. To confirm the code is being detected, see Adding the referral tracking code.
Step 4: Set up Cratejoy notifications
This step adds your customer's email address to Cratejoy's "Order received" notification, so ReferralCandy can match each forwarded invoice email to the right customer.
On your Cratejoy dashboard, go to Settings and click Notifications.
Under Admin Notifications, click Order received. This is the email that gets sent to you after a customer places an order at your store.
Paste the below code before the
{% if order.gifts_only %}line:Email address of customer:
<blockquote>
{{ order.customer.email }}
</blockquote>Click Save.
Note: It may take up to 24 hours for ReferralCandy to process your first invoice email. Once completed the first time, subsequent invoice emails are processed immediately.



