Skip to main content

Overview

Many platforms collect valuable customer information - contact details, company data, deal information, and interaction history. Your users need this data in their CRM systems, but manually copying information between platforms is tedious and error-prone. The Traditional Problem:
  • Users must manually export data from your platform
  • Copy and paste into their CRM (HubSpot, Salesforce, Copper, etc.)
  • Risk of data entry errors and outdated information
  • No real-time sync between systems
The Alloy Automation Solution: With Alloy Automation, you can add a “Send to CRM” button to your platform that:
  • Lets users choose their preferred CRM
  • Handles authentication automatically
  • Maps your data fields to their CRM’s format
  • Pushes data with one click
  • Works with dozens of CRM platforms

Components of CRM Data Sync

  • Connectors - Pre-built integrations for CRM platforms (HubSpot, Salesforce, Copper, Zoho, Pipedrive, and more)
  • Credentials - Secure authentication that Alloy manages - OAuth flows, API keys, tokens - handled automatically
  • Actions - Operations available for each CRM (createContact, createDeal, createCompany, updateContact, etc.)
  • Field Mapping - Translation layer between your universal data model and each CRM’s specific field names and requirements

How CRM Data Sync Works

  1. User clicks “Send to CRM” in your application
  2. First time only: User selects their CRM and authenticates (OAuth handled by Alloy)
  3. Your app discovers available actions and fields for their chosen CRM
  4. Map your data to their CRM’s field format
  5. Show preview of what will be created (optional but recommended)
  6. Execute action to push data to their CRM
  7. Confirm success and store the CRM record ID for future updates
This pattern works for contacts, deals, companies, or any CRM entity. You can trigger syncs manually (button click), automatically (on record creation), in bulk (historical import), or bidirectionally (pull data from CRM back into your platform).

Building Your First Integration

Select the appropriate drop-down below based on which Alloy Automation product you’ll be building with.

Prerequisites

Before you begin, ensure you have:
  • Alloy API Key - Generate in Alloy Dashboard → Settings → API Keys
  • Base URL - https://production.runalloy.com
  • Required headers for all API calls:
Store your API key securely (environment variables, secrets manager). Never expose it in client-side code.

Step 1: Create a User (One-Time Setup)

Before managing credentials or executing actions, create a user record in Alloy for each of your end-users. This enables multi-tenancy and isolates each user’s credentials and data.API Call:
Response:
Store this userId in your database associated with the user’s account. You’ll pass it in the x-alloy-userid header for all subsequent API calls associated with this user.

Step 2: Discover Available CRM Connectors

List all available connectors and filter for CRM platforms. This lets you show users which CRMs they can connect to.API Call:
Response:
Filter for CRM Connectors:

Step 3: Let User Select CRM and Authenticate

When a user selects their CRM, check if they already have credentials. If not, initiate the authentication flow.Check for Existing Credentials:
Response (No Credentials):
Create Credential (OAuth Flow):
Response:
Redirect your user to the oauthUrl. After they authorize, Alloy redirects them back to your redirectUri with a success parameter. The credential is now stored securely and you can use the credentialId for all future API calls.Response (Existing Credentials):
Store the credentialId in your database associated with the user and their selected CRM.

Step 4: Discover Available Actions and Fields

Before pushing data, inspect what actions are available and what fields they require. This allows you to dynamically build your field mapping.List Available Resources and Actions:
Response:
Get Detailed Action Schema:
Response:
This tells you exactly what fields the CRM expects, allowing you to map your data correctly.

Step 5: Map Your Data to CRM Fields

Create a mapping between your platform’s field names and each CRM’s requirements. Different CRMs use different field names for the same data.Your Universal Data Model:
Field Mapping Configuration:
Example Usage:

Step 6: Execute Action to Push Data

Now you’re ready to execute the action and push data to the user’s CRM.API Call:
Success Response:
Store the returned id in your database if you need to update this contact later.Error Response:

Error Handling

All Connectivity API endpoints return structured error responses. Handle common scenarios gracefully:Credential Expired or Revoked:
Solution: Prompt user to re-authenticate with their CRM.Rate Limit Exceeded:
Solution: Implement exponential backoff and retry logic. Wait before retrying the request.Invalid Field Value:
Solution: Validate data before sending to CRM. Show user-friendly error messages.Best Practices:
  • Log execution IDs for debugging
  • Show human-friendly messages to users
  • Implement retry logic for transient failures (429, 5xx errors)
  • Store credential status in your database to avoid repeated auth failures

Connector-Specific Walkthroughs

HubSpot is one of the most popular CRM platforms, offering marketing, sales, and service tools.Available Actions:
  • createContact - Create a new contact
  • updateContact - Update existing contact
  • createDeal - Create a sales opportunity
  • createCompany - Create a company record
Authentication:
  • Type: OAuth 2.0
Field Mapping for Contacts:
Field Mapping for Deals:
Example: Create Contact
Example: Create Deal
Salesforce CRM is the leading enterprise CRM platform with extensive customization capabilities.Available Actions:
  • createContact - Create a new contact
  • updateContact - Update existing contact
  • createOpportunity - Create a sales opportunity (called “Deal” in other CRMs)
  • createAccount - Create an account record (called “Company” in other CRMs)
Authentication:
  • Type: OAuth 2.0
Field Mapping for Contacts:
Field Mapping for Opportunities (Deals):
Example: Create Contact
Example: Create Opportunity
The StageName values depend on your Salesforce org’s configuration. Common values include: “Prospecting”, “Qualification”, “Proposal/Price Quote”, “Negotiation/Review”, “Closed Won”, “Closed Lost”.
Copper (formerly ProsperWorks) is a CRM designed for Google Workspace users.Available Actions:
  • createPerson - Create a new person (called “Contact” in other CRMs)
  • updatePerson - Update existing person
  • createOpportunity - Create a sales opportunity
  • createCompany - Create a company record
Authentication:
  • Type: OAuth 2.0
Field Mapping for People (Contacts):
Field Mapping for Opportunities (Deals):
Example: Create Person
Example: Create Opportunity
The monetary_value is in cents (so 4500000 = $45,000), and pipeline_stage_id must reference a valid pipeline stage in the user’s Copper account. You may need to fetch available pipeline stages first.

Common Integration Patterns

While this blueprint focuses on the “Send to CRM” button use case, Alloy Automation is flexible enough to support many patterns: Manual Sync (Button Click)
User reviews data and clicks “Send to CRM” to push selected records. This gives users control over what gets synced and when.
Automatic Background Sync
Trigger syncs automatically when records are created or updated in your platform. Users don’t need to take any action - data flows seamlessly.
Bulk Historical Import
When a user first connects their CRM, offer to sync all existing records from your platform. Process in batches to respect rate limits.
Bidirectional Sync
Pull data from the CRM back into your platform. Keep both systems in sync automatically.
Selective Sync with Filters
Let users choose which types of records or which customers to sync based on tags, status, or custom criteria.

Additional Resources

Next Steps:
Now that you understand CRM data sync, explore our companion blueprints on Business Loan Underwriting for financial data extraction and Journal Entries for accounting reconciliation workflows.