twenty_crm
A comprehensive Drupal module that provides seamless integration with the Twenty CRM API for customer relationship management, featuring advanced Tagify-based UI components for person and company reference fields.
Key Features
- Reference Fields: Tagify-based field widgets for person and company references with real-time auto-complete
- Drupal Services: Person and Company services for programmatic API access
- Secure API Integration: Key module integration for secure API token storage
- Multi-entity Support: Person and company management with type-safe operations
- Code Generation: Generate typed entity classes for any Twenty CRM entity (Opportunity, Note, Task, custom entities)
- Enterprise Ready: Comprehensive logging, caching, and error handling
Requirements
- Drupal 9.5+ | 10+ | 11+
- PHP 8.1+
- Key module
- Tagify module
factorial-io/twenty-crm-php-client(installed via Composer)
Installation
composer require drupal/twenty_crm drush en twenty_crm
Configuration
- Create API key at Configuration → System → Keys
- Configure module at Configuration → Web Services → Twenty CRM
- Add Person Reference or Company Reference fields to your content types
Usage
The module provides Person Reference and Company Reference field types that allow users to search and select people or companies directly from Twenty CRM with real-time auto-complete functionality powered by Tagify.
For developers, access Twenty CRM data programmatically via Drupal services:
twenty_crm.person_service- People managementtwenty_crm.company_service- Company managementtwenty_crm.client- Direct API client access for any entity
Code Generation
The underlying PHP client includes a code generator for type-safe access to any Twenty CRM entity:
vendor/bin/twenty-generate --config=.twenty-codegen.yaml --with-servicesGenerate typed classes for Opportunity, Note, Task, or any custom entities in your Twenty CRM instance with full IDE autocomplete support.
Architecture
Built on the standalone factorial-io/twenty-crm-php-client PHP package, providing a dynamic entity system that works with any Twenty CRM schema, PSR-18 HTTP client abstraction, and comprehensive error handling.
Development sponsored by Factorial.io - Expert Drupal consulting and API integrations.