Table Name: tabCommunication
Sr | Fieldname | Type | Label | Options |
---|---|---|---|---|
1 | naming_series |
Select | Series |
COMM- |
2 | communication_medium |
Select | Communication Medium |
Chat Phone Email SMS Visit Other |
3 | recipients |
Data | Recipients | |
4 | cc |
Data | CC | |
5 | phone_no |
Data | Phone No. | |
6 | column_break_5 |
Column Break | ||
7 | status |
Select | Status |
Open Replied Closed Linked |
8 | sent_or_received |
Select | Sent or Received |
Sent Received |
9 | delivery_status |
Select |
Delivery Status
Integrations can use this field to set email delivery status |
Sent Bounced Opened Marked As Spam Rejected Delayed Soft-Bounced Clicked Recipient Unsubscribed |
10 | section_break_10 |
Section Break | ||
11 | subject |
Data | Subject | |
12 | section_break_8 |
Section Break | ||
13 | content |
Text Editor | Content | |
14 | additional_info |
Section Break | More Information | |
15 | sender |
Data | Sender | |
16 | sender_full_name |
Data | Sender Full Name | |
17 | communication_date |
Datetime | Date | |
18 | column_break_14 |
Column Break | ||
19 | reference_doctype |
Link | Reference DocType | DocType |
20 | reference_name |
Dynamic Link | Reference Name |
reference_doctype |
21 | in_reply_to |
Link | In Reply To | Communication |
22 | email_account |
Link | Email Account | Email Account |
23 | user |
Link | User | User |
24 | unread_notification_sent |
Check | Unread Notification Sent | |
25 | _user_tags |
Data | User Tags |
Inherits from frappe.model.document.Document
_notify (self, print_html=None, print_format=None, attachments=None, recipients=None, cc=None)
No docs
No docs
filter_email_list (self, email_list, exclude, is_cc=False)
No docs
No docs
get_attach_link (self, print_format)
Returns public link for the attachment via templates/emails/print_link.html
.
get_cc (self, recipients=None, fetched_from_email_account=False)
Build a list of email addresses for CC
No docs
Returns document of reference_doctype
, reference_doctype
get_recipients (self, fetched_from_email_account=False)
Build a list of email addresses for To
get_recipients_and_cc (self, recipients, cc, fetched_from_email_account=False)
No docs
notify (self, print_html=None, print_format=None, attachments=None, recipients=None, cc=None, fetched_from_email_account=False)
Calls a delayed celery task 'sendmail' that enqueus email in Bulk Email queue
Parameters:
print_html
- Send given value as HTML attachmentprint_format
- Attach print format of parent documentattachments
- A list of filenames that should be attached when sending this emailrecipients
- Email recipientscc
- Send email as CC tofetched_from_email_account
- True when pulling email, the notification shouldn't go to the main recipientUpdate parent status as Open
or Replied
.
prepare_to_notify (self, print_html=None, print_format=None, attachments=None)
Prepare to make multipart MIME Email
Parameters:
print_html
- Send given value as HTML attachment.print_format
- Attach print format of parent document.send (self, print_html=None, print_format=None, attachments=None, send_me_a_copy=False, recipients=None)
Send communication via Email.
Parameters:
print_html
- Send given value as HTML attachment.print_format
- Attach print format of parent document.set_incoming_outgoing_accounts (self)
No docs
Update status of parent document based on who is replying.
No docs
Public API
/api/method/frappe.core.doctype.communication.communication.make
frappe.core.doctype.communication.communication.make (doctype=None, name=None, content=None, subject=None, sent_or_received=Sent, sender=None, recipients=None, communication_medium=Email, send_email=False, print_html=None, print_format=None, attachments=[], ignore_doctype_permissions=False, send_me_a_copy=False, cc=None)
Make a new communication.
Parameters:
doctype
- Reference DocType.name
- Reference Document name.content
- Communication body.subject
- Communication subject.sent_or_received
- Sent or Received (default Sent).sender
- Communcation sender (default current user).recipients
- Communication recipients as list.communication_medium
- Medium of communication (default Email).send_mail
- Send via email (default False).print_html
- HTML Print format to be sent as attachment.print_format
- Print Format name of parent document to be sent as attachment.attachments
- List of attachments as list of files or JSON string.send_me_a_copy
- Send a copy to the sender (default False).frappe.core.doctype.communication.communication.on_doctype_update ()
Add index in tabCommunication
for (reference_doctype, reference_name)