@@ -22,9 +22,9 @@ database, which allows for the following:
22
22
- Create new templates with dynamic placeholders/variables
23
23
- Send pre-approved templates that use dynamic variables, such as:
24
24
25
- - Quotations from the Sales app
26
- - Receipts and invoices from the Point of Sale app
27
- - Tickets from the Events app
25
+ - Quotations from the ** Sales ** app
26
+ - Receipts and invoices from the ** Point of Sale ** app
27
+ - Tickets from the ** Events ** app
28
28
29
29
.. seealso ::
30
30
- `Meta Business: create message templates for the WhatsApp Business account
@@ -43,7 +43,7 @@ connection.
43
43
The WhatsApp connector supports two flows: company initiated, and customer initiated. A company can
44
44
initiate a discussion by sending a template to one or more people. Once the template is sent, the
45
45
recipient can answer in order to trigger a discussion between the sender and the receiver (a
46
- *Discuss * chat window will pop up if the customer answers within 15 days).
46
+ ** Discuss ** chat window appears if the customer answers within 15 days).
47
47
48
48
If the discussion is initiated by the client (e.g. by sending to the company's public WhatsApp
49
49
number), then Odoo will open a group chat with all operators responsible for this WhatsApp channel.
@@ -93,11 +93,10 @@ account and to complete the setup process.
93
93
To toggle to the business account navigate to the `Facebook Developer Console
94
94
<https://developers.facebook.com> `_ and click on the *account name * in the upper right corner.
95
95
Under the :guilabel: `Business Accounts ` heading, click on the desired business that the WhatsApp
96
- configuration should take place in. This will be the account for which Odoo will send and receive
96
+ configuration should take place in. This is the account for which Odoo will send and receive
97
97
WhatsApp messages.
98
98
99
99
.. image :: whatsapp/toggle.png
100
- :align: center
101
100
:alt: Toggle between Meta personal and business accounts.
102
101
103
102
.. important ::
@@ -121,7 +120,7 @@ developer account.
121
120
`Set up the WhatsApp Business Platform
122
121
<https://www.facebookblueprint.com/student/collection/409587/path/360218> `_.
123
122
124
- Click on :guilabel: `My Apps ` in the top right corner after successfully signing in to the Meta
123
+ Click on :guilabel: `My Apps ` in the top- right corner after successfully signing in to the Meta
125
124
developer account. This will redirect the administrator to all the apps the developer has configured
126
125
in this specific developer account. Click on :guilabel: `Create App ` to begin the process of
127
126
configuring a new Meta application.
@@ -162,7 +161,7 @@ To accept the agreements, enter the Facebook password for security purposes, and
162
161
for Developers ` dashboard.
163
162
164
163
.. note ::
165
- If the Meta business account is prohibited from advertising, claiming an app won't be allowed. To
164
+ If the Meta business account is prohibited from advertising, claiming an app is not allowed. To
166
165
resolve this issue navigate to `<https://business.facebook.com/business >`_ for assistance.
167
166
168
167
For more information, see `Meta's documentation on advertising restrictions
@@ -175,7 +174,7 @@ Now that the basic structure of the app has been created, a product will need to
175
174
app. Begin by accessing the Meta app dashboard by navigating to
176
175
`<https://developers.facebook.com/apps >`_, and clicking on the app that is being configured.
177
176
178
- On the next page: since WhatsApp will be used, click :guilabel: `Set up ` next to the box containing
177
+ On the next page: since WhatsApp is used, click :guilabel: `Set up ` next to the box containing
179
178
WhatsApp, located towards the bottom of the page.
180
179
181
180
.. seealso ::
@@ -202,11 +201,10 @@ is where to begin configuring the WhatsApp API by adding a phone number and then
202
201
test message.
203
202
204
203
.. image :: whatsapp/quickstart.png
205
- :align: center
206
204
:alt: Navigating to the WhatsApp quickstart wizard in Meta for Developer dashboard.
207
205
208
206
.. note ::
209
- If the browser isn't on the :guilabel: `Quickstart ` page for WhatsApp, navigate to
207
+ If the browser is not on the :guilabel: `Quickstart ` page for WhatsApp, navigate to
210
208
`<https://developers.facebook.com/apps >`_ and click on the app that is being configured, (the
211
209
app name is `Odoo ` if the instructions above were followed).
212
210
@@ -317,11 +315,10 @@ webhooks to receive messages` and click on :guilabel:`Configure webhooks`.
317
315
hand menu.
318
316
319
317
.. image :: whatsapp/webhooks.png
320
- :align: center
321
318
:alt: Manually navigating to the Whatsapp webhooks configuration.
322
319
323
320
On the :menuselection: `Webhook configuration ` page, click on :guilabel: `Edit `, where both the
324
- :guilabel: `Callback URL ` and :guilabel: `Webhook Verify Token ` values from the Odoo will be added.
321
+ :guilabel: `Callback URL ` and :guilabel: `Webhook Verify Token ` values from Odoo are added.
325
322
326
323
.. note ::
327
324
Both the :guilabel: `Callback URL ` and :guilabel: `Webhook Verify Token ` values were automatically
@@ -343,20 +340,19 @@ Webhook fields
343
340
344
341
Now input individual webhook fields into Meta's developer console, under the :guilabel: `Webhook
345
342
fields ` section. Click :guilabel: `Manage ` and when the pop-up window appears, check the boxes in the
346
- :guilabel: `Subscribe ` column for the following * field names * :
343
+ :guilabel: `Subscribe ` column for the following field names:
347
344
348
- - account_update
349
- - message_template_quality_update
350
- - message_template_status_update
351
- - messages
352
- - template_category_update
345
+ - ` account_update `
346
+ - ` message_template_quality_update `
347
+ - ` message_template_status_update `
348
+ - ` messages `
349
+ - ` template_category_update `
353
350
354
351
After making the selections, click :guilabel: `Done `.
355
352
356
353
The finished :guilabel: `Webhooks ` configuration will appear like this in the Meta developer console:
357
354
358
355
.. image :: whatsapp/webhooks-done.png
359
- :align: center
360
356
:alt: WhatsApp webhooks set in the Meta developer console.
361
357
362
358
.. important ::
@@ -413,7 +409,7 @@ depending on the verification method chosen. Enter that verification code into t
413
409
:guilabel: `Verification code ` field and click :guilabel: `Next ` to finish.
414
410
415
411
.. warning ::
416
- If a payment method hasn't been added this will be necessary to proceed. `Visit Meta's
412
+ If a payment method has not been added, this is necessary to proceed. `Visit Meta's
417
413
documentation on how to add a payment method in Meta's Business Manager
418
414
<https://www.facebook.com/business/help/915454841921082?id=180505742745347> `_. This is part of
419
415
Meta's fraud detection system, in order to ensure that the account/company are real a payment
@@ -442,22 +438,27 @@ clicking on :guilabel:`Add`.
442
438
443
439
Assets now must be added to the system user and then a permanent token can be generated.
444
440
441
+ .. warning ::
442
+ This is a mandatory step. If the permanent token is not added, the Odoo database shows a
443
+ :ref: `token error <whatsapp/token_error >`.
444
+
445
445
Click on :guilabel: `Add assets `, and when the pop-up window appears select :guilabel: `Apps ` under
446
446
the :guilabel: `Select asset type `. Then, select the Odoo app and toggle the permissions to *On *
447
447
under the :guilabel: `Full control ` option. Set this new permission setting by clicking
448
448
:guilabel: `Save Changes `, to which a confirmation window will appear, acknowledging the addition of
449
449
the asset to the system user. Finish by clicking :guilabel: `Done `.
450
450
451
- Next, the permanent token will be generated. Click on :guilabel: `Generate new token `, and a pop-up
451
+ Next, the permanent token gets generated. Click on :guilabel: `Generate new token `, and a pop-up
452
452
window will appear asking which app this token should be generated for. Select the :guilabel: `App `
453
453
that this token is for. Then determine the expiration date of either :guilabel: `60 days ` or
454
454
:guilabel: `Never `.
455
455
456
456
Finally, when Meta asks which permissions should the system user allow, add all of the following
457
457
permissions:
458
458
459
- - WhatsApp_business_messaging
460
- - WhatsApp_business_management
459
+ - `business_management `
460
+ - `whatsapp_business_messaging `
461
+ - `whatsapp_business_management `
461
462
462
463
When permissions are set, click :guilabel: `Generate token `. Copy the token value that populates on
463
464
the screen that follows.
@@ -498,8 +499,8 @@ WhatsApp templates are saved messages that are used repeatedly to send messages
498
499
They allow users to send quality communications, without having to compose the same text repeatedly.
499
500
500
501
Creating different templates that are tailored to specific situations lets users choose the right
501
- message for the right audience. This increases the quality of the message and the overall
502
- engagement rate with the customer.
502
+ message for the right audience. This increases the quality of the message and the overall engagement
503
+ rate with the customer.
503
504
504
505
WhatsApp templates can be created on both the Odoo and Meta consoles. The following process will
505
506
overview the process for creating templates in Odoo and then afterward in Meta.
@@ -546,7 +547,7 @@ action will apply to for this template.
546
547
547
548
.. tip ::
548
549
These models can also be accessed in :ref: `developer mode <developer-mode >`. On a contact form
549
- (or similar relevant form in Odoo), navigate to the model that will be referenced, and hover over
550
+ (or similar relevant form in Odoo), navigate to the model that is referenced, and hover over
550
551
any field name. A box of backend information will reveal itself with the specific Odoo
551
552
:guilabel: `Model ` name in the backend. Search (using the front-end name) for this model in the
552
553
:guilabel: `Applies to ` drop-down menu in the WhatsApp template.
@@ -556,24 +557,22 @@ action will apply to for this template.
556
557
produce an error The :guilabel: `Phone Field ` should always be set to the `Phone ` or `Mobile `
557
558
model.
558
559
559
- To search available fields, type in the front-end name in the :guilabel: `Search... ` box. This will
560
- find a result from all of the available fields for the model (:guilabel: `Applies to `) that the
561
- template is created for.
560
+ To search available fields, type in the front-end name in the search box. This finds a result from
561
+ all of the available fields for the model (:guilabel: `Applies to `) that the template is created for.
562
562
563
563
.. note ::
564
564
In order to find specific fields, multiple levels may need to be navigated in the search results
565
565
box. Use the :guilabel: `> (right chevron) ` and :guilabel: `⬅️ (left arrow) ` icons to navigate
566
566
between the menu levels.
567
567
568
568
.. image :: whatsapp/phone-field.png
569
- :align: center
570
569
:alt: Searching for the phone field in the search bar.
571
570
572
571
Change the :guilabel: `Category ` to fit either a :guilabel: `Marketing `, :guilabel: `Utility `, or
573
- :guilabel: `Authentication ` category. In most instances the first two options will be used, unless
574
- the user would like to send a password reset or something security related. Set to
575
- :guilabel: ` Marketing ` should there be anything promotional being sent and set to :guilabel: `Utility `
576
- should there be general transactional messages being sent (i.e., sales order, event ticket, etc).
572
+ :guilabel: `Authentication ` category. In most instances the first two options are used, unless the
573
+ user would like to send a password reset or something security related. Set to :guilabel: ` Marketing `
574
+ should there be anything promotional being sent and set to :guilabel: `Utility ` should there be
575
+ general transactional messages being sent (i.e., sales order, event ticket, etc).
577
576
578
577
.. important ::
579
578
Specifying an incorrect category can cause a flag/rejected status from Meta during the approval
@@ -603,12 +602,12 @@ The templates will then need to be synced from the Odoo database.
603
602
See this section for more information on :ref: `syncing templates <productivity/whatsapp/sync >`.
604
603
605
604
.. tip ::
606
- There are pre-configured demo data templates available in Odoo to use or modify. These templates
607
- can be used as-is or modified to suit a specific business need.
605
+ Consider the preconfigured demo data templates available in Odoo to use or modify. These
606
+ templates can be used as-is or modified to suit a specific business need.
608
607
609
608
To use these templates, navigate to :menuselection: `WhatsApp app --> Templates ` and select a
610
- pre-configured template. Click :guilabel: `Submit for Approval ` to start the approval process. An
611
- email will be sent to the administrator of the Meta account when the template has been approved.
609
+ preconfigured template. Click :guilabel: `Submit for Approval ` to start the approval process. An
610
+ email gets sent to the administrator of the Meta account when the template has been approved.
612
611
613
612
Buttons
614
613
~~~~~~~
@@ -637,7 +636,6 @@ the database, referencing fields from within a model.
637
636
email from the :guilabel: `Customer ` field on the :guilabel: `Sales Order ` model.
638
637
639
638
.. image :: whatsapp/message.png
640
- :align: center
641
639
:alt: WhatsApp message with dynamic variables highlighted.
642
640
643
641
Dynamic variables can be added in to the :guilabel: `Body ` by adding :guilabel: `placeholders ` in the
@@ -745,7 +743,6 @@ will update the templates that are approved so that they can be utilized with va
745
743
database.
746
744
747
745
.. image :: whatsapp/sync-template.png
748
- :align: center
749
746
:alt: Syncing Meta WhatsApp templates to the Odoo database, with the 'Sync Templates'
750
747
highlighted.
751
748
@@ -765,23 +762,21 @@ First, navigate to `Meta's WhatsApp template dashboard
765
762
Message templates `.
766
763
767
764
.. image :: whatsapp/account-tools.png
768
- :align: center
769
765
:alt: Account tools highlighted in business manager with the manage templates link highlighted.
770
766
771
767
To create a WhatsApp template, click on the blue :guilabel: `Create template ` button, and then select
772
768
the :guilabel: `Category `. The options listed include: :guilabel: `Marketing `, :guilabel: `Utility `,
773
- and :guilabel: `Authentication `. In most instances the first two options will be used, unless the
774
- user would like to send a password reset or something security related.
769
+ and :guilabel: `Authentication `. In most instances the first two options are used, unless the user
770
+ would like to send a password reset or something security related.
775
771
776
772
Enter the :guilabel: `Name ` of the template and then select the :guilabel: `Language ` for the
777
773
template.
778
774
779
775
.. note ::
780
- Multiple languages can be selected by typing the language name(s) and selecting the other
776
+ Multiple languages can be selected by typing the language names and selecting the other
781
777
languages as needed.
782
778
783
779
.. image :: whatsapp/template-config.png
784
- :align: center
785
780
:alt: Template configuration options listed, with Marketing, Utility, Name and Language
786
781
highlighted.
787
782
@@ -791,12 +786,11 @@ The page redirects to the :guilabel:`Edit template` page. Here the :guilabel:`He
791
786
template is a preview of what the template will look like in production.
792
787
793
788
.. image :: whatsapp/edit-template.png
794
- :align: center
795
789
:alt: Edit the template using a header, body, footer and buttons.
796
790
797
791
When all the necessary changes are made to the template, click on the :guilabel: `Submit ` button in
798
792
the upper-right corner. A confirmation window appears to confirm the language— click
799
- :guilabel: `Confirm ` to approve and then another window appears stating that the template will be
793
+ :guilabel: `Confirm ` to approve and then another window appears stating that the template gets
800
794
submitted to Meta for review and approval.
801
795
802
796
The :guilabel: `Status ` of the template will remain in :guilabel: `In review ` until a decision has
@@ -818,12 +812,12 @@ WhatsApp business account configuration in Odoo.
818
812
Notification settings can be adjusted by navigating to :menuselection: `WhatsApp app -->
819
813
Configuration --> WhatsApp Business Accounts `. From there, select the account and scroll down to the
820
814
:menuselection: `Control ` section where notifications are handled. Under the :guilabel: `Notify users `
821
- heading, type in the field which user(s) should be notified for this particular WhatsApp channel.
815
+ heading, type in the field which users should be notified for this particular WhatsApp channel.
822
816
823
817
.. note ::
824
818
Once a conversation is initiated between a user and a customer, notifications to all the users
825
- specified in the WhatsApp business account configuration won't occur. Only notifications to the
826
- user(s) in the conversation will occur. Should the user not respond within 15 days, the
819
+ specified in the WhatsApp business account configuration will not occur. Only notifications to
820
+ the users in the conversation will occur. Should the user not respond within 15 days, the
827
821
customer's reply after the 15 days will populate once again to all the users specified in the
828
822
WhatsApp configuration.
829
823
@@ -835,7 +829,6 @@ conversations are located in the *Discuss* app. Click on the :guilabel:`👤+ (a
835
829
it, and a window appears to invite users to the conversation.
836
830
837
831
.. image :: whatsapp/add-users.png
838
- :align: center
839
832
:alt: Adding users to a WhatsApp conversation, with the add user icon highlighted.
840
833
841
834
WhatsApp API FAQ
@@ -868,9 +861,10 @@ this issue, rename the duplicate template name on Odoo and sync the templates on
868
861
following the steps here: :ref: `productivity/whatsapp/sync `.
869
862
870
863
.. image :: whatsapp/validation-error-2.png
871
- :align: center
872
864
:alt: User error populated in Odoo when a duplicate template exists.
873
865
866
+ .. _whatsapp/token_error :
867
+
874
868
Token errors
875
869
------------
876
870
@@ -882,7 +876,6 @@ when testing the connection after sending fails. To correct this issues see
882
876
:ref: `productivity/whatsapp/token `.
883
877
884
878
.. image :: whatsapp/user-error.png
885
- :align: center
886
879
:alt: User error populated in Odoo when token expires.
887
880
888
881
System user error 100
@@ -895,5 +888,4 @@ To correct this error, create an :guilabel:`Admin` system user, following the pr
895
888
:ref: `productivity/whatsapp/token `.
896
889
897
890
.. image :: whatsapp/user-error-2.png
898
- :align: center
899
891
:alt: User error populated in Odoo when an employee token is generated instead of a Admin user.
0 commit comments