Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
2168 มุมมอง

Hello,


Is it possible to automate the sending of a whatsapp template using Studio?


Basically, my scenario is this: I receive an order, i ready it, i input the tracking info and once I confirm the delivery, Odoo automatically sends a whatsapp message to the customer.


I know how to set up the Automation and Triggers, but what I do not know how to do is to create the action that will send the Whatsapp Template.


I am using Odoo 17.2 Online


Thank you

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

1 create the WhatsApp template for delivery 

2 - create automatic action 

3- add trigger on save and add the condition state = done 

4- select the WhatsApp template 

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

For sending a whatsapp template under certain conditions (maybe something happening in your database a new sale order) you can use automated actions and execute code, in code the sending of a whatsapp message looks something like this:
composer = env['whatsapp.composer'].create({

                    'res_model': 'whatsapp.message',

                    'res_ids': str([record.id]),

                    'wa_template_id': wa_template_id,

                    'batch_mode': False,

                    'phone': record.mobile_number,

                    'free_text_1': record.body or '',

                })

                composer.action_send_whatsapp_template()


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ค. 24
2534
0
ต.ค. 24
971
0
ส.ค. 25
416
2
ส.ค. 25
726
1
ก.ค. 25
709