The Interactions module is Corpen’s built-in CRM system for managing every touchpoint with cooperative members and clients. Agents log calls, emails, WhatsApp exchanges, and other contacts; set outcomes; schedule follow-ups; and track whether those follow-ups are completed on time. A rich reporting dashboard with PDF export and a team chat system are included in the same route group.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/corpentunida-org/corpen/llms.txt
Use this file to discover all available pages before exploring further.
Route Group
All routes in this module share the/interactions prefix and require the auth middleware. Named routes use the interactions. prefix (e.g. interactions.index).
Sub-resources
| Sub-resource | Route prefix | Controller | Purpose |
|---|---|---|---|
| Interaction records | /interactions | InteractionController | Main CRUD — one record per agent–client contact |
| Communication channels | /interactions/channels | IntChannelController | Phone, email, WhatsApp, etc. |
| Interaction types | /interactions/types | IntTypeController | Categorize the reason for contact |
| Outcomes / results | /interactions/outcomes | IntOutcomeController | Result catalog; estado=1 marks success |
| Next actions | /interactions/next_actions | IntNextActionController | Catalog of scheduled follow-up actions |
| Follow-ups | /interactions/seguimientos | IntSeguimientoController | Time-stamped follow-up records linked to an interaction |
| Workspaces | /interactions/workspaces | IntWorkspaceController | Team groupings tied to a gdo_area |
| Conversations | /interactions/conversations | IntConversationController | Chat threads (general, contextual, or private) |
| Chat interface | /interactions/chat | IntChatController | Three-column chat UI listing workspaces → conversations → messages |
Reports
| Route | Method | Description |
|---|---|---|
GET /interactions/report | InteractionController@report | Interactive HTML dashboard with KPI cards and charts |
GET /interactions/report/pdf | InteractionController@reportPdf | PDF audit report generated via barryvdh/laravel-dompdf |
AJAX helpers
| Route | Controller method | Purpose |
|---|---|---|
GET /interactions/search-clients?q= | searchClients | Select2 client autocomplete (paginates 50 results) |
GET /interactions/search-users?q= | searchUsers | Select2 agent autocomplete |
GET /interactions/cliente/{cod_ter} | getCliente | Full client profile + last 10 interactions |
GET /interactions/{interaction}/seguimientos | getSeguimientos | Fetch follow-up timeline for a modal |
Key Models and Relationships
Interaction (table: interactions)
id_linea_de_obligacion is cast to array, so multiple credit lines can be attached to a single interaction. agent_id is a foreign key to users.id.
IntSeguimiento (table: int_seguimiento)
attachment_urls is cast to array so multiple S3 paths can be stored per follow-up.
User relationships
Logging an Interaction with a Follow-up
Open the create form
Navigate to
GET /interactions/create. The form pre-fills the authenticated user’s area and cargo from the gdo_area and gdo_cargo tables.Search for a client
Start typing a member’s name or ID in the client field. An AJAX call hits
GET /interactions/search-clients?q={term} and returns paginated results from mae_terceros.Fill in interaction details
Required fields when submitting Optional caller identification fields (
POST /interactions:cedula_quien_llama, nombre_quien_llama, celular_quien_llama, parentesco_quien_llama) are used when a third party calls on behalf of the member.Schedule a follow-up
Add
next_action_date, next_action_type, and next_action_notes to the same form submission. A new IntSeguimiento record is automatically created during store() when any of these fields are present.View and update the interaction
Access
GET /interactions/{interaction}/show to see the full timeline of follow-ups, agent performance chart, and client history. Add new follow-ups directly from the show page via the POST /interactions/seguimientos/store endpoint.Interaction Index (Server-Side DataTable)
TheGET /interactions index serves a Blade view on normal requests and returns server-side JSON for DataTables AJAX calls. Agents without the interacciones.listado.todos permission see only their own interactions:
tab (all, success, pending, today, overdue), start_date, end_date, search[value].
Reports and PDF Export
TheGET /interactions/report page renders KPI cards (total, successful, pending, overdue) and six chart datasets — by channel, outcome, top agents, top clients, credit lines, and district. Supervisors with the interacciones.informes.todosagentes permission can filter by any agent; others are restricted to their own data.
GET /interactions/report/pdf route generates a complete audit PDF using barryvdh/laravel-dompdf and streams it directly to the browser.
Chat and Workspaces
TheGET /interactions/chat route (requires interacciones.chat.index permission) opens the three-column chat interface:
- Column 1 — Workspaces: Active workspaces from
int_workspaceswherestatus = 'active'. - Column 2 — Conversations: Conversations in the selected workspace, filtered by
workspace_id. - Column 3 — Messages: Full message thread with participant list and roles.
Creating a workspace
IntWorkspaceController@store validates that area_id exists in gdo_area and sets status = 'active' automatically.
Starting a private conversation
IntConversationController@iniciarChatPrivado looks for an existing type=private conversation between the two users before creating a new one, preventing duplicate DMs.
Creating a contextual room
Attachment Storage
Attachments uploaded during interaction creation or follow-up updates are stored in S3 under the pathcorpentunida/daytrack/{interaction_id}/. Files can be retrieved on demand via:
viewAttachment streams the raw file bytes with the correct Content-Type header. downloadAttachment triggers a browser download using Storage::disk('s3')->download().