--- title: "Integrating Yotpo Loyalty & Referrals with Cordial" slug: "integrating-yotpo-loyalty-referrals-with-cordial" tags: ["Shopify", "Salesforce Commerce Cloud", "Shopify Plus", "Adobe Commerce (Magento)", "Custom", "BigCommerce", "Loyalty and Referrals"] updated: 2024-07-21T06:38:06Z published: 2024-07-21T06:38:06Z canonical: "support.yotpo.com/integrating-yotpo-loyalty-referrals-with-cordial" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.yotpo.com/llms.txt > Use this file to discover all available pages before exploring further. # Integrating Yotpo Loyalty & Referrals with Cordial Products Loyalty ###### Supported plans Premium, Enterprise ###### eCommerce Platform Shopify, Shopify Plus, Adobe Commerce (Magento), BigCommerce, Salesforce Commerce Cloud, Custom If you use Cordial to send marketing emails to your customers, you can use Yotpo Loyalty & Referrals' Cordial integration to automatically pass program-related data directly into your Cordial account! Sending rewards and referral program-related emails directly from Cordial makes it easier to manage your marketing drips, ensure that customers receive the right email at the right time, and better target customers based on their program status. ## Creating an API key To get started, you'll have to create an **Create an API Key** in Cordial To create an API key: 1. Head to the **Integrations** section of your Yotpo Loyalty & Referrals admin. 2. Select **Cordial** from the drop-down. 3. Click on the [Find or Create Here](https://admin.cordial.io/#account/apikeys/grid/1) link next to "Cordial API Key". ![](https://cdn.document360.io/f3c2ab59-fe4c-4f93-9614-2872f40e8aa7/Images/Documentation/e0e8d905-68d6-4b6f-bf21-226131fa0509.png?sv=2026-02-06&spr=https&st=2026-10-29T06%3A42%3A32Z&se=2026-10-29T07%3A42%3A32Z&sr=c&sp=r&sig=2GOCxBtRXR%2F6dYoU6QbJ4L9qxJ4GvHMsumGjVFQrQMo%3D) Important: If you aren't already logged in, you'll be redirected to log in to your Cordial account. You can click the "find or create here" link again or head to the "API Keys" section under **Administration** in Cordial. 1. Click the **+ New** button to create your Yotpo Referrals API Key. 2. Name your **API Key** and add Yotpo Referrals' IP addresses to the IP Whitelist (the descriptions can just be 1,2,3,4). To view the full list of elastic IPs, see [Allowlisting Yotpo Loyalty & Referrals Elastic IPs](https://support.yotpo.com/docs/allowlisting-yotpo-loyalty-referrals-elastic-ips). **See a completed form example** ![](https://cdn.document360.io/f3c2ab59-fe4c-4f93-9614-2872f40e8aa7/Images/Documentation/c8de2ada-b85c-45dc-9025-8c0e2b7e501d.png?sv=2026-02-06&spr=https&st=2026-10-29T06%3A42%3A32Z&se=2026-10-29T07%3A42%3A32Z&sr=c&sp=r&sig=2GOCxBtRXR%2F6dYoU6QbJ4L9qxJ4GvHMsumGjVFQrQMo%3D) 1. Click on **Generate Key**. 2. Copy the **API Key** that was generated & paste it into the **Cordial Integration Set-Up** in the Yotpo Loyalty & Referrals admin (Steps 1-3) 3. Your Yotpo Loyalty & Referrals **customer attributes** will now begin syncing into cordial! ### Connecting Loyalty & Referrals events to Cordial Now that we have your **customerattributes** syncing into Cordial, we'll also want to start syncing those **swell-relatedevents.** You'll need to repeat the steps below for *each Yotpo Referrals email event* you'd like to push into Cordial. **Loyalty and Referrals Events** - Swell Referrals Points Earned - Swell Referrals Redemption Created - Swell Referrals Points Reminder - Swell Referrals Redemption Reminder - Swell Referrals Customer Birthday - Swell Referral Share - Swell Referral Completed - Swell Referrals Tier Earned - Swell Referrals Tier Lost - Swell Referral Share Reminder - Swell Referral Discount Code Updated The events will appear in the following format: *swell_referral_share* **Please see** [Cordial's help center](https://support.cordial.com/hc/en-us/articles/115005693247) **on how to use event properties in Cordial emails** To create these events in Cordial: 1. Click the **Message Automation** tab. 2. Click **Create New Automation.** 3. Create New Message should be filled out following the below guidelines: - **Message Name**: A Yotpo Referrals Event (see all Yotpo Referrals events at the top of this section) - **Message Key**: Will auto-fill, leave as is ** - **Tag this Message**: (Optional) - **Classification**: Transactional 4. Click **Continue** 5. Your Message Automation has been created and you'll see your **Message Key** in the top-left: ![](https://cdn.document360.io/f3c2ab59-fe4c-4f93-9614-2872f40e8aa7/Images/Documentation/7f486e5a-7f00-4453-a08a-3352917cf924.png?sv=2026-02-06&spr=https&st=2026-10-29T06%3A42%3A32Z&se=2026-10-29T07%3A42%3A32Z&sr=c&sp=r&sig=2GOCxBtRXR%2F6dYoU6QbJ4L9qxJ4GvHMsumGjVFQrQMo%3D) 6. Go back to the Yotpo Loyalty & Referrals [**Integrations**](https://loyalty-app.yotpo.com/integrations) page. 7. Click on **Settings** next to Cordial. 8. Select the Yotpo Referrals event you just used in creating your Cordial Message Automation and add the corresponding **Message Key** from Step 3 or 5 into the Automation Key field: ![](https://cdn.document360.io/f3c2ab59-fe4c-4f93-9614-2872f40e8aa7/Images/Documentation/0ce5408a-ef1e-43bc-936e-03945144b3c6.png?sv=2026-02-06&spr=https&st=2026-10-29T06%3A42%3A32Z&se=2026-10-29T07%3A42%3A32Z&sr=c&sp=r&sig=2GOCxBtRXR%2F6dYoU6QbJ4L9qxJ4GvHMsumGjVFQrQMo%3D) 9. Click **Add** and you will see the event populate in the Settings modal. 10. **Repeat** these steps for each Yotpo Referrals event you'd like to connect. ## Using Referrals & Cordial Please note: When Yotpo Loyalty & Referrals sync customer email addresses with Cordial, the users are automatically set to "**subscribed: none"** status. If the sync includes users that are already set to **"subscribed"** in Cordial, the status will not change and they will remain as **"subscribed"**. Now that all of your events & customer attributes have been synced into Cordial, it's time to start building **automations**! Since you already use Cordial, you are likely familiar with how to create an automation but we'll provide a quick summary below as well as proper **syntax** to incorporate those attributes. ### Syntax for Loyalty & Referrals attributes in Cordial Proper Cordial syntax for Yotpo Loyalty & Referrals attributes is extremely important when writing your Message Content in Cordial. You can pull all kinds of Yotpo Referrals attributes into an email depending on whether that information is related directly to the **Contact** (customer email address) or coming from the **Event** itself (Yotpo Referrals Points Earned, Yotpo Referrals Points Reminder, Yotpo Referral Share, etc). *Syntax* - *Contact Attributes=* ***{$contact.****SWELL_SHORTNAME_HERE****}*** - *Event-Related Attributes =* ***{$extVars.****swell_longname_here****}*** **Contact vs. Event Attributes** - **Contact** attributes will be available to use in *all emails* **Event-Related** attributes will only populate in an email i*f fired by said event* - **Contact** attributes will use *yotpo referrals short-names* **Event-Related** attributes will use *yotpo referrals long-names* - [All Contact (customer) & Event-related attributes, along with their short & long names, can be found here](/v1/docs/email-integrations-attributes-events) ### Creating an automation in Cordial To get started: 1. Go to **Message Automation.** 2. Click on **Create New Automation** - you should see all the different events (automations) you already set up in the previous section here: ![](https://cdn.document360.io/f3c2ab59-fe4c-4f93-9614-2872f40e8aa7/Images/Documentation/7cb86ddc-dd9b-4360-abc2-c8695e909280.png?sv=2026-02-06&spr=https&st=2026-10-29T06%3A42%3A32Z&se=2026-10-29T07%3A42%3A32Z&sr=c&sp=r&sig=2GOCxBtRXR%2F6dYoU6QbJ4L9qxJ4GvHMsumGjVFQrQMo%3D) 3. Select the Automation you'd like to work on and complete the **Message Header.** 4. Click **Edit** under **Message Content** to add the body of your email. You'll want to add the message (including the attributes) you'd like to send to your customers from the event that was triggered. For example, the message content for a Yotpo Referrals Points Earned automation might be: ```plaintext Hey! Thanks for shopping with us :) You just earned {$extVars.swell_perk_reward_points} points from your latest purchase with us, bringing you to a total of {$contact.SWELL_PBAL} points Once you receive your product & fall in love, feel free to share it with your friends to earn discounts, free products, & more at our store. Simply share the link below with friends & family to start earning! Your Referral Link: {$contact.SWELL_REFL} See you soon! ``` Mixing Contact & Event Attributes Be sure to note the mixture of contact & event-related attributes in the above example email. You'll notice that **swell_perk_reward_points** is tied specifically to the "Yotpo Referrals Points Earned" event and cannot be used in all emails, while the contact attributes, **SWELL_PBAL** & **SWELL_REFL** can be used in any email! 1. Once you're satisfied with your message content, **Publish** your draft. 2. After publishing, click on **API** under "Sending Methods" to **Enable** this method. ![](https://cdn.document360.io/f3c2ab59-fe4c-4f93-9614-2872f40e8aa7/Images/Documentation/b9fc8f01-7a29-4b9b-9875-510beb5d4202.png?sv=2026-02-06&spr=https&st=2026-10-29T06%3A42%3A32Z&se=2026-10-29T07%3A42%3A32Z&sr=c&sp=r&sig=2GOCxBtRXR%2F6dYoU6QbJ4L9qxJ4GvHMsumGjVFQrQMo%3D) And you're all set! You've created your first **Automation** in Cordial using Yotpo Referrals events & attributes. Repeat the steps above for each event-related email you'd like to send. You might also consider including your customers' **points balances** and **referral links** in some of your non-Yotpo Referrals-related marketing collateral to increase touchpoints with your customers and your loyalty program!