Email with content and attatchment

Discuss your general Proclaim related queries here.
Mark_ACA
Posts: 12
Joined: Mon Aug 09, 2021 10:58 am
Has thanked: 5 times

Email with content and attatchment

Post by Mark_ACA »

Sorry I'm fairly new to Proclaim and am learning, I am an IT Sys Admin, I did the courses uyp to tech2 a few weeks ago and have just dived in with soem simple change requests.

Access legal support seem swamped right now so I am waiting on their response, hopefully soemone here can help.

I'm trying to do something fairly simple. I want an agent to be able to email a client with a pre-filled template with a generated letter attached in one action.

So I created the letter workflow template, let’s call that CL, and I created an embedded document field for it. I then created an e-mail workflow template CL-E which embeds the document field for CL into the email, and has the email content itself.
I have to manually run CL first in order for CL-E to have it available to embed.

I tried adding code to 'Before' on CL-E which runs CL automatically but this code is not called when the email is created, it’s called when you press accept so CL does not run and the embedded document does not exist yet (or is an old version)

I could create a linked action which calls the CL followed by CL-E, then train the staff that for certain ones they run the linked action button rather than the email workflow. The problem I have here is they are all used to running the email workflow, and many of them will go there by habit and try to send the email manually anyway. My manager doent like the idea of this if it can be avoided.

Is it possible to achieve what I am trying to from the compose email button? Where maths runs and generates the letter to be attached before pressing accept ?

If not what would you suggest to make it clean? can I hide the templates form users but still have the linked actions call them ? So they can’t accidently send them manually ?
This is probably not be the first time someone has wanted this functionality I presume ?
I did try a forum search so appologies if its already on here I couldnt find it.

TIA
M

Enigma
Posts: 89
Joined: Mon Mar 04, 2019 1:01 pm
Has thanked: 11 times
Been thanked: 15 times

Re: Email with content and attatchment

Post by Enigma »

Hi Mark,

You could instead have them generate the Letter instead of the email.

Then on the Aftermath of the Letter, it can generate the Email, which will attach the document the user will have just generated.

Mark_ACA
Posts: 12
Joined: Mon Aug 09, 2021 10:58 am
Has thanked: 5 times

Re: Email with content and attatchment

Post by Mark_ACA »

That is a good idea, except the staff arent used to this, its very rare that we send letters, they will chose send email and chose the letter template. This will generat the letter but not give them any content in the email body.

Perhaps this can work if they cannot manually send the letter as an email? Is it possible to hide it from the email list so it only appears in the letter list ?
--------------------
I was thinking this logic, but i'm not sure if its possible.
The below code works and produces the relevant Message.

Code: Select all

IF {Client Care Letter.Sent on} <> TODAY THEN 
    MESSAGE( "Letter wasnt generated today, canceling" )  
ELSE 
    MESSAGE( "Letter was generated today, sending" ) 
END
Obviously the 'sending' message box can just be removed, the else part of this command means the email can be sent.
Instead of the the 'canceling' mnessage box is there any code at all that I can use which will cancel the sending of the email ?
Then I can just run the letter itself and re-call the email template.

I suspect this will be possible becuae the email does not send until i close the messagebox.

Also is there any way I can close down the time frame ? so that the letter refreshes if its more than 10 minutes old, rather than if it wasnt produced today ?

Enigma
Posts: 89
Joined: Mon Mar 04, 2019 1:01 pm
Has thanked: 11 times
Been thanked: 15 times

Re: Email with content and attatchment

Post by Enigma »

Selecting it as an Email template would at least send it as an attachment that way, but you are reliant on the staff making sure they fill in the email body.

For automating the process, the Letter itself needs to be generated outside of the email template in order to be saved and committed to the history. (You would think putting it in the Before Math would do the trick...but Proclaim can be stubborn :P)

Only then will the embedded document field be updated with the latest document, ready to be attached to an email.

The only options really are that they either they generate the letter manually via the button at the top, or you will need a linked action that first generates the letter, then generates the email:

SEND LETTER Client Care Letter
SEND E-MAIL.....(ATTACH XYZ)