DEV Community

Keith Fawcett
Keith Fawcett

Posted on

Building with Coherence + [Partner]: Complete Integration Guide

Building with Coherence + [Partner]: A Complete Integration Guide

Overview

This guide walks through setting up a bidirectional sync between Coherence CRM and [Partner], enabling:

  • Real-time data consistency
  • Automated workflow triggers
  • Unified reporting

Prerequisites

  • Coherence account (Pro tier)
  • [Partner] account
  • Coherence API key
  • [Partner] API key

Setup

Step 1: Create Integration User

const integrationUser = await coherence.users.create({
  name: 'Partner Integration',
  email: 'integration@[yourcompany].com',
  role: 'integration',
  permissions: ['leads:read', 'deals:write']
});
Enter fullscreen mode Exit fullscreen mode

Step 2: Configure Webhooks

await coherence.webhooks.create({
  url: 'https://[partner].com/webhooks/coherence',
  events: [
    'deal.created',
    'deal.stage_changed',
    'lead.converted'
  ],
  secret: process.env.WEBHOOK_SECRET
});
Enter fullscreen mode Exit fullscreen mode

Step 3: Sync Logic

app.post('/webhooks/coherence', async (req, res) => {
  const { event, data } = req.body;

  if (event === 'deal.stage_changed') {
    await partner.updateProject({
      dealId: data.deal.id,
      stage: data.deal.stage,
      updatedAt: new Date()
    });
  }

  res.status(200).send('OK');
});
Enter fullscreen mode Exit fullscreen mode

Full guide and code samples →

Top comments (0)