CRM
Implementation: Sync CRM Data and for Gifting workflows
Step 1: Sync Contact and Lead Data from Connected CRM
Use Knit's Sync API to pull both contact (existing customers) and lead (prospects) data from any connected CRM system. Subscribe to crm_contact_info and crm_lead_info models to receive customer profiles, relationship data, and engagement signals.
API Endpoints:
POST https://api.getknit.dev/v1.0/sync.start(data_type: "contact")POST https://api.getknit.dev/v1.0/sync.start(data_type: "lead")
// Initialize sync for both contact and lead data
const initializeCRMSync = async (integrationId) => {
// Sync existing customer contacts
const contactSync = await fetch('https://api.getknit.dev/v1.0/sync.start', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY',
'x-knit-integration-id': integrationId
},
body: JSON.stringify({
data_type: 'contact',
models: ['crm_contact_info', 'crm_contact_emails', 'crm_contact_addresses'],
honorScheduler: true
})
});
// Sync prospect leads
const leadSync = await fetch('https://api.getknit.dev/v1.0/sync.start', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY',
'x-knit-integration-id': integrationId
},
body: JSON.stringify({
data_type: 'lead',
models: ['crm_lead_info', 'crm_lead_emails', 'crm_lead_addresses', 'crm_lead_conversion'],
honorScheduler: true
})
});
return {
contactSync: await contactSync.json(),
leadSync: await leadSync.json()
};
};
Step 2: Identify Gifting Triggers from CRM Data
Process synced CRM data to identify gifting opportunities. Monitor for deal closures, relationship milestones, engagement signals, and VIP classifications that warrant automated gifting workflows.
// Evaluate gifting triggers for existing customers (Contacts)
const evaluateClientGiftingTriggers = (contact) => {
const triggers = [];
// Client anniversary trigger
if (contact.createdAt) {
const relationshipDuration = calculateMonthsSince(contact.createdAt);
const anniversaryMonths = [12, 36, 60]; // 1 year, 3 years, 5 years
anniversaryMonths.forEach(milestone => {
if (relationshipDuration === milestone - 0.5) { // Trigger 2 weeks before
triggers.push({
type: 'client_anniversary',
clientId: contact.id,
clientName: `${contact.firstName} ${contact.lastName}`,
company: contact.account?.name,
email: contact.email,
accountManager: contact.owner?.email,
anniversaryYears: milestone / 12,
anniversaryDate: addMonthsToDate(contact.createdAt, milestone)
});
}
});
}
// VIP client trigger based on tags
if (contact.tags && (contact.tags.includes('VIP') || contact.tags.includes('Strategic Account'))) {
const lastGiftDate = getLastGiftDate(contact.id);
const monthsSinceLastGift = calculateMonthsSince(lastGiftDate);
if (!lastGiftDate || monthsSinceLastGift >= 3) {
triggers.push({
type: 'vip_quarterly_gift',
clientId: contact.id,
clientName: `${contact.firstName} ${contact.lastName}`,
company: contact.account?.name,
email: contact.email,
accountManager: contact.owner?.email,
vipTier: contact.tags.includes('Strategic Account') ? 'premium' : 'standard'
});
}
}
// Process all identified triggers
triggers.forEach(trigger => processGiftingTrigger(trigger));
};
// Evaluate gifting triggers for prospects (Leads)
const evaluateProspectGiftingTriggers = (lead) => {
const triggers = [];
// Lead conversion trigger (became a customer)
if (lead.convertedContactId && lead.convertedDealId) {
triggers.push({
type: 'deal_closure_celebration',
prospectId: lead.id,
convertedContactId: lead.convertedContactId,
convertedDealId: lead.convertedDealId,
clientName: `${lead.firstName} ${lead.lastName}`,
company: lead.company,
email: lead.email,
accountManager: lead.owner?.email,
leadSource: lead.leadSource
});
}
// High-value prospect engagement
const highValueStatuses = ['Qualified', 'Presentation Scheduled', 'Proposal Sent', 'Negotiation'];
if (highValueStatuses.includes(lead.status)) {
const lastEngagementGift = getLastProspectGift(lead.id);
if (!lastEngagementGift) {
triggers.push({
type: 'prospect_engagement',
prospectId: lead.id,
clientName: `${lead.firstName} ${lead.lastName}`,
company: lead.company,
email: lead.email,
accountManager: lead.owner?.email,
leadStatus: lead.status,
leadSource: lead.leadSource
});
}
}
// Process all identified triggers
triggers.forEach(trigger => processGiftingTrigger(trigger));
};
Step 3: Route Customer Data to Appropriate Gifting Workflow
When gifting triggers are identified, route customer data to the appropriate workflow based on trigger type. Different gifting scenarios require different approval processes, budget allocations, and personalization approaches.
// Process identified gifting triggers
const processGiftingTrigger = async (trigger) => {
switch (trigger.type) {
case 'deal_closure_celebration':
await initiateDealClosureGift(trigger);
break;
case 'client_anniversary':
await initiateAnniversaryGift(trigger);
break;
case 'prospect_engagement':
await initiateProspectEngagementGift(trigger);
break;
case 'vip_quarterly_gift':
await initiateVIPGift(trigger);
break;
case 'reengagement_gift':
await initiateReengagementGift(trigger);
break;
}
};
// Deal closure celebration workflow
const initiateDealClosureGift = async (trigger) => {
// Fetch deal details to determine gift budget
const dealDetails = await fetchDealDetails(trigger.convertedDealId);
const giftWorkflow = {
workflowType: 'deal_closure',
recipientId: trigger.convertedContactId,
recipientName: trigger.clientName,
company: trigger.company,
recipientEmail: trigger.email,
accountManager: trigger.accountManager,
budgetTier: determineDealClosureBudget(dealDetails.value),
giftOptions: await fetchGiftOptions('deal_closure', {
industry: dealDetails.industry,
dealSize: dealDetails.value,
leadSource: trigger.leadSource
}),
approvalRequired: dealDetails.value >= 50000,
personalizedMessage: `Welcome to the team, ${trigger.clientName}! We're thrilled to start this partnership.`,
status: dealDetails.value >= 50000 ? 'pending_approval' : 'pending_selection'
};
// Send to account manager for approval/personalization
await sendGiftWorkflowNotification(giftWorkflow);
// Log gift initiation
await logClientGift({
type: 'deal_closure',
clientId: trigger.convertedContactId,
dealId: trigger.convertedDealId,
triggeredAt: new Date()
});
};
Key Data Models and APIs
Knit provides unified access to customer relationship data across 20+ CRM platforms through standardized data models:
| Data Model / API | Description |
|---|---|
crm_contact_info |
Existing customer data including firstName, lastName, email, jobTitle, account (company reference), owner (assigned account manager), createdAt (for relationship anniversaries), lastActivityAt (engagement tracking), and tags for VIP/tier classification. |
crm_lead_info |
Prospect data including firstName, lastName, email, company, jobTitle, status (sales stage), leadSource, owner (assigned sales rep), and engagement timestamps. Use for prospect gifting campaigns during sales cycles. |
crm_lead_conversion |
Tracks lead-to-customer conversion with convertedAccountId, convertedContactId, and convertedDealId. Triggers deal closure celebration gifts when leads convert to customers. |
crm_contact_emails |
Additional email addresses for contacts. Useful for sending gift notifications to multiple email addresses or finding personal email addresses for home delivery. |
crm_contact_addresses |
Physical addresses for gift delivery. Syncs address details from CRM systems to enable direct-to-contact gift shipping without manual address collection. |
POST /v1.0/sync.start |
Initiates data synchronization for CRM contacts and leads. Specify data_type: "contact" or data_type: "lead" with relevant models. Configure honorScheduler: true for regular delta syncs. |
| Webhook Events | Receive record.new events when new contacts/leads are created and record.updated events when CRM data changes (deal closures, status updates, tag modifications). Real-time webhooks ensure gifting triggers fire immediately. |
Wrapping Up: Scale Client Relationships Through Automated Gifting
Automating client gifting through CRM data sync transforms gifting platforms from employee-focused tools into comprehensive relationship marketing solutions. No more manual contact imports, missed deal closures, or forgotten client anniversaries. With Knit's unified CRM data models, your platform automatically identifies B2B gifting opportunities across both customers and prospects, triggering timely, personalized gifts that strengthen relationships and differentiate your clients in competitive markets.
Key capabilities unlocked:
- Unified API for 20+ CRM Systems: Connect once to Knit, sync customer data from Salesforce, HubSpot, Pipedrive, Zoho CRM, and more without building individual integrations
- Bi-Directional Sync Capabilities: Not only pull customer data from CRMs, but write gift delivery confirmations and tracking information back to CRM custom fields
- Real-Time Deal Closure Detection: Receive instant webhook notifications when leads convert to customers or deals close, enabling same-day celebration gift delivery
- Relationship Anniversary Tracking: Automatically calculate client relationship milestones from CRM creation dates for sophisticated retention marketing
- VIP Client Identification: Use CRM tags and custom fields to identify high-value clients for premium gifting programs