Is there a way to retrieve the email address that is assigned to a job card?
I have noticed that each job will have its own email address, so that if the customer replies to an email sent from within ServiceM8, the reply is added to the job.
Is there a way to work out what that email address is?
For Two-Way Email, the “magic” happens when the customer hits Reply to an email that was sent from that job in ServiceM8, and their reply is automatically added to the Job Diary.
If what you’re trying to do is send or forward an external email into ServiceM8 (rather than replying to an email that ServiceM8 sent), the supported option is the Email Inbox add-on, which gives your ServiceM8 account a unique email address and lets job-related emails sent/forwarded to that address arrive in your ServiceM8 Inbox (where they can be attached to jobs).
You can find your Inbox address under Settings → Email Inbox.
Reply here with whether you’re aiming to (a) capture customer replies, or (b) email/forward messages into an existing job, and we’ll point you to the right workflow.
Not ideal, but you can CC or email yourself from the job to expose it. If you’re using OAuth I believe you could automate it using platform_service_email
Two-Way Email is designed so that when a customer replies to an email that was sent from ServiceM8, their reply is automatically added to the job diary.
If you need a known email address you can send/forward messages to (rather than relying on Reply), the Email Inbox add-on gives your account a unique email address, and job-related emails sent or forwarded to it arrive in your ServiceM8 Inbox. From there, if the message relates to an existing job, you can use “Attach to Existing Job” to file it against the right job, and you can view the Inbox address under Settings > Email Inbox.
If these are supplier invoices and you want them to attach automatically, Supplier Invoice Import generates an email address for your account and invoices are automatically added to the correct job by matching the invoice PO number to the ServiceM8 job number.
And for an OAuth-based integration (as Chad mentioned), POST /platform_service_email supports regardingJobUUID, which links the email to a job so it appears in the job diary.