I have created an email alert to send the mail to customer as well as our sales persons 2 days before the due date and 2 days after the due date, which is working fine but what if I want send the alert on the invoice due date, I tried to put value 0 in before and after days section but seems it is not wokring.
Apart from that I realize that the system is sending the email alerts even if the invoice is already paid and that is because of my mistake, I was not using conditions.
Now I am trying to put the condition that if the doc.status is Unpaid or Overdue then only it should send the alert but I am getting the Invalid condition error, Please refer the attached Screenshot.
Try condition on amount, doc.outstanding_amount > 0
Thanks for the reply when I am only putting [quote=“Pawan, post:2, topic:16544”]
doc.outstanding_amount > 0
it gives me no errors but what if I want to mix the conditions with document status? am I putting the value “doc.status==” in wrong format? the following are conditions and there result type.
- If I put doc.outstanding_amount > 0 it gives no error.
- If I put doc.outstanding_amount > 0 and doc.status==[“Unpaid”, “Overdue”] it gives no error.
- If I put doc.outstanding_amount > 0 or doc.status==[“Unpaid”, “Overdue”] it gives error.
- If I put doc.outstanding_amount > 0 or doc.status==“Unpaid” or doc.status==“Overdue” it gives error.
- If I put doc.status==[“Unpaid”, “Overdue”] it gives error.
- If I put doc.status==“Unpaid” or doc.status==“Overdue” it gives error.
Please suggest what is the correct way if I want only the alert based on point 5 or 6 and I want to send the alert on which the invoice is due, I mean on the due date of invoice.
I believe it will be helpful for creating alerts for other document type i.e. sales order, purchase order, events etc.
I think what you are looking for can be achieved with outstanding amount condition and payment due date alert. The text states that Days before and Days after, I don’t think 0 days would work currently with the functionality we have. You can raise an issue on GitHub in case you feel it is an issue.
Ok I will try this and post the results.
Thanks for your help pawan.
Sure, the field that you are trying to use doc.status is not a valid field on the doc type. So you can have and or conditions but be sure to use a valid field
There is one more issue, as system is not allowing me to setup the same subject or alert name twice.
What if I want the same subject name and send the alert.
e.g. I have create the alert with the subject Invoice is unpaid which should trigger 2 days and 1 day before the due date, same way the another subject invoice overdue after 1 day and 2 days of the due date, so here I am not able to set the same subject name twice I have to modify the subject and save the alert.
How I can achieve this in single alert or subject name?
Here is the final results.
The system will not allow to specify the same subject name so the subject name should be unique each time.
and I have tried to setup alert on the due date of invoice, but it seems to be not working.
Please let me know is this an issue? should I open the issue for this on github.
or am I doing something wrong in setting up the alerts.