Factorizer/Cluster ERP WikiCluster ERP Türkçe
Home / Business modules

Reference

Communication channels reference

Reference for parties/communication_channels, the channel types and the e-mail, phone, and other contact channels of a party.

This page lists the fields, routes, and rules of the communication_channels sub-module in src/cluster_erp/modules/parties/communication_channels/. A channel is one way to reach a party, such as an e-mail address or a phone number, typed by a channel type. Channel types are reference data that this sub-module seeds and serves under the parties settings path.

Scope and source

  • Defined in: src/cluster_erp/modules/parties/communication_channels/models.py (ChannelType, CommunicationChannel), schemas.py, services.py (ChannelTypeService, CommunicationChannelService), routes.py, seed_data.py (CHANNEL_TYPE_DEFAULTS); metadata CHANNEL_META in src/cluster_erp/modules/parties/parties/metadata.py:1438 and CHANNEL_TYPE_META in src/cluster_erp/modules/parties/settings/metadata.py:370.
  • Count: 2 tables; 13 routes (@router. decorators in routes.py); 15 seeded channel types (entries with a code key in seed_data.py).

Channel type fields

Name Type Meaning Source
code String(50) Stable key, for example email; unique among live rows src/cluster_erp/modules/parties/communication_channels/models.py:18-24, src/cluster_erp/modules/parties/communication_channels/models.py:33
name String(50) Name; unique among live rows src/cluster_erp/modules/parties/communication_channels/models.py:25-30, src/cluster_erp/modules/parties/communication_channels/models.py:34
translations JSON Names per language src/cluster_erp/modules/parties/communication_channels/models.py:35
icon String(50) Icon key src/cluster_erp/modules/parties/communication_channels/models.py:36
validation_pattern String(500) A regular expression stored with the type src/cluster_erp/modules/parties/communication_channels/models.py:37
is_active bool Active flag src/cluster_erp/modules/parties/communication_channels/models.py:38

The seeded codes are email, phone, mobile, fax, postal_address, website, linkedin, x_twitter, instagram, facebook, youtube, github, whatsapp, telegram, and tiktok (src/cluster_erp/modules/parties/communication_channels/seed_data.py:5-113).

Channel fields

Name Type Meaning Source
code String(20), unique Business key from sequence communication_channel src/cluster_erp/modules/parties/communication_channels/models.py:44, src/cluster_erp/modules/parties/communication_channels/services.py:140
party_id FK to parties_parties.id Owning party src/cluster_erp/modules/parties/communication_channels/models.py:45-47
channel_type_id FK to parties_channel_types.id Type src/cluster_erp/modules/parties/communication_channels/models.py:48-52
value String(500) The address or number src/cluster_erp/modules/parties/communication_channels/models.py:53
label String(100) Short name src/cluster_erp/modules/parties/communication_channels/models.py:54
is_primary bool Primary channel of the party src/cluster_erp/modules/parties/communication_channels/models.py:55
is_active bool Active flag src/cluster_erp/modules/parties/communication_channels/models.py:56

Routes

All paths are under /api/v1/parties.

Method and path Purpose Permission Source
POST /settings/channel-types/seed-defaults Create missing default types channel_type.seed src/cluster_erp/modules/parties/communication_channels/routes.py:35-41
GET /settings/channel-types/ List types channel_type.read src/cluster_erp/modules/parties/communication_channels/routes.py:44-58
POST /settings/channel-types/ Create a type channel_type.create src/cluster_erp/modules/parties/communication_channels/routes.py:61-69
PUT /settings/channel-types/{type_id} Update a type channel_type.update src/cluster_erp/modules/parties/communication_channels/routes.py:72-83
POST /settings/channel-types/bulk-delete Soft-delete several types channel_type.bulk_delete src/cluster_erp/modules/parties/communication_channels/routes.py:86-94
DELETE /settings/channel-types/{type_id} Soft-delete a type channel_type.delete src/cluster_erp/modules/parties/communication_channels/routes.py:97-105
GET /channels/all Page of channels across parties channel.read src/cluster_erp/modules/parties/communication_channels/routes.py:113-155
GET /{party_id}/channels Channels of one party channel.read src/cluster_erp/modules/parties/communication_channels/routes.py:158-166
POST /{party_id}/channels Create channel.create src/cluster_erp/modules/parties/communication_channels/routes.py:169-181
GET /channels/{channel_id} One channel channel.read src/cluster_erp/modules/parties/communication_channels/routes.py:184-194
PUT /channels/{channel_id} Update channel.update src/cluster_erp/modules/parties/communication_channels/routes.py:197-211
POST /channels/bulk-delete Soft-delete several channel.bulk_delete src/cluster_erp/modules/parties/communication_channels/routes.py:214-222
DELETE /channels/{channel_id} Soft-delete one channel.delete src/cluster_erp/modules/parties/communication_channels/routes.py:225-233

Constraints and validation

  • Setting is_primary on a channel clears the flag on every other live channel of the party, whatever its type (src/cluster_erp/modules/parties/communication_channels/services.py:137-138, src/cluster_erp/modules/parties/communication_channels/services.py:162-163, src/cluster_erp/modules/parties/communication_channels/services.py:226-234).
  • Seeding matches existing types by name, fills a missing code and missing translations on them, and creates the rest; it runs at every start (src/cluster_erp/modules/parties/communication_channels/services.py:73-100, src/cluster_erp/modules/parties/module.py:63-74).
  • A grep for validation_pattern in src/ and webapp/ finds it only in the model, the schemas, the metadata, and the seed data. No code at this commit checks a channel value against the pattern.
  • Other modules resolve a party's e-mail addresses through ResolveEntityEmails, which reads live, active channels of the type with code email (src/cluster_erp/modules/parties/module.py:489-536), and its contact values through GetPartyContactValues (src/cluster_erp/modules/parties/privacy_handlers.py:35-66).

Discrepancies

Terms introduced

Term Code identifier Definition Turkish term Source
communication channel CommunicationChannel One way to reach a party, such as an e-mail address or a phone number. İletişim kanalı src/cluster_erp/modules/parties/communication_channels/models.py:41
channel type ChannelType The reference record that types a channel. Kanal türü src/cluster_erp/modules/parties/communication_channels/models.py:15

Verified against commit 92f8051 on 2026-11-13.

Verified against commit 92f8051 · 2026-11-13