Copying Email Details to a new field

atul_05
Tera Contributor

Hello All,

I have got a requirement to get the 1st email details stored in a newly created field 'email_details' on RITM table.

There is a Inbound Email action already created for the catalog item and the ask is When an email is received, the 1st email should get copied to the email_details field.

The field will then be used for reporting purpose and for a bot to read it from that field.

Can anyone please help me on this?

 

 

3 REPLIES 3

Shivalika
Mega Sage

Hello @atul_05 

 

So you want that inbound email action to run only once per email ? 

 

Then the first time the email is received and you have set the email body as EMAIL details in your RITM. Add another thing in your inbound email action script that - 

 

if(!(current.email_details==''))

return; 

 

This will cancel the script and your further emails received on same email will not be copied. 

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY

Hi Shivalika,

No, this is a completely different requirement from the Inbound Email action and we do not want to touch that.

 

We just want to have the email body copied to a field for a specific catalog item. How can we achieve this.

Hello @atul_05 

 

In that case is your received email being stored anywhere apart from sys_email table ? Like in work notes or any field ? 

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY