The LoyaltyLion API unlocks the potential to create custom loyalty and engagement experiences by integrating with various e-commerce platforms. Harnessing this API through Pipedream allows for automated workflows that can sync customer data, track points and rewards, and personalize marketing efforts based on loyalty insights. With the API, you can automate notifications for point changes, create rules for earning points, and analyze customer behavior to tailor rewards.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
loyaltylion: {
type: "app",
app: "loyaltylion",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.loyaltylion.com/v2/customers`,
headers: {
Authorization: `Bearer ${this.loyaltylion.$auth.oauth_access_token}`,
},
params: {
since_id: `0`,
limit: `2`,
},
})
},
})
Sync Loyalty Data with Email Marketing Platforms: Automatically enroll customers in targeted email campaigns based on their loyalty status by syncing LoyaltyLion data with email marketing apps like Mailchimp. When a customer reaches a new loyalty tier, trigger a Pipedream workflow to add them to a specific Mailchimp audience segment, ensuring they receive personalized emails.
Automate Rewards Redemption Process: Connect LoyaltyLion to Shopify using Pipedream workflows to automate the rewards redemption process. Upon a customer redeeming points for a coupon, Pipedream can detect this event and generate a unique discount code in Shopify, emailing it directly to the customer, providing a seamless rewards experience.
Personalize Customer Service Based on Loyalty Data: Leverage customer loyalty information by integrating LoyaltyLion with a CRM platform such as Salesforce. When a customer submits a support ticket, a Pipedream workflow can enrich the ticket with loyalty data, allowing customer service reps to tailor their support and prioritize tickets based on customer value.
LoyaltyLion uses OAuth authentication. When you connect your LoyaltyLion account, Pipedream will open a popup window where you can sign into LoyaltyLion and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any LoyaltyLion API.
Pipedream requests the following authorization scopes when you connect your account:
write_customers
write_unsubscribes
write_orders
GET
https://app.loyaltylion.com/oauth/authorize
?
client_id={{oauth.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
state={{oauth.state}}
&
response_type=code
&
scope={{oauth.comma_separated_scopes}}
POST
https://app.loyaltylion.com/oauth/access-token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
redirect_uri={{oauth.redirect_uri}}
&
grant_type=authorization_code
&
code={{oauth.code}}