Daily updates from Odoo
Monday, August 12, 2019
3 changes · master
New functionality added to Odoo
Odoo now supports sending SMS messages in bulk through a new Mass SMS app built alongside mass mailing. Businesses can run SMS marketing campaigns, manage phone opt-outs and blacklists, track delivery outcomes, and use SMS-specific campaign views and reporting.
Original PR description
PURPOSE SMS are a powerful marketing tool. For instance it is perfect to announce a sale or to communicate a coupon code, to welcome a new customer in a fidelity program, ... Purpose of this task is…
PURPOSE
SMS are a powerful marketing tool. For instance it is perfect to announce a
sale or to communicate a coupon code, to welcome a new customer in a fidelity
program, ...
Purpose of this task is to integrate SMS sending in batch in mass mailing. It
will use same mailing objects but sending SMS instead of emails. Some metrics
and flows will have to be slightly updated at the same time.
SPECIFICATIONS
Purpose of this merge is to add Mass SMS application allowing to send SMS
in batch. It is build on mass mailing application but with its own menus,
views and flows.
See sub commits for more details. Here is a summary of main changes
in this merge.
PHONE BLACKLIST
Add a blacklist mechanism for phone numbers used to send SMS like
what already exists for email addresses when sending emails.
Define a new phone.blacklist model, holding a number and the state of the
blacklist (active field), as well as tools methods to access it. Make it
as private as possible, accessing it in sudo once access are granted.
Define a new mail.thread.phone mixin computing the blacklist status of a
record.
BLACKLIST / ERROR IN COMPOSER
Support blacklisted and already-done numbers when sending SMS :
* blacklist support: necessary to avoid sending SMS in batch to people that
asked to stop being spammed;
* already-done support: when performing mailing in batch or doing A/B testing
we may have already-done SMS;
When sending SMS in batch, already update state and error code of SMS that
should not be sent
* blacklisted number: set to canceled, with blacklist error code;
* duplicated number: set to canceled, with duplicated error code;
* invalid number (cannot sanitize): set to error, with either missing number
if void or wrong format if not void;
SPEEDUP BATCH LOGGING
Allow quick message creation by allowing create multi on mail.message.
Also introduce a new helper tool method to log in batch on records.
IMPROVE SMS COMPOSER ONBOARDING AND USE
Clean the use and options of sms composer after FP feedback, notably
* see https://s.nimbusweb.me/share/3167586/ap1xpy95rz29a5cys576 as basis;
* globally, do not display invalid recipients, only valid / invalid count
as well as current selection / active domain counts;
* consider logging a note as default behavior when using the composer;
* simplify code: when doing a mass SMS, send SMS and attach a simple note
to the document;
Limit use of templates to models that are really capable of sending
SMS. Templates are now available on models that inherit from mail.thread
and effectively have fields used in SMS sending.
MASS MAILING PREPARATION
Prepare mass mailing module to addition of mass_mailing_sms.
Mailing model: mailing type
* add a mailing_type selection field;
* mass mailing contains only 'mail';
* synchronize medium accordingly;
* update actions of mass mailing application to add a domain on mailing
type being 'mail';
Mailing contact
* remove is_email_valid field as its purpose is achieved by email_normalized
field coming from address mixin (added by blacklist management);
Mailing contact subscription
* clean a bit fields and views as this should stay a technical model;
Trace model and report: trace type
* add a trace_type selection field;
* mass mailing contains only 'mail';
ADD MASS MAILING SMS
Create a new application called "Mass SMS" that follows the structure of
mass_mailing application.
General guidelines
* use the fa-comment icon for this module;
* add a "Notification type" field to the mailings: email or sms. Set it
invisible and set as domain from context when choosing mass mailing or
mass sms application (menus / action specific);
* adapt the metrics from Mass Mailing to SMS
* sent = received = whether the SMS was sent or not;
* opened => we don't have this information;
* replied => we don't have this information;
* clicks = from link tracker (no change of behavior);
* bounced = SMS that failed to be delivered because the format is wrong;
* exception = any issue when sending SMS;
* keep the Mailing Lists menu, hide email related fields on contact model;
* settings: hide the "Specific Mail Server" feature
Opt-out and blacklist handling
* we do support mailing lists because they could come from different sources
and are a way to communicate with a specific audience (and not just a list
we bought), e.g. subscribe to this list to be kept updated whenever this
product is back in stock, or to receive results of this ...
* if the SMSing is from a list, opt-out removes ourselves from the list;
* if it is from the contact ==> Sent to blacklist;
* allow to attach unsubscription links in sent SMS, redirecting to a new
route in mass mailing SMS allowing quick unsubscribe and/or blacklist
of phone numbers;
Error management
* if the user clicks on Send Now / Schedule / Test and does not have enough
credits, open the "Insufficient credits" modal in a lazy option (aka when
having failed statistics linked to insufficient credits);
* on the mailing, we however display this failure as :
* a message on the mailing kanban view
* a message on the top of the form view + same behavior as the mailing and
"Could not be sent" https://www.screencast.com/t/BExgd1Gc;
LINKS
Task 1997464
PR #34424
Original SMS addition: Task 1922163 (4287481)Adds tracking of products shoppers spend time viewing, then shows those items in a recently viewed products carousel. This helps customers rediscover items and add them to the cart more easily, including after creating an account.
Original PR description
A new module has been created: website_tracking. It's purpose for now is to keep track of products viewed by a user and display them in a snippet. Now when a user browse products in eCommerce, we…
A new module has been created: website_tracking. It's purpose for now is to keep track of products viewed by a user and display them in a snippet. Now when a user browse products in eCommerce, we keep track of the products he looked at for more than 3 sec. If the user is connected it is stored in the DB, else it is stored in session and as a cookie. When a user creates an account, its products viewed are stored in DB from the session/cookie and those are deleted. The recently viewed products are displayed as a snippet but also with the customize options in cart, product and products templates of website_sale. Products that are in cart will not be returned as recently viewed and also on the shop/products page the product displayed will not appear as a recently viewed product. It is possible to add a recently viewed product to the cart directly from the carousel, it will not redirect to the cart. If we are on the cart page, the product is displayed in the cart. task-1984575 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Marketing teams can now add SMS text message activities to automated campaigns alongside email activities. This makes it easier to send promotions, coupon codes, welcome messages, and other short communications through the same campaign workflows, with SMS-specific labels and sending metrics.
Original PR description
PURPOSE SMS are a powerful marketing tool. For instance it is perfect to announce a sale or to communicate a coupon code, to welcome a new customer in a fidelity program, ... Purpose of this task is…
PURPOSE
SMS are a powerful marketing tool. For instance it is perfect to announce a
sale or to communicate a coupon code, to welcome a new customer in a fidelity
program, ...
Purpose of this task is to integrate SMS capabilities in mass mailing. It
will use same mailing objects but sending SMS instead of emails. Some metrics
and flows will have to be slightly updated at the same time.
SPECIFICATIONS
Update marketing automation to mailing changes related to SMS addition,
notably mailing type field and some code / model / view changes.
Integrate SMS activities inside marketing automation :
* See https://drive.google.com/a/odoo.com/file/d/1lJdeoNtYsJtyFMWyrHJUZxAn3NFLZDSQ/view?usp=drivesdk
* add value 'SMS Text Message' to field 'Activity Type' (in second position)
* switch field 'Activity Type' widget to vertical radio
* field 'Template' should display SMS or Mail template depending of the value
of 'Activity Type'
For SMS activities
* in the marketing.campaign formview, the 'workflow card' of an SMS activity
should have the number of texts sent at the bottom (the Clicked and Replied
stats can be removed);
* Rename "EMAIL DETAILS" to "SMS DETAILS"
* Rename "Email" to "SMS Text Message"
* The icon should be switched to fa-comment (https://nimb.ws/j48hp2)
As we have no way to know whether the SMS was received, and since we do not
handle answers, in the 'Add child activity' widget (at the bottom of the card)
the only option available is 'add another activity' (like for server action
activities), see https://drive.google.com/a/odoo.com/file/d/1dkAWsl520Nlg4q8XCmI-eMKbEfsAje6j/view?usp=drivesdk
LINKS
Task 1997464 (mass mailing SMS)
Task 1922198 (marketing automation SMS)
PR #4864
Community PR odoo/odoo#34424