How to get Email Status and log in an entity?

How to get Email Status and log in an entity?

  

Hi Team,

I have a requirement to log the Status of Emails in a entity. I can verify the status of emails in Service Center but I cant show that to end users. 

So I did an analysis to check if the Email logs are getting stored in some entities, to my luck I got to know there are some entities like Email Content, Email Definition, Sent Email and Email Status but in all these entities the status is not logged. In Email Status entity the "Sent" date time attribute is null.

I have a timer which will send Email notification to multiple users. Can you please help me out to track the status of each email I send and show as report to end user.


Thanks in advance,

Mehraj


Hi Mehraj,

The "Sent" attribute of the EmailStatus table is actually the date/time when the e-mail was sent, and has the same value as the "Sent Instant" column in service center. If you get a NullDate(), that e-mail wasn't sent yet.

Kilian Hekhuis wrote:

Hi Mehraj,

The "Sent" attribute of the EmailStatus table is actually the date/time when the e-mail was sent, and has the same value as the "Sent Instant" column in service center. If you get a NullDate(), that e-mail wasn't sent yet.

Hi Killian,

As you said I can see "Sent Instant" column in service center with date for all the emails I send, but the "Sent" column of Email Status Entity is NULL in fact the entity itself is NULL.  


Hi Mehraj,

Are you sure you are looking at the same records? Also be aware it's a multi-tenant table, so be sure to use the right tenant in case you use multi-tenancy.

Kilian Hekhuis wrote:

Hi Mehraj,

Are you sure you are looking at the same records? Also be aware it's a multi-tenant table, so be sure to use the right tenant in case you use multi-tenancy.

Hi Killian,

I cant get you. My requirement "I have a timer which will send Email notification to multiple users. I need to track the status of each email I send and show as report to end user" Can you guide me how to create this email status report ?


Thanks

Mehraj


Hi Mehraj,

I could, but I doubt this report has any merits. Platform e-mail is sent almost as soon as it's been created, so only in case you have a very large batch you'll notice some not sent yet, and by the time you've created your report everything will be sent. So although you can create a report that shows each e-mail that has been sent (basically a copy of the Service Center screen), I'd try to convince your users this is not very informative :).

That said, create a timer, create a query, export the query data to an Excel file, store the Excel file in the database, create an e-mail screen (with a parameter to the Excel file table entry), attach the Excel file, send the e-mail. Pretty basic imho.

Kilian Hekhuis wrote:

Hi Mehraj,

I could, but I doubt this report has any merits. Platform e-mail is sent almost as soon as it's been created, so only in case you have a very large batch you'll notice some not sent yet, and by the time you've created your report everything will be sent. So although you can create a report that shows each e-mail that has been sent (basically a copy of the Service Center screen), I'd try to convince your users this is not very informative :).

That said, create a timer, create a query, export the query data to an Excel file, store the Excel file in the database, create an e-mail screen (with a parameter to the Excel file table entry), attach the Excel file, send the e-mail. Pretty basic imho.

Hi Killian,

I am sending 1600 mails at once and my client wants to see the status of emails in a report. I agree this report is a replica of Service Center report. I am curious how Service Center is showing the report of Email logs. 

In my environment the Email Status entity is Empty/NULL but the service center shows me the status as SENT. Is there any way to get the Status from any entity ? or Is their any Service API from outsystems to get the status of email ?

Thanks

Mehraj



Hi Mehraj,

It's probably a tenant problem, as the tables are multi-tenant. I have problems myself testing it, as it insists in using a wrong "tenant" (which is an eSpace Id) when querying. I'll get back if I have more information.

Ok, I found it: if you mean you get NULL results when testing in a test query, you need to change the Tenant as described here. However, in my own case, we don't have multi-tenancy, and yet Service Studio still wants to use a specific tenant (that doens't work).