AgentSkillsCN

Organizations

当您需要管理IT Glue组织机构(公司/客户)时,可使用此技能:创建、搜索、更新并管理客户文档。本技能涵盖组织类型、状态、父子关系、PSA同步、快速备注,以及与配置、联系人、密码等资源的关联管理。

SKILL.md
--- frontmatter
description: >
  Use this skill when working with IT Glue organizations (companies/clients) -
  creating, searching, updating, and managing client documentation. Covers
  organization types, statuses, parent/child relationships, PSA sync, quick
  notes, and related resources like configurations, contacts, and passwords.
triggers:
  - it glue organization
  - it glue company
  - client documentation
  - organization lookup
  - it glue client
  - organization management
  - it glue org
  - company documentation

IT Glue Organizations Management

Overview

Organizations are the foundational entity in IT Glue, representing companies, clients, vendors, or internal entities. All documentation, configurations, contacts, passwords, and flexible assets are associated with an organization. Proper organization management enables comprehensive client documentation and cross-platform integration with PSA tools.

Key Concepts

Organization Types

Organizations are classified by type for categorization:

TypeDescriptionUse Case
CustomerActive client organizationsPrimary service clients
VendorProduct/service suppliersSoftware vendors, hardware suppliers
PartnerBusiness partnersMSP partnerships, referral partners
InternalYour own organizationInternal documentation
ProspectPotential clientsPre-sales documentation

Organization Statuses

StatusDescriptionBusiness Logic
ActiveCurrently servicedStandard operational state
InactiveNot currently activeSuspended or paused accounts
ArchivedHistorical onlyNo longer serviced, read-only

Parent/Child Relationships

Organizations can have hierarchical relationships:

code
Parent Organization (Acme Holdings)
├── Child: Acme East Division
├── Child: Acme West Division
└── Child: Acme International

This enables:

  • Centralized management documentation
  • Shared configurations across divisions
  • Hierarchical reporting
  • Inherited security settings

Field Reference

Core Fields

FieldTypeRequiredDescription
idintegerSystemAuto-generated unique identifier
namestringYesOrganization name (unique)
descriptionstringNoDetailed description
quick-notesstringNoQuick reference notes
organization-type-idintegerNoType classification
organization-status-idintegerNoStatus classification

Relationship Fields

FieldTypeDescription
parent-idintegerParent organization ID
primary-contact-idintegerPrimary contact for org
primary-location-idintegerPrimary location ID

PSA Integration Fields

FieldTypeDescription
psa-idstringPSA system company ID
psa-integration-typestringPSA type (autotask, connectwise, etc.)

Metadata Fields

FieldTypeDescription
created-atdatetimeCreation timestamp
updated-atdatetimeLast update timestamp
short-namestringAbbreviated name
alertstringAlert/warning message

API Patterns

List Organizations

http
GET /organizations
x-api-key: YOUR_API_KEY
Content-Type: application/vnd.api+json

With Filters:

http
GET /organizations?filter[name]=Acme&filter[organization-status-id]=1

With Pagination:

http
GET /organizations?page[size]=100&page[number]=1&sort=name

Get Single Organization

http
GET /organizations/123456
x-api-key: YOUR_API_KEY

With Includes:

http
GET /organizations/123456?include=configurations,contacts,passwords

Create Organization

http
POST /organizations
Content-Type: application/vnd.api+json
x-api-key: YOUR_API_KEY
json
{
  "data": {
    "type": "organizations",
    "attributes": {
      "name": "New Client Corporation",
      "description": "IT services client since 2024",
      "quick-notes": "Primary contact: John Smith (555-123-4567)",
      "organization-type-id": 37,
      "organization-status-id": 1
    }
  }
}

Update Organization

http
PATCH /organizations/123456
Content-Type: application/vnd.api+json
x-api-key: YOUR_API_KEY
json
{
  "data": {
    "type": "organizations",
    "attributes": {
      "quick-notes": "Updated: New primary contact is Jane Doe",
      "alert": "Contract renewal due March 2024"
    }
  }
}

Delete Organization

http
DELETE /organizations/123456
x-api-key: YOUR_API_KEY

Warning: Deleting an organization removes all associated resources (configurations, passwords, documents, etc.)

Search by PSA ID

http
GET /organizations?filter[psa-id]=12345

Common Workflows

New Client Onboarding

  1. Create organization with basic info
  2. Set organization type (Customer)
  3. Add quick notes for reference
  4. Link to PSA with psa-id
  5. Create primary contact
  6. Add initial configurations
  7. Document passwords
javascript
async function onboardClient(clientData) {
  // Step 1: Create organization
  const org = await createOrganization({
    name: clientData.companyName,
    description: clientData.description,
    'quick-notes': clientData.notes,
    'organization-type-id': CUSTOMER_TYPE_ID,
    'organization-status-id': ACTIVE_STATUS_ID
  });

  // Step 2: Create primary contact
  await createContact(org.id, {
    name: clientData.primaryContact.name,
    email: clientData.primaryContact.email,
    phone: clientData.primaryContact.phone,
    'contact-type-id': PRIMARY_CONTACT_TYPE
  });

  // Step 3: Create initial documentation
  await createDocument(org.id, {
    name: 'Client Overview',
    content: generateOverviewContent(clientData)
  });

  return org;
}

Client Offboarding

  1. Archive passwords (don't delete for audit)
  2. Export documentation if needed
  3. Update organization status to Archived
  4. Add offboarding notes with date and reason
javascript
async function offboardClient(orgId, reason) {
  // Update status to archived
  await updateOrganization(orgId, {
    'organization-status-id': ARCHIVED_STATUS_ID,
    alert: `ARCHIVED: ${new Date().toISOString().split('T')[0]} - ${reason}`
  });

  // Add final note
  await addQuickNote(orgId, `
    Client offboarded on ${new Date().toLocaleDateString()}
    Reason: ${reason}
    Final contact: [Record contact name and handoff details]
  `);
}

PSA Sync Verification

javascript
async function verifyPsaSync() {
  // Get all active organizations
  const orgs = await fetchOrganizations({
    filter: { 'organization-status-id': ACTIVE_STATUS_ID }
  });

  const syncStatus = {
    synced: [],
    unsynced: [],
    mismatched: []
  };

  for (const org of orgs) {
    if (!org.attributes['psa-id']) {
      syncStatus.unsynced.push(org);
    } else {
      // Verify PSA record exists
      const psaCompany = await lookupPsaCompany(org.attributes['psa-id']);
      if (psaCompany) {
        syncStatus.synced.push(org);
      } else {
        syncStatus.mismatched.push(org);
      }
    }
  }

  return syncStatus;
}

Bulk Organization Report

javascript
async function generateOrgReport() {
  const orgs = await fetchAllOrganizations();

  return orgs.map(org => ({
    name: org.attributes.name,
    type: org.relationships['organization-type']?.data?.id,
    status: org.relationships['organization-status']?.data?.id,
    hasConfigurations: org.relationships.configurations?.data?.length > 0,
    hasPasswords: org.relationships.passwords?.data?.length > 0,
    psaSynced: !!org.attributes['psa-id'],
    createdAt: org.attributes['created-at'],
    updatedAt: org.attributes['updated-at']
  }));
}

Error Handling

Common API Errors

CodeMessageResolution
400Name can't be blankProvide organization name
400Name has already been takenUse unique name
401Invalid API keyCheck IT_GLUE_API_KEY
404Organization not foundVerify organization ID
422Invalid organization typeQuery valid type IDs first

Validation Errors

ErrorCauseFix
Name requiredMissing name fieldAdd name to request
Name not uniqueDuplicate nameUse different name
Invalid type IDNon-existent typeQuery /organization-types first
Invalid status IDNon-existent statusQuery /organization-statuses first

Error Recovery Pattern

javascript
async function safeCreateOrganization(data) {
  try {
    return await createOrganization(data);
  } catch (error) {
    if (error.status === 422 && error.detail?.includes('already been taken')) {
      // Organization exists - find and return it
      const existing = await findOrganizationByName(data.name);
      return existing;
    }

    if (error.status === 401) {
      throw new Error('API key invalid or expired. Check IT_GLUE_API_KEY.');
    }

    throw error;
  }
}

Best Practices

  1. Use descriptive names - Include location or identifier if needed for uniqueness
  2. Maintain quick notes - Keep emergency contact info readily available
  3. Set organization types - Enable meaningful filtering and reporting
  4. Link to PSA - Always set psa-id for cross-platform lookups
  5. Use parent/child - Organize multi-location or division clients
  6. Archive, don't delete - Preserve historical documentation
  7. Regular audits - Review organization list quarterly
  8. Document alerts - Use alert field for critical client notices
  9. Primary contact - Always set a primary contact for each org
  10. Standardize naming - Use consistent naming conventions

Related Skills