About Social Media

The Social Media API allows you to track when a loyalty customer follows a social media channel. After following a social media channel, the customer's loyalty account receives some loyalty points.

With the Social Media API, you can:

  • Add a new channel to an account's followed channels.
  • List all social media channels of a member.

Before you begin

  • Install the Wix Loyalty Program app from the App Market.
  • Members can only follow enabled channels. A site owner has to enable channels in the dashboard.

Use cases

Terminology

  • Social Media: Online platforms and applications that enable users to create, share, and engage with content, as well as interact with others through communication, collaboration, and networking. For example, Facebook, Instagram, Twitter, and LinkedIn.
  • Loyalty Points: Type of reward system used by businesses to encourage customer engagement and retention. Customers earn points based on their purchases or specific actions, such as referrals or social media engagement. These points can typically be redeemed for discounts, free products, or exclusive benefits, fostering brand loyalty and repeat business.
Did this help?

Social Media: Sample Use Cases and Flows

This article shares some possible use cases your app could support, as well as a sample flow that could support each use case. This can be a helpful jumping off point as you plan your app's implementation.

Sync followed social media channels and loyalty points with an external system

If multiple Wix sites use your app with a loyalty program, you can synchronize followed social media channels and loyalty points across these sites. This synchronization ensures consistency, eliminates manual updates, and reduces the risk of data discrepancies.

To perform an initial upload and update all social media channels with associated loyalty points from a Wix site to your external system, follow these steps:

  • Initial setup
  • Synchronize to the external system

Part 1: Initial setup

  1. Create a custom field in your system. Add a field in your external system to store the followed social media record ID and loyalty points for each account ID. Ensure your code prevents this record ID from being overwritten by future updates.
  2. Create a mapping between the site's followed social media record and loyalty points fields and the corresponding fields in your external system. This mapping will be used whenever records are synchronized.
  3. Call List Followed Channels to retrieve all followed social media channels for the relevant account. Call Get Account to fetch account details, including loyalty points. Send the channels and points fields to the external system.

Part 2: Synchronize to the external system

  1. On an ongoing basis, monitor the following webhooks to detect updates to followed social media records and loyalty points:

  2. When the above webhooks are triggered, retrieve the record and loyalty points from the payload. Use the predefined mapping to update the external system with the new information.

Did this help?

Followed Channel Object


Properties
idstringRead-onlyformat GUID

Followed social media channel ID.


accountIdstringRead-onlyformat GUID

ID of the account that has followed a social media channel.


channelstring

Followed social media channel type.


createdDatestringRead-onlyformat date-time

Date when an entity for following a social media channel was created.

FollowedChannel
JSON
{ "id": "3efb39b6-5bae-493d-a8ed-749f3794a8ba", "accountId": "18de02d0-a88c-49f7-987f-8558ca02162d", "channel": "TIKTOK", "createdDate": "2024-08-01T11:51:41.431Z" }
Did this help?