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?