Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement email tracking and reply functionality #142

Merged

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented Sep 29, 2024

This pull request was created by Sweep to resolve the following request by @curtisdelicata:

Original Request

Description:

Integrate email communication tracking to capture and log interactions directly within Liberu CRM, providing a comprehensive view of client communications.
Tasks:

Develop integration with email service providers or SMTP servers for message tracking.
Capture email metadata and content for storage and retrieval within CRM.
Test email tracking functionality across different email providers and use cases.
Acceptance Criteria:

Users can view and track email interactions within Liberu CRM, improving transparency and communication tracking.

Integrate Email Communication Tracking in Liberu CRM

Definition of Complete

  • Email communication tracking is fully integrated into Liberu CRM.
  • Users can view and track email interactions within the CRM interface.
  • Email metadata and content are captured and stored in the database.
  • The system works with multiple email service providers and SMTP servers.
  • Comprehensive tests cover the email tracking functio...

Continue chatting at https://sweep-chat-demo.vercel.app/c/a6a73ae7-61a2-425e-863c-484a0acf8b5c.

Purpose

This pull request adds the ability to track and manage email messages within the CRM application. It includes the following key features:

Description

  1. Email Tracking: The GmailService and MessageService classes have been updated to track incoming and outgoing email messages. When a message is retrieved or sent, the relevant details (sender, recipient, subject, content, timestamp, and sent/received status) are stored in the emails database table.

  2. Email Reply: The GmailService and MessageService classes now include functionality to create and send email replies. When a user replies to an email, the reply message is constructed and sent using the Gmail API, and the sent message is also tracked in the emails table.

  3. Unified Helpdesk View: The messages.blade.php view has been updated to display the tracked email messages alongside the existing WhatsApp and Facebook Messenger messages. This provides a unified view of all incoming and outgoing messages within the CRM application.

  4. Email Tracking Integration Test: A new EmailTrackingIntegrationTest has been added to ensure the email tracking and reply functionality work as expected.

  5. Email Tracking Unit Test: A new EmailTrackingTest has been added to test the trackEmail() method in the GmailService class.

Summary

The key changes in this pull request include:

  • app/Filament/App/Resources/ContactResource.php: Added Email model to the contact resource.
  • app/Models/Email.php: New model to represent email messages.
  • app/Services/GmailService.php: Added email tracking and reply functionality.
  • app/Services/MessageService.php: Added email tracking and reply functionality.
  • database/migrations/YYYY_MM_DD_HHMMSS_create_emails_table.php: New migration to create the emails table.
  • resources/views/helpdesk/messages.blade.php: Updated the helpdesk view to display tracked email messages.
  • tests/Feature/EmailTrackingIntegrationTest.php: New integration test for email tracking and reply.
  • tests/Unit/EmailTrackingTest.php: New unit test for the trackEmail() method in GmailService.

@curtisdelicata curtisdelicata merged commit 13c5628 into main Sep 29, 2024
1 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant