agentsclimarketplace

Intercom core workflow a

Skill jeremylongshore/claude-code-plugins-plus-skills/plugins/saas-packs/intercom-pack/skills/intercom-core-workflow-a

425 plugins, 2,810 skills, 200 agents for Claude Code. Open-source marketplace at tonsofskills.com with the ccpi CLI package manager.

Install
npx -y skills add jeremylongshore/claude-code-plugins-plus-skills --skill intercom-core-workflow-a

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

'Manage Intercom contacts: create, search, update, merge leads into users.

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

5.9 KB, as published. Nobody here has run it

Intercom Contacts & Contact Management

Overview

Primary workflow for managing Intercom contacts. Covers creating users and leads, searching with filters, updating custom attributes, merging leads into users, and listing segments. This SKILL.md gives you the high-level workflow and the first example; drill into references/implementation.md for the full step-by-step code and references/examples.md for end-to-end flows.

Prerequisites

  • Completed intercom-install-auth setup
  • Understanding of Intercom contact model (users vs leads)
  • Valid API credentials with contacts read/write scope

Instructions

The contact workflow is six operations against the intercom-client SDK. Instantiate the client once, then call the operation you need:

import { IntercomClient } from "intercom-client";

const client = new IntercomClient({
  token: process.env.INTERCOM_ACCESS_TOKEN!,
});

// Create an identified user (has external_id)
const user = await client.contacts.create({
  role: "user",
  externalId: "customer-9001",
  email: "[email protected]",
  name: "Alice Johnson",
  customAttributes: { plan: "enterprise" },
});

The six operations, in the order you typically reach for them:

  1. Create contactscontacts.create with role: "user" (identified, needs externalId) or role: "lead" (anonymous).
  2. Search contactscontacts.search with a single filter or a compound AND/OR query, plus pagination and sort.
  3. Update a contactcontacts.update by contactId to change name or custom attributes.
  4. Merge a lead into a usercontacts.merge({ from: leadId, into: userId }); the lead's conversations, events, and tags transfer to the user.
  5. List segmentscontacts.listSegments({ contactId }) to see which segments a contact belongs to.
  6. Paginate all contactscontacts.list with startingAfter cursor to stream the full contact base.

Full code for every step, including compound-search filters and the async-generator pagination helper, is in references/implementation.md.

Output

Each operation returns a typed response from the SDK:

  • create / update — a single contact object: { type: "contact", id, role, email, name, customAttributes, created_at, ... }. The id is the Intercom-generated handle you pass to later calls.
  • search{ data: Contact[], totalCount, pages }. Iterate data; read totalCount for the match count; use pages.next.startingAfter to page.
  • merge — the surviving user contact (the into target); the from lead is deleted.
  • listSegments{ data: Segment[] }, each { id, name }.
  • list — one page { data: Contact[], pages }; follow pages.next.startingAfter until it is absent.

Contact Data Model

FieldTypeDescription
idstringIntercom-generated unique ID
external_idstringYour system's user ID
role"user" or "lead"Contact type
emailstringEmail address
namestringFull name
phonestringPhone number
custom_attributesobjectCustom key-value data
created_atnumberUnix timestamp
last_seen_atnumberLast activity timestamp
signed_up_atnumberSignup timestamp
tagsobjectApplied tags list
companiesobjectAssociated companies
locationobjectGeoIP location data

Error Handling

ErrorHTTP CodeCauseSolution
not_found404Contact ID doesn't existVerify with search first
conflict409Duplicate external_id or emailSearch before creating
parameter_invalid422Bad field value or missing required fieldCheck field types and names
rate_limit_exceeded429Over 10,000 req/min (private apps)Add backoff, batch operations
merge_not_possible400Merging user into lead (reversed)from must be lead, into must be user

Examples

Quick create-then-search flow:

const user = await client.contacts.create({
  role: "user",
  externalId: "customer-9001",
  email: "[email protected]",
  name: "Alice Johnson",
});

const found = await client.contacts.search({
  query: { field: "email", operator: "=", value: "[email protected]" },
});
console.log(`Found ${found.totalCount} match(es)`);

Three fuller worked flows — lead-to-user lifecycle, segmenting recent enterprise signups, and streaming every contact for an export — are in references/examples.md.

Resources

Next Steps

For conversation management (creating, replying to, and searching conversations), see the companion skill intercom-core-workflow-b, which builds on the contact IDs produced by this workflow.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.