Skip to Content
Menu
This question has been flagged

Sending an automatic email to a new customer after their first purchase is a strategic move to introduce them to additional products or services they might find valuable. This personalized outreach creates an opportunity for upsells and cross-sales, maximizing revenue from the initial transaction and increasing customer lifetime value.

We will use the Marketing Automation app to answer it.

Avatar
Discard
Author Best Answer

Create a campaign and target the audience

Go to Marketing Automation - New

Target: Sales order - this will allow us to filter on the sale order status. 

Unicity based on: Customer - By choosing the customer field, we are sure that we will send the email to the same customer only once

Filter:​ In developer mode, you can force the following path partner_id.sale_order_count to check if the contact already has any sales order or quotation linked. The number of sales order and quotation (count) is reflected by the smart buttons on the contact form. As we want to target only new customers, they can only have 1 sale order or 1 subscription linked. 
To exclude any quotation, we add a filter on the state field.
NB: Though sales orders and subscriptions are merged into the same Odoo model (sale.order), they have different count fields. Therefore, we need to add another filter on partner_id.subscription_count (to be forced the same way as above), and add a filter to only apply the rule on subscriptions that are In Progress. ​​​


Create an Activity

Once you defined your target audience, you can start creating your activity (Email sequence).

Activity type: Email

Trigger: In this case we will choose a time-based trigger, ex. 10 days after the sales. 

Mail Template: Create and adapt your email template using one of the predefined templates or create a new one. 

Save & Close.

Now you are ready to start the automation by clicking on the Start button.


Avatar
Discard

Is there any way to set this up in version 15?

Best Answer

Thank you for this tutorial! Unfortunately I can't seem to filter based on this partner_id.sale_corder_count field. I even tried filtering my contact list using this filter without any success. It always return the total amount of customers regardless of the number I add (0,1,2, etc.) I can however add the field in the contact list view with Studio and I can see the number of Sale Orders per contact in the list view but cannot filter using it! 


Also not that the field sale_order_count is not set to be stored or indexed by default. 


Thanks for your help! :)

Avatar
Discard
Best Answer

I have adding Salesperson / Subscription but this is not available.  What are the prerequisites, which I could be missing?


I have tried with your update but fails at finding subscription_state


["&", ("partner_id.sale_order_count", ">=", 0), "&", ("state", "=", "sale"), "|", ("partner_id.subscription_count", ">=", 1), ("stage_id.name", "=", "In Progress")]


I'm finding it frustrating looking at the Technical/Database/Models and Fields, as they don't show all the functions for a given object.  Where can I find a full object list and be able to traverse all functions, variables and relationships?


Where can I find documented "partner_id.sale_order_count" and where to find "subscription_state".

subscription_state -  could not find this in the fields list.


Using Odoo 16.


--Update-- 

By looking at a subscription, I see "

  • QuotationIn Progress(Stage)

I then used Stage=In Progress.   However, this still doesn't answer how I can find this without all the guess work and poking around, please? Is there an addon that offers intelisense or a proper object model view?



Avatar
Discard
Author

Hey! Thank you for your comment. There indeed was an error in the screenshot, though the description is correct. The right path to follow is partner_id.subscription_count. You should follow the contact as starting point rather than the salesperson. I have adapted the screenshot.

Related Posts Replies Views Activity
0
Aug 25
401
2
Jul 25
500
3
Jul 25
3061
1
Jun 25
1332
5
Jun 25
16486