npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@23blocks/block-crm

v3.0.1

Published

CRM block for 23blocks SDK - accounts, contacts, leads, opportunities, meetings

Readme

@23blocks/block-crm

CRM block for the 23blocks SDK - accounts, contacts, leads, opportunities, meetings, and more.

npm version License: MIT

Installation

npm install @23blocks/block-crm @23blocks/transport-http

Overview

This package provides comprehensive CRM functionality including:

  • Accounts - Company/organization management with documents
  • Contacts - Contact management with profiles and events
  • Leads - Lead tracking and follow-ups
  • Opportunities - Sales pipeline management
  • Meetings - Meeting scheduling with participants and billing
  • Quotes - Quote generation and management
  • Subscribers - Newsletter/subscription management
  • Referrals - Referral tracking
  • Touches - Interaction logging
  • Calendar - Calendar integration with Zoom support

Quick Start

import { createHttpTransport } from '@23blocks/transport-http';
import { createCrmBlock } from '@23blocks/block-crm';

const transport = createHttpTransport({
  baseUrl: 'https://api.yourapp.com',
  headers: () => {
    const token = localStorage.getItem('access_token');
    return token ? { Authorization: `Bearer ${token}` } : {};
  },
});

const crm = createCrmBlock(transport, {
  apiKey: 'your-api-key',
});

// List contacts
const { data: contacts } = await crm.contacts.list({ limit: 20 });

// Create a lead
const lead = await crm.leads.create({
  firstName: 'John',
  lastName: 'Doe',
  email: '[email protected]',
  source: 'website',
});

Services

accounts - Account Management

// List accounts
const { data: accounts } = await crm.accounts.list({ limit: 20 });

// Get account by ID
const account = await crm.accounts.get('account-id');

// Create account
const newAccount = await crm.accounts.create({
  name: 'Acme Corp',
  industry: 'Technology',
  website: 'https://acme.com',
});

// Update account
await crm.accounts.update('account-id', { industry: 'Software' });

// Delete account
await crm.accounts.delete('account-id');

// Account documents
const { data: docs } = await crm.accounts.listDocuments('account-id');
await crm.accounts.addDocument('account-id', { name: 'Contract', fileId: 'file-id' });

contacts - Contact Management

// List contacts
const { data: contacts } = await crm.contacts.list({ accountId: 'account-id' });

// Create contact
const contact = await crm.contacts.create({
  firstName: 'Jane',
  lastName: 'Smith',
  email: '[email protected]',
  accountId: 'account-id',
});

// Update contact
await crm.contacts.update('contact-id', { phone: '+1234567890' });

// Get contact profile
const profile = await crm.contacts.getProfile('contact-id');

contactEvents - Contact Events

// List events for contact
const { data: events } = await crm.contactEvents.list({ contactId: 'contact-id' });

// Create event
const event = await crm.contactEvents.create({
  contactId: 'contact-id',
  eventType: 'meeting',
  scheduledAt: '2024-12-01T10:00:00Z',
});

// Confirm event
await crm.contactEvents.confirm('event-id', { confirmed: true });

// Check in/out
await crm.contactEvents.checkin('event-id', { checkedInAt: new Date().toISOString() });
await crm.contactEvents.checkout('event-id', { checkedOutAt: new Date().toISOString() });

leads - Lead Management

// List leads
const { data: leads } = await crm.leads.list({ status: 'new' });

// Create lead
const lead = await crm.leads.create({
  firstName: 'John',
  lastName: 'Doe',
  email: '[email protected]',
  source: 'website',
  status: 'new',
});

// Update lead status
await crm.leads.update('lead-id', { status: 'qualified' });

// Convert lead to contact
await crm.leads.convert('lead-id', { accountId: 'account-id' });

leadFollows - Lead Follow-ups

// List follow-ups
const { data: follows } = await crm.leadFollows.list({ leadId: 'lead-id' });

// Create follow-up
const follow = await crm.leadFollows.create({
  leadId: 'lead-id',
  followType: 'call',
  scheduledAt: '2024-12-01T10:00:00Z',
  notes: 'Initial call',
});

opportunities - Opportunity Management

// List opportunities
const { data: opps } = await crm.opportunities.list({ stage: 'negotiation' });

// Create opportunity
const opp = await crm.opportunities.create({
  name: 'Enterprise Deal',
  accountId: 'account-id',
  stage: 'discovery',
  value: 50000,
  closeDate: '2024-12-31',
});

// Update stage
await crm.opportunities.update('opp-id', { stage: 'closed_won' });

meetings - Meeting Management

// List meetings
const { data: meetings } = await crm.meetings.list({ startDate: '2024-12-01' });

// Create meeting
const meeting = await crm.meetings.create({
  title: 'Sales Review',
  startTime: '2024-12-01T10:00:00Z',
  endTime: '2024-12-01T11:00:00Z',
  accountId: 'account-id',
});

// Add participant
await crm.meetingParticipants.create({
  meetingId: 'meeting-id',
  contactId: 'contact-id',
});

// Meeting billing
await crm.meetingBillings.create({
  meetingId: 'meeting-id',
  amount: 100,
  payerId: 'payer-id',
});

quotes - Quote Management

// List quotes
const { data: quotes } = await crm.quotes.list({ opportunityId: 'opp-id' });

// Create quote
const quote = await crm.quotes.create({
  opportunityId: 'opp-id',
  name: 'Q-2024-001',
  validUntil: '2024-12-31',
  items: [{ productId: 'prod-id', quantity: 1, price: 1000 }],
});

Calendar Integration

// List calendar accounts
const { data: calendars } = await crm.calendarAccounts.list();

// Sync calendar
await crm.calendarAccounts.sync('calendar-id');

// Create busy block
await crm.busyBlocks.create({
  startTime: '2024-12-01T12:00:00Z',
  endTime: '2024-12-01T13:00:00Z',
  reason: 'Lunch',
});

// Zoom integration
const { data: hosts } = await crm.zoomHosts.list();
await crm.zoomMeetings.provision({ hostId: 'host-id', meetingId: 'meeting-id' });

Types

import type {
  Account, Contact, Lead, Opportunity, Meeting, Quote,
  CreateAccountRequest, CreateContactRequest, CreateLeadRequest,
  CreateOpportunityRequest, CreateMeetingRequest, CreateQuoteRequest,
} from '@23blocks/block-crm';

Related Packages

License

MIT - Copyright (c) 2024 23blocks