Email Integration: Using ReferralCandy on your CrateJoy store

The Email Integration method is recommended for CrateJoy retailers, even though CrateJoy does not allow invoice emails to be BCC’ed.

Step 1: CrateJoy Dashboard

  1. Go to your CrateJoy dashboard. 
  2. Go to the “Design” tab. 
  3. Click “Code”. You may wish to make a copy of your theme before editing the code. 
  4. Navigate to “components > customer > thank_you > Customer Thank You Content > component.html”.

Step 2: ReferralCandy Dashboard 

  1. Go to your ReferralCandy dashboard.
  2. Go to “Edit Referral Program > Integration”. 
  3. Under “1. Forward purchases to ReferralCandy”,  copy the ReferralCandy BCC email address in the grey box. This BCC email address is unique to your store. 

Step 3: Email client 

  1. Go to your email client (e.g.
  2. You’ll need to set an automatic forwarding of emails based on this criteria:
    • Sent from “” 
    • Subject “New Order #” 

    3. Forward all emails matching the criteria to your ReferralCandy BCC email address. 

4. If you are using Gmail, you might receive a message asking you to enter a verification code before they’ll allow you to forward your emails to ReferralCandy’s email address. To obtain the verification code: 

  1. Go to your store and make a purchase. 
  2. CrateJoy will send you an “Order Received” email, and Gmail will try to forward it to the ReferralCandy email address. 
  3. Now, go to ReferralCandy, and go to “Manage > Invoice Emails”. 
  4. You should see a new invoice email on the page. If you don’t see it, refresh the page. 
  5. Click on the new invoice email. 
  6. There will be a whole bunch of text in this email, but within it you should see a line that tells you to insert the verification code on Gmail. The code will probably be a string of numbers. Copy that code. 
  7. Go to Gmail, and navigate to “Settings” (click the gear icon on the right of the page). 
  8. Go to the “Forwarding and POP/IMAP” tab. 
  9. Paste the verification code into the input field.

Step 4: Send us an email

  1. Send an email to 
  2. Use subject line: "CrateJoy integration: I've followed the integration steps" 
  3. Mention this in the email: "Hi there, I've followed the steps on your Help Article to integrate ReferralCandy with my CrateJoy store. Please help ensure my invoice emails get parsed correctly! " 

Step 5: ReferralCandy Dashboard

  1. Go to “Edit Referral Program > Integration”. 
  2. Go to Add referral tracking code and copy the JavaScript code inside the grey box.

Step 6: CrateJoy Dashboard 

  1. Go back to CrateJoy. 
  2. Paste the code after the closing </section> tag.

Step 7: CrateJoy Dashboard 

  1. Go to “Settings > Notifications”. 
  2. Under “Admin Notifications”, look for “Order received” and click on it. This is the email that gets sent to you after a customer places an order at your store. 
  3. Paste this code before the {% if order.gifts_only %} part & save the email: 
    Email address of customer: 
        {{ }}

Step 8: ReferralCandy Dashboard

  1. Go back to ReferralCandy. 

  2. Go to "Edit Referral Program > Integration".

  3. Click the "Test integration" button. 

  4. Click "Begin test" and go through the instructions you see on the screen. 

  5. It may take up to 12 hours for ReferralCandy to analyse and extract data from your first invoice email. (Once this is done the first time, subsequent invoice emails with the same data layout will be extracted instantly)

  6. If you encounter any error that you're unsure about, contact us at Otherwise, you should be good to go!

Jason is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.