> For the complete documentation index, see [llms.txt](https://en.help.firstline.cc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://en.help.firstline.cc/feature/integrate/automation/example-member-sync.md).

# Example: Member sync

## Overview

You can use the “Automation” feature to synchronize with your internal member data. Using a “Webhook script,” you can set up an automation process that is triggered when customer data changes.

This setup can help you automatically trigger the Webhook script at specific moments, such as when member data is updated or changed. Through the Webhook, you can send the relevant data to the internal system to synchronize member data.

## 1. Add a Webhook script

First, the company needs to have or develop an internal synchronization API. You can create a “Webhook script” to call that API URL for customer data synchronization, and you can name it something like “Member Sync.”

When setting up the “Webhook script,” you can specify trigger conditions, such as triggering the script when customer data changes. In the script settings, you can enter the URL of the internal synchronization API and configure the required parameters and authentication method to ensure correct data synchronization.

<figure><img src="https://842546780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNRu7dk70ei7JV9HlW9%2Fuploads%2FvJ8KzcwOUkeN6nW7Npwm%2F%E6%88%AA%E5%9C%96%202023-05-19%20%E4%B8%8B%E5%8D%881.02.45.png?alt=media&#x26;token=a5cfbf55-c619-48e2-bc16-bf7fbae86dc6" alt=""><figcaption></figcaption></figure>

## 2. Add automation

Finally, we need to add “Automation.” You can create one named “Member Sync” for easier identification and management.

When setting up the script, please configure the “trigger source” and “when the specified event is triggered” conditions according to your scenario. These conditions can be specific actions, events, or data changes, such as triggering when there is a customer update.

Next, in the “Execute Action” option, you can choose the newly added “Member Sync” Webhook script as the action to execute. This means that when the trigger conditions are met, the system will run the script, call the internal synchronization API you configured, and synchronize member data.

<figure><img src="https://842546780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNRu7dk70ei7JV9HlW9%2Fuploads%2FlWXGpwx7vnzw5sWocgYK%2F%E6%88%AA%E5%9C%96%202023-05-19%20%E4%B8%8B%E5%8D%881.08.47.png?alt=media&#x26;token=d057f2e4-ee35-4f79-9604-d61fedf8ffa2" alt=""><figcaption></figcaption></figure>

## 3. Done!

Now, through the automation process, the internal API of the company is automatically called when customer data is added or changed. This automation process can save you time and effort while ensuring the accuracy and consistency of customer data.

This automation process can achieve real-time data synchronization and updates, ensuring that your internal system stays synchronized with customer data. You no longer need to handle data synchronization manually, greatly saving time and effort, while also reducing the risk of human error.
