You need to sign in to do that
Don't have an account?
Coolday
Wants to show the message "Your response is already captured" when a customer replies twice on the mail.
We have a requirement where an email (Visualforce) is sent to the customer and they can either reply Accept or Reject and that response is captured in salesforce and based on that we are sending a reverse email using salesforce sites which has an Visualforce page for Accept and Reject response.
Currently we are facing an issue where a customer is able to accept or reject multiple times. So, to avoid that we want to show a message to the customer that "Your response is already captured".
How can this be achieved?
Currently we are facing an issue where a customer is able to accept or reject multiple times. So, to avoid that we want to show a message to the customer that "Your response is already captured".
How can this be achieved?
Use an inbound email handler , there you will have access to 'messaging.InboundEmail' email
e.g
global messaging.InboundEmailresult handleInboundEmail(messaging.InboundEmail email, messaging.InboundEnvelope envelope) {
using email record find all parents
SELECT id, RelatedToId, HtmlBody, TextBody, FromAddress, CreatedById, CreatedBy.Email, createdBy.SenderEmail
FROM EmailMessage
WHERE ThreadIdentifier IN :email.references
ORDER BY createddate ASC
depending upon a scenario you can add validation here post reading the related messages to the thread.