# 10.3 Sync contact data from CRM to WP

{% embed url="https://youtu.be/joYZkobqt5k" %}

Let's see how contact data can be synced. Let's go to the **CRM** & add tags for a specific user. This tag should be added/updated immediately in our WordPress environment. There are 2 ways to make it work.

**By a shortcode:** we have a shortcode **\[lcw\_contact\_sync],** and if you add this shortcode to a page and when a contact visits that page, the contact **data will be updated by visiting that page.**

**By automation:** This is the recommended way. You need to install our membership snapshot from this link: [membership snapshot](https://affiliates.gohighlevel.com/?fp_ref=spiritual-acceleration-42\&share=MTZVC2JjL7Yk01JC7V2k). when you install this snapshot, you will get a workflow named **Send Signal to WP When A Contact Data is Updated**, and a custom value named **membership\_wp\_website\_link**,  you must update the value of this '_custom value_' to your website URL.\
\
If you don't want to install the snapshot, create a workflow with the following trigger & webhook:\
\
**the trigger**: you need to set the trigger to "**Contact Changed**"\
screenshot: the workflow trigger&#x20;

<figure><img src="https://660943784-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fz05QvQmZlyr3X728HXAZ%2Fuploads%2FYcif1gUsAjjBFjXFeMxb%2FWorkflow%20trigger%20-%20contact%20changed.png?alt=media&#x26;token=11724e51-fe44-4f93-8dd1-9b18fced661f" alt=""><figcaption><p>The Workflow trigger</p></figcaption></figure>

**The webhook:** you need to set up a webhook that sends the changes of a contact to your website. In this webhook, set the **METHOD** to POST, the **URL** to your website URL(you can directly paste your website URL, we recommend creating a custom value and adding the custom value instead of the direct URL.), and add 2 **CUSTOM DATA** parameter with the keys

1. **lcw\_contact\_update** with the value **1**
2. **lcw\_create\_wp\_user** with the value **1** (this is needed if someone is in GHL but not registered yet in WordPress) - This will create a new user in WP with the following data
   1. username: Email Address
   2. email: Email Address
   3. password: GHL contact id

screenshot: the workflow webhook.

<figure><img src="https://660943784-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fz05QvQmZlyr3X728HXAZ%2Fuploads%2Fi334zLTn2XGNZj1espOB%2FSync%20WP%20Data.png?alt=media&#x26;token=43d8ddbb-fb27-4a72-9f2e-1194e281d4f9" alt=""><figcaption></figcaption></figure>

We recommend using the **By automation** way to sync your contact data because it works very efficiently and you can forget about the syncing data once you set up the workflow. The other way **By a shortcode** is used in some cases where you need to sync contact by force, in this case, an API request will be sent to your CRM for each page load, and try to use this as little as you can.

