I’m working on a project to use FreeAgent as the invoicing backend for a SaaS product. We are creating invoices in FA using the API and want FA to handle sending out the invoice and reminder emails.
We are setting the send_new_invoice_emails (etc) flags on the invoices we are creating and we are making the call to mark_as_scheduled.
I’m testing in the sandbox. I created some invoices on Friday and according the UI, everything appeared to be ok and the emails were configured correctly. However, I never received the email and the UI is still saying the email is scheduled, not sent. The invoices are created dated ‘today’ - as in, they are issued the day they are created, in this case Friday.
What’s going on here? Is it not possible to schedule an email for ‘today’?
I note the ‘email an invoice’ endpoint (https://dev.freeagent.com/docs/invoices#email-an-invoice), but that seems to require me to provide the email template, where as I want to use the preconfigured template email on the account.
What do I need to do to get FA to send the emails for me ‘today’?
We’re trying to dig into this a bit for you, but we’re struggling to identify your sandbox FreeAgent account. Could you let me have some details (subdomain, example invoice ids) by direct message and I’ll see if I can see where the problem lies.
I don’t seem to have the ability to send you a direct message. I can find an inbox, but there are no buttons to start a new message.
Invoices in question are 23658 and 23639 in an account called iamsandbox. They are scheduled for Jan 13th.
I’ve done some digging and your data does indeed look fine. It seems the problem is how we treat scheduled tasks on our sandbox environment - we don’t run any. With no scheduled jobs running, invoices which are to be sent will always remain in a “Scheduled” state and emails will not be delivered.
This seems to be an oversight on our part, but to the best of our knowledge you’re the first person to have reported this. We’re a little cautious about just enabling it as there’s probably quite a backlog so let us look into a safe and scalable way of doing this and we’ll come up with an implementation plan. In the meantime, I’ve manually run the scheduled invoice sending job for your sandbox account and those emails should be winging their way to your inbox as we speak.
Haha, that would explain that then! I’ve received the emails.
Thanks for looking in to this.