Sync Salesforce accounts to MySQL ADS tables
CRMMarketingSalesDeveloper
What it does
When someone creates a new Account in Salesforce with Created from Database set to false, this automation inserts rows across four MySQL tables. The new account data flows into users, ads, ad_features, and ad_facilities so the systems stay in sync.
Who it's for
Sales operations teams who manage Salesforce accounts and need them reflected in MySQL without manual entry.
Apps used
How teams use this
Sync new accounts to the data warehouse
When a sales rep creates an Account in Salesforce, all four MySQL tables populate in one flow. The team avoids manual database entry and keeps records consistent across systems.
Exclude accounts imported from the database
Accounts created with Created from Database set to true skip this automation so duplicates are not inserted. Only new accounts from Salesforce reach MySQL.
Add account status to the sync
Extend the automation to check the Account Status field and only insert rows when the status is Active. This filters out draft or inactive accounts from reaching MySQL.
Log sync results for audits
Include a step after all inserts complete to record the sync event with timestamps and row counts. This creates an audit trail for compliance and troubleshooting.
How it works
- Detect a new Salesforce Account. A new Account record is created in Salesforce and the Created from Database field is not true, which signals the account needs to sync to MySQL.
- Insert row in users table. Someone creates an Account in Salesforce, and this automation inserts a new row to the MySQL users table with the account information so the user record exists in the database.
- Insert row in ads table. Someone creates an Account in Salesforce, and this automation inserts a new row to the MySQL ads table linked to the user record so the ad data is stored and ready for queries.
- Insert rows in features and facilities. Someone creates an Account in Salesforce, and this automation inserts rows to both the ad_features and ad_facilities tables in MySQL to complete the account setup with all related attributes.