Code Monkey home page Code Monkey logo

frappe_whatsapp's Introduction

Frappe Whatsapp

WhatsApp integration for frappe. Use directly meta API's without any 3rd party integration.

whatsapp

Note: If your not using live credential follow the step no 2 to add the number on meta to which your are sending message

Installation Steps

Step 1) One time to get app

bench get-app https://github.com/shridarpatil/frappe_whatsapp

Step 2) to install app on any instance/site

bench --site [sitename] install-app frappe_whatsapp

Send whatsapp notification from frappe app based on docevents.

Get your whats app credentials

https://developers.facebook.com/docs/whatsapp/cloud-api/get-started

Enter whatsapp credentials

image

Create Template

image

Supports all docevents

Create notifications

whatsapp_notification

Sending text message without creating template

Create an entry in the WhatsApp message. On save it will trigger and whats app API to send a message

image

WhatsApp messages are received via WhatsApp cloud API. image

outgoing (1)

Incomming message

  • Setup webhook on meta
    • Add verify token on meta and update the same on whatsapp settings
    • Add webhook url on meta <your domain>/api/method/frappe_whatsapp.utils.webhook.webhook
  • Add apropriate webhook fields
    • messages to receive message
    • add other required web fields

Incoming Message for WhatsApp Flows will look like this Screenshot 2024-03-07 at 10 56 27

License

MIT

frappe_whatsapp's People

Contributors

ashish-greycube avatar chechani avatar mohsinalimat avatar shariquerik avatar shridarpatil avatar vineyrawat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

frappe_whatsapp's Issues

Messages are not getting send

i have generated token temp setting looks something like below
image
Certainly, here's a rephrased version of your statement:

I'm attempting to send messages upon creating a record, and although the record is saved and the status changes to success, I'm not receiving any messages. Do you have any suspicions about potential issues or anything unusual in this scenario? How can I go about debugging this situation? The phone number has already been added. My ERPNext instance is version 13, set up as a multitenant DNS-based system with SSL.
image

uninstall failed

When trying to uninstall the app, following error occurs:

user@tech-hostname9315809:~/frappe-bench/apps/frappe_whatsapp$ bench --site erp.techgroup.com uninstall-app frappe_whatsapp
Uninstalling App frappe_whatsapp from Site erp.techgroup.com...
All doctypes (including custom), modules related to this app will be deleted. Are you sure you want to continue? [y/N]: y
Backing up...
Deleting Module 'Frappe Whatsapp'
* removing Module Def 'Frappe Whatsapp'...
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/user/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 114, in <module>
    main()
  File "/home/user/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 20, in main
    click.Group(commands=commands)(prog_name="bench")
  File "/home/user/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/home/user/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/user/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/user/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/user/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/user/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/user/frappe-bench/env/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/user/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 29, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/user/frappe-bench/apps/frappe/frappe/commands/site.py", line 969, in uninstall
    remove_app(app_name=app, dry_run=dry_run, yes=yes, no_backup=no_backup, force=force)
  File "/home/user/frappe-bench/apps/frappe/frappe/installer.py", line 396, in remove_app
    drop_doctypes = _delete_modules(modules, dry_run=dry_run)
  File "/home/user/frappe-bench/apps/frappe/frappe/installer.py", line 441, in _delete_modules
    frappe.delete_doc("Module Def", module_name, ignore_on_trash=True, force=True)
  File "/home/user/frappe-bench/apps/frappe/frappe/__init__.py", line 1345, in delete_doc
    return frappe.model.delete_doc.delete_doc(
  File "/home/user/frappe-bench/apps/frappe/frappe/model/delete_doc.py", line 135, in delete_doc
    doc.run_method("after_delete")
  File "/home/user/frappe-bench/apps/frappe/frappe/model/document.py", line 962, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/home/user/frappe-bench/apps/frappe/frappe/model/document.py", line 1322, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/user/frappe-bench/apps/frappe/frappe/model/document.py", line 1306, in runner
    add_to_return_value(self, f(self, method, *args, **kwargs))
  File "/home/user/frappe-bench/apps/frappe_whatsapp/frappe_whatsapp/utils/__init__.py", line 17, in run_server_script_for_doc_event
    notification = get_notifications_map().get(
  File "/home/user/frappe-bench/apps/frappe_whatsapp/frappe_whatsapp/utils/__init__.py", line 36, in get_notifications_map
    enabled_whatsapp_notifications = frappe.get_all(
  File "/home/user/frappe-bench/apps/frappe/frappe/__init__.py", line 2007, in get_all
    return get_list(doctype, *args, **kwargs)
  File "/home/user/frappe-bench/apps/frappe/frappe/__init__.py", line 1982, in get_list
    return frappe.model.db_query.DatabaseQuery(doctype).execute(*args, **kwargs)
  File "/home/user/frappe-bench/apps/frappe/frappe/model/db_query.py", line 185, in execute
    self.columns = self.get_table_columns()
  File "/home/user/frappe-bench/apps/frappe/frappe/model/db_query.py", line 546, in get_table_columns
    return get_table_columns(self.doctype)
  File "/home/user/frappe-bench/apps/frappe/frappe/model/meta.py", line 73, in get_table_columns
    return frappe.db.get_table_columns(doctype)
  File "/home/user/frappe-bench/apps/frappe/frappe/database/database.py", line 1197, in get_table_columns
    raise self.TableMissingError("DocType", doctype)
pymysql.err.ProgrammingError: ('DocType', 'WhatsApp Notification')

Installed apps:

{
"crm": "2.0.0-dev",
"erpnext": "15.20.6",
"frappe": "15.23.0",
"frappe_whatsapp": "0.0.2",
"insights": "1.1.3",
"wiki": "2.0.0"
}

Unable to send WhatsApp message from ERPNext

I did the following things to setup this custom app, but some setting is not right & i am unable to send message like its shown in installation guide of this page.

  1. Created App in Meta website
  2. Added a real number on whatsapp business.
  3. Sent test message from Meta website.
  4. On ERPNext ... Entered values in Whatsapp Setting Page.
  5. Created whatsapp template in ERPNext & saved. It successfully got saved on whatsapp website too. (Although got Rejected after sometime)
  6. Then tried sending message from ERPNext, as shown in this app's installation page but getting the following error ....

image

Is it something related to webhook setting or something else ?

I am not an expert so please guide with simple steps

Whatsapp integration issue

Hello Shridarpatil,

I have just implemented, frappe WhatsApp.
MY ERPNext is self-hosting, V14.

i am getting the below error while saving template and template is by default of Facebook

image

Configuration

image

Workflow state error

When i create notification for workflow submitted state its gonna error

Output

AttributeError: 'NoneType' object has no attribute 'json'
Possible source of error: frappe_whatsapp (app

notification not working

after doing the same setting notification is not triggering.. template is also approved from meta.

ERP Version: v14

suggest if there is something change

image

Issue with WhatsApp Integration

Hello Shridarpatil,

I have just implemented, frappe WhatsApp.
MY ERPNext is self hosting, V14.

I was able to integrate with Whatsapp, Settings seem to be fine, I even created template and it got approved on Meta.

However I am unable to send messages, WhatsApp notification list is also created.

One issue I am facing is that I am unable to send manual message.

Couple of screenshots for your reference.

Your support will be highly appreciated

Screenshot 2023-03-30 at 1 17 49 PM

Screenshot 2023-03-30 at 1 18 03 PM

Sent messages in Whatsapp Message Log list

I am trying to add 'Send Whatsapp message' option/button to sales invoice, payment receipt and others to send that doc pdf as a service message. My code is able to send pdf but it is not showing or getting into the Whatsapp Message log. Please help me to get the sent message in the log. Here's my code.

import json
import frappe
from frappe.integrations.utils import make_post_request
from frappe import _
from frappe.utils import get_url

def get_settings() -> dict:
    """Get WhatsApp settings"""
    settings = frappe.get_doc("WhatsApp Settings", "WhatsApp Settings")
    return settings

def generate_payload(recipient: str, doctype: str, docname: str, print_format: str) -> str:
    """Generate WhatsApp message payload"""
    link = get_pdf_link(doctype, docname, print_format)
    payload = json.dumps({
        "messaging_product": "whatsapp",
        "recipient_type": "individual",
        "to": recipient,
        "type": "document",
        "document": {
            "link": link,
            "caption": docname
        }
    })
    return payload

def make_request(settings: dict, payload: str) -> dict:
    """Make POST request to WhatsApp API"""
    headers = {
        "authorization": f"Bearer {settings.get_password('token')}",
        "content-type": "application/json",
    }
    response = make_post_request(
        f"{settings.url}/{settings.version}/{settings.phone_id}/messages",
        headers=headers,
        data=payload,
    )
    return response

def log_message(response: dict, recipient: str, doctype: str, docname: str) -> None:
    """Log WhatsApp message"""
    message_id = response["messages"][0]["id"]
    frappe.get_doc({
        "doctype": "WhatsApp Message",
        "type": "Outgoing",
        "message": str(response),
        "to": recipient,
        "message_type": "Manual",
        "message_id": message_id,
        "content_type": "document"
    }).save(ignore_permissions=True)

def handle_error(error: Exception) -> None:
    """Handle error and log notification"""
    response = frappe.flags.integration_request.json()['error']
    error_message = response.get('Error', response.get("message"))
    frappe.msgprint(
        f"Failed to trigger whatsapp message: {error_message}",
        indicator="red",
        alert=True
    )

@frappe.whitelist()
def send_whatsapp_message(recipient: str, doctype: str, docname: str, print_format: str) -> dict:
    """Send WhatsApp message"""
    settings = get_settings()
    payload = generate_payload(recipient, doctype, docname, print_format)
    try:
        response = make_request(settings, payload)
        log_message(response, recipient, doctype, docname)
        return response
    except Exception as e:
        handle_error(e)

@frappe.whitelist()
def get_pdf_link(doctype: str, docname: str, print_format: str) -> str:
    """
    Generate a PDF link for a document.

    :param doctype: The document type (e.g., "Sales Invoice")
    :param docname: The document name (e.g., "SINV-001")
    :param print_format: The print format (e.g., "Standard")
    :return: The PDF link as a string
    """
    doc = frappe.get_doc(doctype, docname)
    if not doc:
        frappe.throw(_("Document not found: {doctype} - {docname}").format(doctype=doctype, docname=docname))

    print_settings = frappe.get_doc("Print Format", print_format)
    if not print_settings:
        frappe.throw(_("Print format not found: {print_format}").format(print_format=print_format))

    pdf_link = "/api/method/frappe.utils.print_format.download_pdf?"
    pdf_link += "doctype={doctype}&name={docname}&format={print_format}&no_letterhead=0".format(
        doctype=doctype, docname=docname, print_format=print_format
    )

    key = doc.get_document_share_key()
    pdf_link += "&key={key}".format(key=key)

    return get_url(pdf_link)

Field name mobile_no does not exists

Hi Dear,

I install this version, but I put the field to conect the numer, the app say this field dont exist.
Do any have any idea about this error?

image

system information
image

How to use Existing templates from Meta account

How can I use already created templates from Meta account, while creating WhatsApp templates.
Currently we need to create a new template.

Let me know if there is any method to use the existing templates

language code is coming as null.

Traceback with variables (most recent call last):
  File "apps/frappe/frappe/integrations/utils.py", line 21, in make_request
    frappe.flags.integration_request.raise_for_status()
      method = 'POST'
      url = 'https://graph.facebook.com/v16.0/108142048963233/messages'
      auth = ''
      headers = {'authorization': 'Bearer @@@@@@@@@@@@', 'content-type': 'application/json'}
      data = '{"messaging_product": "whatsapp", "to": "91@@@@@@", "type": "template", "template": {"name": "Testt", 
      "language": {"code": null},
      "components": [{"type": "body", "parameters": [{"type": "text", "text": "Helllooo"}]}]}}'
      s = <requests.sessions.Session object at 0x7fec0833c4c0>
      exc = HTTPError('400 Client Error: Bad Request for url: https://graph.facebook.com/v16.0/108142048963233/messages')
  File "env/lib/python3.10/site-packages/requests/models.py", line 960, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
      self = <Response [400]>
      http_error_msg = '400 Client Error: Bad Request for url: https://graph.facebook.com/v16.0/108142048963233/messages'
      reason = 'Bad Request'
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://graph.facebook.com/v16.0/108142048963233/messages

Which can be fixed by customizing the doc. Currently, i got around by doing the follows:
image

just add this "language.language_code" in fetch from
image

No massage was sent

Try to test your app, but no massage sent
My developer account test not production

Frappe CRM Module not getting replied Whatsapp messages under Whatsapp Tab under individual leads

image
image
image

It seems like the replied message is not tagged to the conversation that was initiated. Not sure what is the issue, but the webhook setup has already been done, as shown in the WhatsApp messages docType, where the message that was replied was successfully received as an incoming message. However, in the CRM section, I'm unable to see the incoming message under that respective lead.

@shridarpatil Do you know if this is something you are still working on, or is this a bug?

Error when sending a message with type Document

Tried with .pdf and .docx files.

Text and images worked fine.

App Versions

{
	"chat": "0.0.1",
	"erpnext": "14.44.0",
	"frappe": "14.52.0",
	"frappe_whatsapp": "0.0.2",
	"hrms": "14.13.1",
	"insights": "1.1.3",
	"payments": "0.0.1",
}

Route

Form/WhatsApp Message/new-whatsapp-message-5

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 95, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 54, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 47, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1622, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/client.py", line 229, in save
    doc.save()
  File "apps/frappe/frappe/model/document.py", line 307, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 329, in _save
    return self.insert()
  File "apps/frappe/frappe/model/document.py", line 255, in insert
    self.run_method("before_insert")
  File "apps/frappe/frappe/model/document.py", line 917, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1279, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1261, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 914, in fn
    return method_object(*args, **kwargs)
  File "apps/frappe_whatsapp/frappe_whatsapp/frappe_whatsapp/doctype/whatsapp_message/whatsapp_message.py", line 22, in before_insert
    "to": self.format_number(self.to),
  File "apps/frappe_whatsapp/frappe_whatsapp/frappe_whatsapp/doctype/whatsapp_message/whatsapp_message.py", line 82, in format_number
    if number.startswith("+"):
AttributeError: 'NoneType' object has no attribute 'startswith'

Request Data

{
	"type": "POST",
	"args": {
		"doc": "{\"docstatus\":0,\"doctype\":\"WhatsApp Message\",\"name\":\"new-whatsapp-message-5\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"Administrator\",\"type\":\"Outgoing\",\"message_type\":\"Manual\",\"content_type\":\"document\",\"__run_link_triggers\":1,\"attach\":\"/private/files/sample.docx\"}"
	},
	"freeze": true,
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/frappe.client.save"
}

Response Data

{
	"exception": "AttributeError: 'NoneType' object has no attribute 'startswith'"
}

Multilingual templates do not appear when we import templates from Meta

I fetched WhatsApp templates from Meta, but only one template was fetched for those with multiple languages. This is because ERPNext does not accept duplicate template names. Therefore, it is necessary to consider the language when fetchin templates.

the templates in meta
Screenshot (557)

the temp in erpnext

Screenshot (558)

Upon comparison, we will also find that there is a template that was created in ERPNext (zahed) and there are many notes on this template:

1- This template was created in erpnext and approved by Meta, but it is still pending in ERP Next.

Screenshot (559)1

2- This template was deleted from the ERP Next screen and was actually deleted from Meta, but it was not deleted in ERP Next.
Screenshot (559)12

3- I made several attempts to delete it from the list, but to no avail.

Screenshot (560)

Getting error during execution

This error appears when I try to save a form in another doctype.

App Versions

{
	"crm": "2.0.0-dev",
	"erpnext": "15.20.6",
	"frappe": "15.23.0",
	"frappe_whatsapp": "0.0.2",
	"insights": "1.1.3",
	"wiki": "2.0.0"
}

Route

Form/Design/new-design-ejcbheawrt

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 110, in application
    response = frappe.api.handle(request)
  File "apps/frappe/frappe/api/__init__.py", line 49, in handle
    data = endpoint(**arguments)
  File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 49, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1718, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "apps/frappe/frappe/desk/form/save.py", line 39, in savedocs
    doc.save()
  File "apps/frappe/frappe/model/document.py", line 337, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 359, in _save
    return self.insert()
  File "apps/frappe/frappe/model/document.py", line 285, in insert
    self.run_method("before_insert")
  File "apps/frappe/frappe/model/document.py", line 962, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1322, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1306, in runner
    add_to_return_value(self, f(self, method, *args, **kwargs))
  File "apps/frappe_whatsapp/frappe_whatsapp/utils/__init__.py", line 17, in run_server_script_for_doc_event
    notification = get_notifications_map().get(
  File "apps/frappe_whatsapp/frappe_whatsapp/utils/__init__.py", line 36, in get_notifications_map
    enabled_whatsapp_notifications = frappe.get_all(
  File "apps/frappe/frappe/__init__.py", line 2007, in get_all
    return get_list(doctype, *args, **kwargs)
  File "apps/frappe/frappe/__init__.py", line 1982, in get_list
    return frappe.model.db_query.DatabaseQuery(doctype).execute(*args, **kwargs)
  File "apps/frappe/frappe/model/db_query.py", line 185, in execute
    self.columns = self.get_table_columns()
  File "apps/frappe/frappe/model/db_query.py", line 546, in get_table_columns
    return get_table_columns(self.doctype)
  File "apps/frappe/frappe/model/meta.py", line 73, in get_table_columns
    return frappe.db.get_table_columns(doctype)
  File "apps/frappe/frappe/database/database.py", line 1197, in get_table_columns
    raise self.TableMissingError("DocType", doctype)
pymysql.err.ProgrammingError: ('DocType', 'WhatsApp Notification')

Request Data

{
	"type": "POST",
	"args": {
		"doc": "{\"docstatus\":0,\"doctype\":\"Design\",\"name\":\"new-design-ejcbheawrt\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"Administrator\",\"naming_series\":\"DE-.YY.###\",\"design_for\":\"Customer\",\"title\":\"safasfsadsad\"}",
		"action": "Save"
	},
	"btn": {
		"jQuery37006038109508222111": {
			"events": {
				"click": [
					{
						"type": "click",
						"origType": "click",
						"guid": 652,
						"namespace": ""
					}
				]
			}
		}
	},
	"freeze": true,
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/frappe.desk.form.save.savedocs",
	"request_id": null
}

Response Data

{
	"exception": "pymysql.err.ProgrammingError: ('DocType', 'WhatsApp Notification')",
	"exc_type": "ProgrammingError",
	"_exc_source": "frappe_whatsapp (app)"
}

Push App to Frappe as Module

Good day,

This is a great app but I was thinking we push it to Frappe Core as a module. As WhatsApp is used worldwide, it can be just like the Message Module. Am just suggesting.

Thank you

Does this not work anymore?

I get the following message once I installed this app on frappecloud and navigate to WhatsApp settings using awesome bar.

“Sorry! I could not find what you were looking for.”

ModuleNotFoundError: No module named 'frappe_whatsapp'

Hi there,
I was trying to install it with docker and managed to install it by using the given commands and could see it installed after using the following command
bench --site site_name list-apps

Somehow my site is not loading up anymore. Restating the container gives the following error
ModuleNotFoundError: No module named 'frappe_whatsapp'

Am I missing any steps?

Thanks for the help

message sent, but errors in doctype document

When attempting to save, message is correctly sent, but I get this error:

image

Error: Value missing for WhatsApp Message: Content Type

KeyError: 'error'
Possible source of error: frappe_whatsapp (app)

App Versions

{
	"custom_doctypes": "0.0.1",
	"erpnext": "15.23.3",
	"exchangedata": "0.0.1",
	"frappe": "15.27.0",
	"frappe_whatsapp": "0.0.2",
	"healthcare": "14.0.3",
	"hrms": "15.21.0",
	"leave_app": "0.0.1",
	"payments": "0.0.1"
}

Route

Form/Leave Application/new-leave-application-urqmygeihu

Traceback

Traceback (most recent call last):
  File "apps/frappe_whatsapp/frappe_whatsapp/frappe_whatsapp/doctype/whatsapp_notification/whatsapp_notification.py", line 189, in notify
    frappe.get_doc({
  File "apps/frappe/frappe/model/document.py", line 337, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 359, in _save
    return self.insert()
  File "apps/frappe/frappe/model/document.py", line 292, in insert
    self._validate()
  File "apps/frappe/frappe/model/document.py", line 574, in _validate
    self._validate_mandatory()
  File "apps/frappe/frappe/model/document.py", line 911, in _validate_mandatory
    raise frappe.MandatoryError(
frappe.exceptions.MandatoryError: [WhatsApp Message, 8dclqi0ppk]: content_type

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 110, in application
    response = frappe.api.handle(request)
  File "apps/frappe/frappe/api/__init__.py", line 49, in handle
    data = endpoint(**arguments)
  File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 49, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1768, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "apps/frappe/frappe/desk/form/save.py", line 39, in savedocs
    doc.save()
  File "apps/frappe/frappe/model/document.py", line 337, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 359, in _save
    return self.insert()
  File "apps/frappe/frappe/model/document.py", line 315, in insert
    self.run_post_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1128, in run_post_save_methods
    self.run_method("on_update")
  File "apps/frappe/frappe/model/document.py", line 962, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1322, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1306, in runner
    add_to_return_value(self, f(self, method, *args, **kwargs))
  File "apps/frappe_whatsapp/frappe_whatsapp/utils/__init__.py", line 27, in run_server_script_for_doc_event
    ).send_template_message(doc)
  File "apps/frappe_whatsapp/frappe_whatsapp/frappe_whatsapp/doctype/whatsapp_notification/whatsapp_notification.py", line 170, in send_template_message
    self.notify(data)
  File "apps/frappe_whatsapp/frappe_whatsapp/frappe_whatsapp/doctype/whatsapp_notification/whatsapp_notification.py", line 202, in notify
    response = frappe.flags.integration_request.json()['error']
KeyError: 'error'

Request Data

{
	"type": "POST",
	"args": {
		"doc": "{\"docstatus\":0,\"doctype\":\"Leave Application\",\"name\":\"new-leave-application-urqmygeihu\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"[email protected]\",\"naming_series\":\"LIC-.\",\"fecha_crea\":\"2024-06-08\",\"tipo_lic\":\"\",\"company\":\"samp\",\"half_day\":0,\"custom_hours\":0,\"hora_inic_sol\":\"00:00\",\"hora_fin_sol\":\"00:00\",\"hora_inic\":\"00:00\",\"hora_fin\":\"00:00\",\"hora_cita\":\"00:00\",\"doc_sol\":\"\",\"const\":\"\",\"follow_via_email\":1,\"posting_date\":\"2024-06-08\",\"status\":\"Open\",\"letter_head\":\"Membrete Samp\",\"leave_type\":\"Vacaciones\",\"employee\":\"CUE-10022\",\"leave_approver\":\"[email protected]\",\"leave_approver_name\":\"You\",\"employee_name\":\"Samp samp samp samp\",\"custom_col_dpi\":null,\"custom_empjoining\":\"2014-08-15\",\"custom_emp_branch\":\"Oficina\",\"department\":\"Administracion - Lans\",\"custom_col_phone\":\"+50256942010\",\"fecha_alta_vac\":\"2014-08-15\",\"from_date\":\"2024-06-10\",\"half_day_date\":\"\",\"to_date\":\"2024-06-11\",\"total_leave_days\":2,\"leave_balance\":48.618,\"fecha_reg_lab\":\"2024-06-12\"}",
		"action": "Save"
	},
	"btn": {
		"jQuery370028253802060637281": {
			"events": {
				"click": [
					{
						"type": "click",
						"origType": "click",
						"guid": 878,
						"namespace": ""
					}
				]
			}
		}
	},
	"freeze": true,
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/frappe.desk.form.save.savedocs",
	"request_id": null
}

Response Data

{
	"exception": "KeyError: 'error'",
	"exc_type": "KeyError",
	"_exc_source": "frappe_whatsapp (app)",
	"_server_messages": "[\"{\\\"message\\\": \\\"Email sent to [email protected]\\\", \\\"title\\\": \\\"Message\\\"}\", \"{\\\"message\\\": \\\"Error: Value missing for WhatsApp Message: Content Type\\\", \\\"title\\\": \\\"Message\\\"}\"]"
}

I've noticed this error appears to remain in cache, even after modifying the document to no longer send email to [email protected], the error retains that error message.

This was on a template with no variables.

On another template with variables, if I attempted to use dates, the message would not be sent. If variables are changed to text, then it gets sent, but still shows the error message.

Please help.

The Reference Document Type doesn't accept Customize Form.

I installed Healthcare app, and by default it doesn't have any phone number field on the Patient Appointment DocType, so I created a Custom Form but on the Whatsapp Notification Reference Document Type Field it only accepts the Original DocType. At the moment I have found that is possible to fix this adding a Client Script but I think it is possible to implement this option by default.
image
image
image

send notification with variables on after submit fails

Hi,

  • Send notification without variables on doctype event After Save, works
  • Send notification without variables on doctype event After Submit, works
  • Send notification with variables on doctype event After Save, works
  • Send notification with variables on doctype event After Submit, fails

Please help

App Versions

{
	"custom_doctypes": "0.0.1",
	"erpnext": "15.23.3",
	"exchangedata": "0.0.1",
	"frappe": "15.27.0",
	"frappe_whatsapp": "v1.0.7",
	"healthcare": "14.0.3",
	"hrms": "15.21.0",
	"leave_app": "0.0.1",
	"payments": "0.0.1"
}

Route

Form/Leave Application/LIC-10937

Traceback

Traceback (most recent call last):
  File "apps/frappe_whatsapp/frappe_whatsapp/frappe_whatsapp/doctype/whatsapp_notification/whatsapp_notification.py", line 186, in notify
    headers=headers, data=json.dumps(data)
  File "/usr/lib/python3.10/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "/usr/lib/python3.10/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python3.10/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/usr/lib/python3.10/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type date is not JSON serializable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "apps/frappe_whatsapp/frappe_whatsapp/frappe_whatsapp/doctype/whatsapp_notification/whatsapp_notification.py", line 205, in notify
    response = frappe.flags.integration_request.json()['error']
AttributeError: 'NoneType' object has no attribute 'json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 110, in application
    response = frappe.api.handle(request)
  File "apps/frappe/frappe/api/__init__.py", line 49, in handle
    data = endpoint(**arguments)
  File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 49, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1768, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "apps/frappe/frappe/desk/form/save.py", line 37, in savedocs
    doc.submit()
  File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1048, in submit
    return self._submit()
  File "apps/frappe/frappe/model/document.py", line 1031, in _submit
    return self.save()
  File "apps/frappe/frappe/model/document.py", line 337, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 390, in _save
    self.run_post_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1131, in run_post_save_methods
    self.run_method("on_submit")
  File "apps/frappe/frappe/model/document.py", line 962, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1322, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1306, in runner
    add_to_return_value(self, f(self, method, *args, **kwargs))
  File "apps/frappe_whatsapp/frappe_whatsapp/utils/__init__.py", line 27, in run_server_script_for_doc_event
    ).send_template_message(doc)
  File "apps/frappe_whatsapp/frappe_whatsapp/frappe_whatsapp/doctype/whatsapp_notification/whatsapp_notification.py", line 170, in send_template_message
    self.notify(data)
  File "apps/frappe_whatsapp/frappe_whatsapp/frappe_whatsapp/doctype/whatsapp_notification/whatsapp_notification.py", line 216, in notify
    "meta_data": frappe.flags.integration_request.json()
AttributeError: 'NoneType' object has no attribute 'json'

Request Data

{
	"type": "POST",
	"args": {
		"doc": "{\"name\":\"LIC-10937\",\"owner\":\"[email protected]\",\"creation\":\"2024-06-12 11:02:36.511016\",\"modified\":\"2024-06-12 13:50:48.001979\",\"modified_by\":\"[email protected]\",\"docstatus\":0,\"idx\":0,\"naming_series\":\"LIC-.\",\"employee\":\"CUE-10379\",\"employee_name\":\"Name Name\",\"custom_col_dpi\":\"246630101\",\"fecha_crea\":\"2024-06-12\",\"tipo_lic\":\"\",\"leave_type\":\"Vacaciones\",\"custom_empjoining\":\"2023-05-19\",\"custom_emp_branch\":\"Planta\",\"company\":\"SAMP\",\"department\":\"Pintura Máquina - L\",\"custom_col_phone\":\"47573540\",\"from_date\":\"2024-06-13\",\"to_date\":\"2024-06-27\",\"half_day\":0,\"custom_hours\":0,\"total_leave_days\":13,\"fecha_alta_vac\":\"2023-05-19\",\"inic_per_vac\":\"2023-05-19\",\"fin_per_vac\":\"2024-05-18\",\"fecha_reg_lab\":\"2024-06-28\",\"hora_inic_sol\":\"0:00:00\",\"hora_fin_sol\":\"0:00:00\",\"hora_inic\":\"0:00:00\",\"hora_fin\":\"0:00:00\",\"hora_cita\":\"0:00:00\",\"description\":\"Vacaciones programadas por aniversario laboral\",\"doc_sol\":\"No Aplica\",\"const\":\"No Aplica\",\"leave_balance\":15,\"leave_approver\":\"[email protected]\",\"leave_approver_name\":\"[email protected]\",\"follow_via_email\":1,\"posting_date\":\"2024-06-12\",\"status\":\"Approved\",\"proc_conta\":0,\"letter_head\":\"Membrete LANS\",\"doctype\":\"Leave Application\",\"half_day_date\":\"\"}",
		"action": "Submit"
	},
	"btn": {
		"jQuery3700086204198274978161": {
			"events": {
				"click": [
					{
						"type": "click",
						"origType": "click",
						"guid": 4620,
						"namespace": ""
					}
				]
			}
		}
	},
	"freeze": true,
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/frappe.desk.form.save.savedocs",
	"request_id": null
}

Response Data

{
	"exception": "AttributeError: 'NoneType' object has no attribute 'json'",
	"exc_type": "AttributeError",
	"_exc_source": "frappe_whatsapp (app)"
}

Header Type Image missing

I have created a template in Meta with Image as Header and added a sampl Image.

When I Fetch templates from Meta. the Header is not set as Image.

But if I set header as Document its working and header is set as Documents

Not able to send message from frappe_whatsapp

Screenshot from 2024-06-14 13-02-59

As per picture I am facing same issue, and here is console log.

Traceback (most recent call last):
File "apps/frappe_whatsapp/frappe_whatsapp/frappe_whatsapp/doctype/whatsapp_message/whatsapp_message.py", line 121, in notify
response = make_post_request(
File "apps/frappe/frappe/integrations/utils.py", line 43, in make_post_request
return make_request("POST", url, **kwargs)
File "apps/frappe/frappe/integrations/utils.py", line 35, in make_request
raise exc
File "apps/frappe/frappe/integrations/utils.py", line 22, in make_request
response.raise_for_status()
File "env/lib/python3.10/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://graph.facebook.com/v20.0/284634341409544/messages
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "apps/frappe_whatsapp/frappe_whatsapp/frappe_whatsapp/doctype/whatsapp_message/whatsapp_message.py", line 44, in before_insert
self.notify(data)
File "apps/frappe_whatsapp/frappe_whatsapp/frappe_whatsapp/doctype/whatsapp_message/whatsapp_message.py", line 139, in notify
frappe.throw(msg=error_message, title=res.get("error_user_title", "Error"))
File "apps/frappe/frappe/init.py", line 645, in throw
msgprint(
File "apps/frappe/frappe/init.py", line 610, in msgprint
_raise_exception()
File "apps/frappe/frappe/init.py", line 561, in _raise_exception
raise exc
frappe.exceptions.ValidationError: (#131030) Recipient phone number not in allowed list
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 114, in application
response = frappe.api.handle(request)
File "apps/frappe/frappe/api/init.py", line 49, in handle
data = endpoint(**arguments)
File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
return frappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 49, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/init.py", line 1768, in call
return fn(*args, **newargs)
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
File "apps/frappe/frappe/desk/form/save.py", line 39, in savedocs
doc.save()
File "apps/frappe/frappe/model/document.py", line 337, in save
return self._save(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 359, in _save
return self.insert()
File "apps/frappe/frappe/model/document.py", line 285, in insert
self.run_method("before_insert")
File "apps/frappe/frappe/model/document.py", line 962, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1322, in composer
return composed(self, method, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1304, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "apps/frappe/frappe/model/document.py", line 959, in fn
return method_object(*args, **kwargs)
File "apps/frappe_whatsapp/frappe_whatsapp/frappe_whatsapp/doctype/whatsapp_message/whatsapp_message.py", line 48, in before_insert
frappe.throw(f"Failed to send message {str(e)}")
File "apps/frappe/frappe/init.py", line 645, in throw
msgprint(
File "apps/frappe/frappe/init.py", line 610, in msgprint
_raise_exception()
File "apps/frappe/frappe/init.py", line 561, in _raise_exception
raise exc
frappe.exceptions.ValidationError: Failed to send message (#131030) Recipient phone number not in allowed list

Error when sending a message with type Document (Doctype event = After Submit)

I have set up WhatsApp notification as a Doctype event After Submit for stock entry. now when I create and submit a new document, I get a popup message with the text "Error: Value missing for WhatsApp Message: Content Type".

Note: The message is successfully delivering

Traceback (most recent call last):
File "apps/frappe_whatsapp/frappe_whatsapp/frappe_whatsapp/doctype/whatsapp_notification/whatsapp_notification.py", line 165, in notify
frappe.get_doc({
File "apps/frappe/frappe/model/document.py", line 309, in save
return self._save(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 331, in _save
return self.insert()
File "apps/frappe/frappe/model/document.py", line 263, in insert
self._validate()
File "apps/frappe/frappe/model/document.py", line 533, in _validate
self._validate_mandatory()
File "apps/frappe/frappe/model/document.py", line 868, in _validate_mandatory
raise frappe.MandatoryError(
frappe.exceptions.MandatoryError: [WhatsApp Message, 1243ff0196]: content_type

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 95, in application
response = frappe.api.handle()
File "apps/frappe/frappe/api.py", line 54, in handle
return frappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 47, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/init.py", line 1622, in call
return fn(*args, **newargs)
File "apps/frappe/frappe/desk/form/save.py", line 31, in savedocs
doc.save()
File "apps/frappe/frappe/model/document.py", line 309, in save
return self._save(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 360, in _save
self.run_post_save_methods()
File "apps/frappe/frappe/model/document.py", line 1095, in run_post_save_methods
self.run_method("on_submit")
File "apps/frappe/frappe/model/document.py", line 919, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1281, in composer
return composed(self, method, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1265, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
File "apps/frappe_whatsapp/frappe_whatsapp/utils/init.py", line 27, in run_server_script_for_doc_event
).send_template_message(doc)
File "apps/frappe_whatsapp/frappe_whatsapp/frappe_whatsapp/doctype/whatsapp_notification/whatsapp_notification.py", line 146, in send_template_message
self.notify(data)
File "apps/frappe_whatsapp/frappe_whatsapp/frappe_whatsapp/doctype/whatsapp_notification/whatsapp_notification.py", line 177, in notify
response = frappe.flags.integration_request.json()['error']
KeyError: 'error'

Created Whatsapp template not working in Whatsapp Notification

I have created template in meta for sending Payment receipts, So I have added PDF document as attachment in meta account.

Also the template is approved and its shown in Whatsapp templates in Frappe.

But while saving the Whatsapp Notifications, I am getting following error.

Someone please on this.
Screenshot (37)

Wrong version pulled

bench get-app https://github.com/shridarpatil/frappe_whatsapp pulls version 0.0.2 but I believe v1.0.3 is also released!

Issue with Template Status

Hi,

I had created a notification template, I checked on facebook it has been approved and is now Active as well, but on ERPNext it keeps showing as pending
image

Result of this, when I try to send any notification I receive the following message
image

Kindly need your assistance

Approved template
image

unable to send direct text message

whatsapp setting is correct but unable to send whatsapp text direct message.
message save succesfully but message not received.
i sent the message with country code with mobile.

Failed to trigger whatsapp message: (#100) Invalid parameter

From Today, It is failed to trigger whatsapp message for me

Here is Whatsapp notification log.
{
"error": {
"code": 100,
"error_data": {
"details": "Parameter 'text' is mandatory for component parameter type 'text'",
"messaging_product": "whatsapp"
},
"fbtrace_id": "AauRgAP8m_ImekhgAZPeC7d",
"message": "(#100) Invalid parameter",
"type": "OAuthException"
}
}

getting error while selecting notification type = schedule events

When I am selecting Notification Type as Scheduled Events fields "Reference Document Type" and "Field Name" is disappearing but after saving below error is showing.

image

We can achieve this by unchecking "Mandatory" and adding this condition eval:doc.notification_type == "DocType Event" to field "Mandatory Depends On" in "Reference Document Type" and "Field Name" fields from "WhatsApp Notification" doctype.

I am unable to uncheck "Mandatory" from both fields because these are standard fields.

Message WhatsApp Templates None not found: and Server Error KeyError: 'error' Possible source of error: frappe_whatsapp (app), i'm getting a server error and message response when running whatsapp notification. Any help?

Discussed in #6

Originally posted by shridarpatil December 7, 2022

👋 Welcome!

We’re using Discussions as a place to connect with other members of our community. We hope that you:

  • Ask questions you’re wondering about.
  • Share ideas.
  • Engage with other community members.
  • Welcome others and are open-minded. Remember that this is a community we
    build together 💪.

To get started, comment below with an introduction of yourself and tell us about what you do with this community.

How to add Payment Request link and Payment receipts

I want to send notifications to my students whenever the payment request is created in their name.
Usually I send Payment request link using the following method "{{ doc.get_payment_url() }}".
How can I send the same link here as well.

Also whenever the student pays the amount using the link I shared, I want to send the Confirmation payment receipt using the payment receipt attachment of 'Payment Entry' doctype.

Can you please tell how to do it @shridarpatil @mohsinalimat @chechani @vineyrawat

Issues with Whatsapp notifications

Hi, I have fixed the grammar of your message without changing the images:

Hi, I have finished all the setup process.

I have created a permanent token as per the meta docs.
I have used the URL that I saw in the picture in the readme.md, which is https://graph.facebook.com/.
I have used both versions V15.0 and V16.0, but now I am using V16.0 because the webhook is configured with that one.
I have set the phone number and business ID.
I have also set the webhook verify token.

Screenshot 2023-03-08 090202

In the message list, I made many tests and found that when I send a message without receiving the first one from the number I'm messaging, the other number won't receive it. Basically, it should be a user-initiated conversation to be able to receive messages sent from the WhatsApp message functionality.

Screenshot 2023-03-08 091149

So I thought that in order to create a business-initiated conversation, I should use WhatsApp templates. I created my templates, and all were approved. Then, I added them to a WhatsApp notification using the new option to set a custom field on the mobile_no field.

I had no errors in the process, but it won't send WhatsApp messages. I tried sending the message first from the user and then performing the action to receive the notification, but nothing happened. I tried with different fields and still had the issue.

Is there an additional configuration that I need to do to be able to initiate business conversations? Or any meta documentation that I need to check? Additionally, is there any way that I can check the logs generated by this app? I tried looking in the error log, but I found nothing.

"erpnext": "14.18.0",
"frappe": "14.26.4",
"frappe_whatsapp": "0.0.1",
"healthcare": "15.0.0-dev",
"hrms": "14.1.0",
"payments": "0.0.1"
Host frappecloud

Thank you for tanking the time to read this and work on this project.

How can I trigger a WhatsApp Notification?

Hello!

I have a WhatsApp Template, Approved, and pulled successfully. AFAIK, the only way to initiate a message from this app is via WhatsApp Notification DocType.

The DocType Event menu does not have what I need. I need a custom event.

More specifically, I have a custom button on a DocType Form View, and I need the notification to be triggered once the button is clicked.

Could you please give me high level directions on how to achive this?

BR

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.