Centurio System- & moduldokumentation
🏛️ Plattformarkitektur 🔑 Login
🏠 Alla moduler / crm_office / Kunderrelationer (CRM)
🎯

Kunderrelationer (CRM)

crm crm_office 🛡️ RLS Protected

Förvaltning av intressenter, visuell pipeline (Kanban), aktivitetshistoria och lead-to-GT13_0__-konvertering.

Fachliche Bestimmung: Stödjer distributionslag vid förvärv och kundsupport. Upptäcker intressenter (leads) via webbformlar eller manuellt, leder via individuellt konfigurerbara pipeline-steger (kvalificerad, begång, offert, förhandlings) och omvandlar de förvärvade leads nackteligt till kundstamdata och erbjudanden.

⚡ Arbetsflöden och livscykler

Korrespondens → CRM cascade:business.correspondence.crm

Kaskade (review_gated).

1. lead
CRM-led / ansökning
Förberedande
Aktionen: Cm.lead.create
2. task
För att efterfråga
Uppgifter
Aktionen: create_task

CRM-led / ansökning cascade_target:business.crm.lead

Kaskade (review_gated).

1. cascade
CRM-led / ansökning

Användarförordning: förfrågningsagent plan:command_inquiry_agent

Tjänststyrd plan (durable_plan), start: manual_command.

1. inquiry_agent
inquiry_agent
{"key": "execute_command", "label": "Befehl prüfen, ausführen oder zur Freigabe vorlegen", "adapter": "agent.execute", "agent": "inquiry_agent", "condition_fact": null}
Aktionen: inquiry_agent

Låda status:crm_lead

Observable_only_observable_state machine.

1. new
ny
Status <unk>ny<unk> av ledmaskinens status.
2. contacted
Kontakta
Status <unk>kontaktad<unk> av tillståndsmaskinen.
3. qualified
Kvalificerad
Status <unk>kvalificerad <unk> av ledmaskinens status.
4. disqualified
Disqualifierade
Status <unk>Diskvalificerad<unk> av den tillståndsmaskinens led.
5. converted
omvandlade
Status <unk> omvandlat <unk> av ledmaskinens status.

Möjlighet status:crm_opportunity

Observable_only_observable_state machine.

1. open
Öppna
Status <unk>open<unk> av tillståndsmaskinen Opportunity.
2. won
- Jag vet.
Status <unk>win <unk> av tillståndsmaskinen möjlighet.
3. lost
Förlorad
Status förlorad av tillståndsmaskinen Opportunity.

🗄️ Datamodeller & fält

CrmActivities crm_activities RLS Aktiv
19 Fält / kolumner

Tabelle crm_activities

Feldname Uppgifter Förpliktelse Schlüssel Arbetsuppgifter
type VARCHAR(16) Ja * - Feld type
subject VARCHAR(255) Ja * - Feld subject
body TEXT Nein - Feld body
due_at DATETIME Nein - Feld due_at
done_at DATETIME Nein - Feld done_at
outcome TEXT Nein - Feld outcome
owner_id UUID Nein - Feld owner_id
lead_id UUID Nein FK ➔ crm_leads.id Feld lead_id
opportunity_id UUID Nein FK ➔ crm_opportunities.id Feld opportunity_id
customer_id UUID Nein FK ➔ customers.id Feld customer_id
id UUID Nein PK Feld id
tenant_id UUID Ja * FK ➔ organizations.id Feld tenant_id
created_at DATETIME Ja * - Feld created_at
updated_at DATETIME Ja * - Feld updated_at
created_by UUID Nein - Feld created_by
updated_by UUID Nein - Feld updated_by
source_type VARCHAR(32) Nein - Feld source_type
source_id UUID Nein - Feld source_id
metadata JSONB Ja * - Feld metadata
CrmLeads crm_leads RLS Aktiv
27 Fält / kolumner

Tabelle crm_leads

Feldname Uppgifter Förpliktelse Schlüssel Arbetsuppgifter
name VARCHAR(255) Ja * - Feld name
company_name VARCHAR(255) Nein - Feld company_name
email VARCHAR(320) Nein - Feld email
phone VARCHAR(64) Nein - Feld phone
interest TEXT Nein - Feld interest
source VARCHAR(32) Ja * - Feld source
status VARCHAR(32) Ja * - Feld status
estimated_value NUMERIC(14, 2) Nein - Feld estimated_value
currency VARCHAR(3) Ja * - Feld currency
owner_id UUID Nein - Feld owner_id
disqualify_reason TEXT Nein - Feld disqualify_reason
consent_given BOOLEAN Ja * - Feld consent_given
consent_at DATETIME Nein - Feld consent_at
last_activity_at DATETIME Nein - Feld last_activity_at
customer_id UUID Nein FK ➔ customers.id Feld customer_id
opportunity_id UUID Nein - Feld opportunity_id
converted_at DATETIME Nein - Feld converted_at
anonymized_at DATETIME Nein - Feld anonymized_at
id UUID Nein PK Feld id
tenant_id UUID Ja * FK ➔ organizations.id Feld tenant_id
created_at DATETIME Ja * - Feld created_at
updated_at DATETIME Ja * - Feld updated_at
created_by UUID Nein - Feld created_by
updated_by UUID Nein - Feld updated_by
source_type VARCHAR(32) Nein - Feld source_type
source_id UUID Nein - Feld source_id
metadata JSONB Ja * - Feld metadata
CrmOpportunities crm_opportunities RLS Aktiv
27 Fält / kolumner

Tabelle crm_opportunities

Feldname Uppgifter Förpliktelse Schlüssel Arbetsuppgifter
title VARCHAR(255) Ja * - Feld title
description TEXT Nein - Feld description
customer_id UUID Nein FK ➔ customers.id Feld customer_id
lead_id UUID Nein - Feld lead_id
stage_id UUID Ja * FK ➔ crm_pipeline_stages.id Feld stage_id
status VARCHAR(16) Ja * - Feld status
expected_value NUMERIC(14, 2) Ja * - Feld expected_value
currency VARCHAR(3) Ja * - Feld currency
probability INTEGER Nein - Feld probability
expected_close_date DATETIME Nein - Feld expected_close_date
owner_id UUID Nein - Feld owner_id
source VARCHAR(32) Ja * - Feld source
lost_reason TEXT Nein - Feld lost_reason
closed_at DATETIME Nein - Feld closed_at
stage_entered_at DATETIME Ja * - Feld stage_entered_at
last_activity_at DATETIME Nein - Feld last_activity_at
quote_id UUID Nein - Feld quote_id
project_id UUID Nein - Feld project_id
id UUID Nein PK Feld id
tenant_id UUID Ja * FK ➔ organizations.id Feld tenant_id
created_at DATETIME Ja * - Feld created_at
updated_at DATETIME Ja * - Feld updated_at
created_by UUID Nein - Feld created_by
updated_by UUID Nein - Feld updated_by
source_type VARCHAR(32) Nein - Feld source_type
source_id UUID Nein - Feld source_id
metadata JSONB Ja * - Feld metadata
CrmPipelineStages crm_pipeline_stages RLS Aktiv
15 Fält / kolumner

Tabelle crm_pipeline_stages

Feldname Uppgifter Förpliktelse Schlüssel Arbetsuppgifter
name VARCHAR(128) Ja * - Feld name
position INTEGER Ja * - Feld position
probability INTEGER Ja * - Feld probability
is_won BOOLEAN Ja * - Feld is_won
is_lost BOOLEAN Ja * - Feld is_lost
active BOOLEAN Ja * - Feld active
id UUID Nein PK Feld id
tenant_id UUID Ja * FK ➔ organizations.id Feld tenant_id
created_at DATETIME Ja * - Feld created_at
updated_at DATETIME Ja * - Feld updated_at
created_by UUID Nein - Feld created_by
updated_by UUID Nein - Feld updated_by
source_type VARCHAR(32) Nein - Feld source_type
source_id UUID Nein - Feld source_id
metadata JSONB Ja * - Feld metadata
CrmReports crm_reports RLS Aktiv
31 Fält / kolumner

Tabelle crm_reports

Feldname Uppgifter Förpliktelse Schlüssel Arbetsuppgifter
report_number VARCHAR(32) Ja * - Feld report_number
title VARCHAR(255) Ja * - Feld title
type VARCHAR(32) Ja * - Feld type
status VARCHAR(32) Ja * - Feld status
occurred_at DATETIME Ja * - Feld occurred_at
duration_minutes INTEGER Ja * - Feld duration_minutes
lead_id UUID Nein FK ➔ crm_leads.id Feld lead_id
customer_id UUID Nein FK ➔ customers.id Feld customer_id
opportunity_id UUID Nein FK ➔ crm_opportunities.id Feld opportunity_id
author_id UUID Nein - Feld author_id
author_name VARCHAR(255) Nein - Feld author_name
location VARCHAR(255) Nein - Feld location
attendees TEXT Nein - Feld attendees
internal_attendees VARCHAR(255) Nein - Feld internal_attendees
sentiment VARCHAR(32) Ja * - Feld sentiment
discussed_topics TEXT Nein - Feld discussed_topics
summary TEXT Ja * - Feld summary
agreed_next_steps TEXT Nein - Feld agreed_next_steps
competitive_situation VARCHAR(255) Nein - Feld competitive_situation
budget_or_timeline_note VARCHAR(255) Nein - Feld budget_or_timeline_note
next_followup_at DATETIME Nein - Feld next_followup_at
followup_task_id UUID Nein FK ➔ tasks.id Feld followup_task_id
id UUID Nein PK Feld id
tenant_id UUID Ja * FK ➔ organizations.id Feld tenant_id
created_at DATETIME Ja * - Feld created_at
updated_at DATETIME Ja * - Feld updated_at
created_by UUID Nein - Feld created_by
updated_by UUID Nein - Feld updated_by
source_type VARCHAR(32) Nein - Feld source_type
source_id UUID Nein - Feld source_id
metadata JSONB Ja * - Feld metadata

🔌 Inledande punkter (UI & API)

Art Förberedelse Slutpunkt / väg Titel & Zweck Förmåga
⚡ REST API DELETE /api/v1/crm/reports/{report_id}
delete_report_route
Semantic binding: operator_surface; mutation=True
crm
⚡ REST API GET /api/v1/crm/activities
list_activities
Semantic binding: inventory_only; mutation=False
crm
⚡ REST API GET /api/v1/crm/customers/{customer_id}/overview
customer_overview
Semantic binding: inventory_only; mutation=False
crm
⚡ REST API GET /api/v1/crm/due
Först
Semantic binding: inventory_only; mutation=False
crm
⚡ REST API GET /api/v1/crm/leads
list_leads
Semantic binding: inventory_only; mutation=False
crm
⚡ REST API GET /api/v1/crm/next-actions
next_actions
Semantic binding: inventory_only; mutation=False
crm
⚡ REST API GET /api/v1/crm/opportunities
list_opportunities
Semantic binding: inventory_only; mutation=False
crm
⚡ REST API GET /api/v1/crm/opportunities/{opp_id}/flow
order_flow
Semantic binding: inventory_only; mutation=False
crm
⚡ REST API GET /api/v1/crm/reports
list_reports
Semantic binding: inventory_only; mutation=False
crm
⚡ REST API GET /api/v1/crm/reports/{report_id}
get_report_route
Semantic binding: inventory_only; mutation=False
crm
⚡ REST API GET /api/v1/crm/stages
list_stages
Semantic binding: inventory_only; mutation=False
crm
⚡ REST API GET /api/v1/crm/summary
Sammanfattning
Semantic binding: inventory_only; mutation=False
crm
⚡ REST API GET /crm
crm_dashboard_page
Semantic binding: inventory_only; mutation=False
crm
⚡ REST API GET /crm/customers/{customer_id}
crm_customer_page
Semantic binding: inventory_only; mutation=False
crm
⚡ REST API GET /crm/leads
crm_leads_page
Semantic binding: inventory_only; mutation=False
crm
⚡ REST API GET /crm/leads/new
crm_leads_new_page
Semantic binding: inventory_only; mutation=False
crm
⚡ REST API GET /crm/pipeline
crm_pipeline_page
Semantic binding: inventory_only; mutation=False
crm
⚡ REST API GET /crm/pipeline/new
crm_pipeline_new_page
Semantic binding: inventory_only; mutation=False
crm
⚡ REST API GET /crm/reports
crm_reports_page
Semantic binding: inventory_only; mutation=False
crm
⚡ REST API GET /crm/reports/new
crm_report_create_page
Semantic binding: inventory_only; mutation=False
crm
⚡ REST API GET /pub/anfrage/{tenant_id}
crm_inquiry_form
Semantic binding: inventory_only; mutation=False
crm
⚡ REST API GET /pub/lead/{tenant_id}
lead_form
Semantic binding: inventory_only; mutation=False
crm
⚡ REST API PATCH /api/v1/crm/leads/{lead_id}
patch_lead
Semantic binding: operator_surface; mutation=True
crm
⚡ REST API PATCH /api/v1/crm/opportunities/{opp_id}
patch_opportunity
Semantic binding: operator_surface; mutation=True
crm
⚡ REST API PATCH /api/v1/crm/reports/{report_id}
patch_report_route
Semantic binding: operator_surface; mutation=True
crm
⚡ REST API PATCH /api/v1/crm/stages/{stage_id}
patch_stage
Semantic binding: operator_surface; mutation=True
crm
⚡ REST API POST /api/v1/crm/activities
create_activity
Semantic binding: operator_surface; mutation=True
crm
⚡ REST API POST /api/v1/crm/activities/{activity_id}/complete
complete_activity
Semantic binding: operator_surface; mutation=True
crm
⚡ REST API POST /api/v1/crm/leads
create_lead
Semantic binding: operator_surface; mutation=True
crm
⚡ REST API POST /api/v1/crm/leads/{lead_id}/convert
convert_lead
Semantic binding: operator_surface; mutation=True
crm
⚡ REST API POST /api/v1/crm/leads/{lead_id}/convert-and-quote
convert_lead_and_quote
Semantic binding: operator_surface; mutation=True
crm
⚡ REST API POST /api/v1/crm/leads/{lead_id}/status
lead_status
Semantic binding: operator_surface; mutation=True
crm
⚡ REST API POST /api/v1/crm/mail
send_mail_route
Semantic binding: operator_surface; mutation=True
crm
⚡ REST API POST /api/v1/crm/opportunities
create_opportunity
Semantic binding: operator_surface; mutation=True
crm
⚡ REST API POST /api/v1/crm/opportunities/{opp_id}/create-quote
create_quote
Semantic binding: operator_surface; mutation=True
crm
⚡ REST API POST /api/v1/crm/opportunities/{opp_id}/draft-followup
draft_followup
Semantic binding: operator_surface; mutation=True
crm
⚡ REST API POST /api/v1/crm/opportunities/{opp_id}/lost
mark_lost
Semantic binding: operator_surface; mutation=True
crm
⚡ REST API POST /api/v1/crm/opportunities/{opp_id}/reopen
Återöppna
Semantic binding: operator_surface; mutation=True
crm
⚡ REST API POST /api/v1/crm/opportunities/{opp_id}/stage
move_stage
Semantic binding: operator_surface; mutation=True
crm
⚡ REST API POST /api/v1/crm/reports
create_report_route
Semantic binding: operator_surface; mutation=True
crm
⚡ REST API POST /api/v1/crm/stages
create_stage
Semantic binding: operator_surface; mutation=True
crm
⚡ REST API POST /pub/anfrage/{tenant_id}
crm_inquiry_submit
Semantic binding: operator_surface; mutation=True
crm
⚡ REST API POST /pub/lead/{tenant_id}
submit_lead
Semantic binding: operator_surface; mutation=True
crm

🛡️ Reglering och efterlevnad

Dieses Modul unterliegt folgenden gesetzlichen, regulatorischen und Revisionsstandards:

  • Artikel 6 i DSGVO (godkännande till kontakt)
  • UWG reklamgodkännande
Kopplade moduler:
➔ customers ➔ finance ➔ communications