Title
Invocable Method
Published Body

An Invocable Method action called "E2CP Send Response" is packaged with Email to Case Premium.

Salesforce Admins may leverage it in Flows or Apex to replicate actions that are taken when sending an email from the New Comment Page, and subsequently have them added to Timeline. The recipients of the communication sent via the invocable are the contacts that are currently present on the case.

The allowed actions for the Invocable Method are:

  • Update Cases
  • Send Emails
  • Insert Email Messages
  • Insert Case Comments
  • Create Draft Comments (creation only, no sending)
  • Create Comment Only (with no recipients)
  • Schedule Send
  • Attach files

To locate the E2CP Invocable Method action to be used in Flows, create a Flow, and in the list of actions, locate the "E2CP" category. The E2CP Send Response action should be the only one showing on the list.

IM action.jpg

 

To configure the action, there are a few items to be filled out in the "Set Input Values for the Selected Action" section.

Case Id: should be filled out with the Id of the Case to send the response on. You may use {!$Record.Id}.

Public Response: Set to {!$GlobalConstant.True} if the response should be public, or {!$GlobalConstant.False} if private.

Canned Response Id: Id of the Canned Response to use as the Response Body. Leave blank when specifying a Response Body.

Comment Only: Set to "{!$GlobalConstant.True}" if response should be a comment only; "{!$GlobalConstant.False}" if an email should also be sent to recipients on the case.

Create Draft Response: Set to "{!$GlobalConstant.True}" if response should be created as a draft; "{!$GlobalConstant.False}" if a comment should be created.

Email Template Id: Id of the email template to be used when sending the response. (Be sure to remove the first 2 characters of the Id. For example, the Id of the email template as copied from the URL is 2F00XHo0000012hVG, but it should be input at 00XHo0000012hVG.)

File Attachments: List of ContentDocument IDs to be included as attachments with the response.

Response Body: Response content. Leave blank when specifying a Canned Response Id.

Schedule Send At: Date and time for scheduling the response. If populated when Create Draft Response is set to false, the comment will be scheduled as a draft.

 

image.png

 

Please note:

  • Vicasso uses Canned Response IDs and Email Template IDs because the names of those are editable.
  • The From Address for comments inserted via the Invocable Method comes from the specified addresses in the Outbound tab of the setup wizard, unless overwritten by the email template header.
  • A note is added to the case if no recipients are found, and if the "Automatically Enable Recipients" setting is disabled.
Documentation Name
Invocable Method