Skip to main content
The Sistema Magdaleno includes a complaint management system (Denuncias) that allows customers to submit complaints about products or promotions, and vendors to respond professionally. This guide covers the full complaint handling workflow.

Understanding Complaints

The system handles two types of complaints:
  • Product Complaints: Issues with products from the gallery (linked to galeria_id_galeria)
  • Promotion Complaints: Issues with promotional offers (linked to promocion_id_promo)
Each complaint includes:
  • Customer information (register_idregistro)
  • Store location (locale_id_local)
  • Date of complaint (fecha)
  • Complaint details (motivo)
  • Response status (status and resp)

Viewing Complaints

Access the complaints list at denuncias/index.
1

Navigate to Complaints

From the admin menu, go to Contactos > Reclamos (Contacts > Complaints).
Vendors only see complaints for their assigned store location. Administrators see all complaints.
2

Review Complaint List

The complaints table displays:
  • ID: Complaint identifier (id_denuncia)
  • Nombre y Apellido: Customer name from Register table
  • Fecha: Complaint submission date
  • Local: Store location name
  • Status: Response status
    • Green “Respondida”: Complaint has been answered (status = 1)
    • Red “Sin Leer”: Unread/unanswered (status = 0)
  • Eliminar: Delete option
  • Ver Comentario: View details
3

Filter View

The list automatically shows only unresponded complaints:
'conditions' => array(
    'Denuncia.locale_id_local' => $user,
    'Denuncia.resp =' => '0'
)

List Sorting

Complaints are ordered by date (newest first):
  • Click column headers to sort
  • Default order: fecha DESC
  • Pagination: 10 complaints per page

Processing a Complaint

Respond to customer complaints through denuncias/responder_denuncia/{id}.
1

Open Complaint Details

From the complaints list, click the view icon (ver_lupa.png) next to the complaint you want to address.
2

Review Customer Information

The complaint details page shows:
  • Customer gender icon (hombre.gif for male, mujer.gif for female)
  • Customer name (Register.nombreape)
  • Submission date
  • Original complaint message (Denuncia.motivo)
3

Understand the Context

The form includes hidden fields that track:
  • Related product or promotion ID
  • Store location ID
  • Original complaint ID (id_respuesta)
  • Your user ID (for response attribution)
4

Write Your Response

In the “Respuesta” (Response) textarea, compose a professional reply addressing the customer’s concerns.
Be courteous and specific. Acknowledge the issue and explain resolution steps clearly.
5

Submit Response

Click “Responder” (Respond) to save your reply.The system executes denuncias/registro_denuncia which:
  • Creates a new complaint record with your response
  • Marks original complaint as responded (status = 1)
  • Records current timestamp
  • Links response to original complaint
6

Confirm Success

Success message: “Los datos han sido guardados con exito” (Data has been saved successfully)You’re redirected to denuncias/index to continue processing other complaints.

Response Processing Details

When you submit a response, the system processes:
// Get response data
$usuario = $this->data['Denuncia']['usuario']; // Your user ID
$id_respuesta = $this->data['Denuncia']['id_respuesta']; // Original complaint ID

// Find customer from original complaint
$cliente = $this->Denuncia->find('all', array(
    'conditions' => array('id_denuncia' => $id_respuesta)
));
$id_cliente = $cliente[0]['Denuncia']['register_idregistro'];

// Get your name from user table
$vendedor = $this->User->find('all', array(
    'conditions' => array('id_usuario' => $usuario)
));
$nombre = $vendedor[0]['User']['perfil_usuario'];

// Create response record
$this->data['Denuncia']['nombre'] = $nombre;
$this->data['Denuncia']['resp'] = $usuario; // Links to responder
$this->data['Denuncia']['status'] = 0; // New response
$this->data['Denuncia']['register_idregistro'] = $id_cliente;

// Save and mark original as responded
if ($this->Denuncia->save($this->data)) {
    $this->Denuncia->updateAll(
        array('Denuncia.status' => '1'),
        array('Denuncia.id_denuncia' => $id_respuesta)
    );
}

Customer-Initiated Complaints

Customers can submit complaints through public forms.

Product Complaint Submission

Customers submit product complaints via denuncias/denunciar:
1

Customer Fills Form

The customer provides:
  • Name
  • Product or promotion being reported
  • Store location
  • Complaint details (motivo)
2

System Records Complaint

The system automatically:
  • Sets submission date: date('d-m-Y')
  • Links to customer account
  • Associates with store location
  • Sets initial status (unresponded)
3

Confirmation Display

Customer is redirected to denuncias/fin_denunciar showing submission confirmation.

Promotion Complaint Submission

Similar process for promotion complaints via denuncias/denunciar_promo:
  • Same workflow as product complaints
  • Links to promocion_id_promo instead of galeria_id_galeria
  • Redirects to same confirmation page

Deleting Complaints

Remove resolved or invalid complaints through denuncias/delete/{id}.
Deleting complaints removes all record of the interaction. Consider keeping complaints for quality tracking and analytics.
1

Locate Complaint

Find the complaint in the list view.
2

Click Delete Icon

Click the delete icon (delete.PNG) next to the complaint.
3

Confirm Deletion

A JavaScript confirmation asks: “Estas seguro de Eliminar?” (Are you sure you want to delete?)
4

Complete Removal

Confirm the action. The system executes:
$this->Denuncia->delete($id);
Success message: “El registro se ha eliminado con exito” (Record has been deleted successfully)

Complaint Status Workflow

Complaints flow through the following states:

Status Field Values

  • status = 0: Unread or new response
  • status = 1: Original complaint marked as responded
  • resp = 0: No response yet (initial complaint)
  • resp = user_id: Response provided by user with that ID

Best Practices for Complaint Handling

Response Time

Aim to respond to complaints within 24 hours. Quick responses improve customer satisfaction and trust.

Response Quality

DO:
  • Acknowledge the customer’s concern
  • Provide specific solutions or explanations
  • Include contact information for follow-up
  • Use professional, courteous language
  • Offer compensation when appropriate
DON’T:
  • Dismiss or minimize the complaint
  • Make promises you can’t keep
  • Use defensive or accusatory language
  • Ignore details from the original complaint
  • Respond generically without addressing specifics

Tracking and Analytics

Use complaint data to:
  • Identify problematic products
  • Track recurring issues by store location
  • Measure response times
  • Assess customer satisfaction trends
  • Train staff on common problems

Alternative Complaint View

Vendors can also access complaints through denuncias/responder_reclamo/{id} with a different layout:
1

Access Alternative View

Navigate to denuncias/responder_reclamo/{id} (uses ‘nuevo’ layout instead of ‘admin’).
2

View Filtered Complaints

This view filters by:
  • Store location (for vendors)
  • Specific complaint ID
3

Submit Response

Responses go through denuncias/registro_reclamo, which:
  • Redirects to ventas/misreclamos instead of denuncias/index
  • Uses same response logic as regular complaint processing

Complaint Detail View from Promotions

Customers viewing promotions can report issues via denuncias/detallemensajepromo:
1

Customer Clicks Report Link

From a promotion detail page, customer clicks to report an issue.
2

System Marks as Read

The system updates the complaint status:
$this->Denuncia->updateAll(
    array('Denuncia.status' => '1'),
    array('Denuncia.id_denuncia' => $id_page)
)
3

Redirect to Details

Customer is redirected to the promotion details page: pages/detallepublicidad/{fecha}/{url}

Troubleshooting

Response Not Saving

Problem: “No se pudo guardar su registro porfavor intente nuevamente” Solutions:
  • Verify response text is not empty
  • Check database connection
  • Ensure you have permission to respond
  • Verify the original complaint ID is valid
  • Check for validation errors in the model

Original Complaint Not Updating

Problem: Original complaint still shows as “Sin Leer” after responding Solutions:
  • Check that updateAll query executed successfully
  • Verify the complaint ID matches
  • Look for database transaction errors
  • Ensure no validation rules blocking the update

Wrong Complaints Showing

Problem: Seeing complaints for other stores Solutions:
  • Verify your locale_id_local is set correctly in session
  • Check the filtering conditions in the controller
  • Ensure you’re logged in with correct vendor account
  • For administrators, this is normal behavior (shows all)

Cannot View Complaint Details

Problem: Click on view icon does nothing or shows error Solutions:
  • Verify the complaint ID exists
  • Check you have permission to view complaints
  • Ensure the complaint is associated with your store (for vendors)
  • Look for JavaScript errors blocking navigation
The complaint system automatically filters data based on user role. Vendors only see complaints for their store location, while administrators have full access to all complaints across all locations.

Complaint Data Structure

The Denuncia table includes these key fields:
  • id_denuncia: Unique complaint identifier
  • nombre: Customer or responder name
  • motivo: Complaint text or response text
  • fecha: Submission/response date (d-m-Y format)
  • register_idregistro: Customer account ID
  • locale_id_local: Store location ID
  • galeria_id_galeria: Related product ID (if applicable)
  • promocion_id_promo: Related promotion ID (if applicable)
  • status: Read/response status (0 or 1)
  • resp: Responder user ID (0 if no response yet)
Track complaints over time to identify systemic issues. Products or stores with repeated complaints may need attention or process improvements.

Build docs developers (and LLMs) love