- Starter
- Standard
- Premium
The Email to TaskRay feature allows creating tasks via email. Once enabled, users will be able to send emails to TaskRay and thus create new tasks. Email to TaskRay can also be further enhanced using validation rules to suit the needs of your organization.
Set Up Email to TaskRay [Admin]
Before you begin setting up Email to TaskRay, it is important to take a few things into consideration regarding how the feature works.
- The email subject will be the TaskRay Task Name.
- The Task Name will be prefixed with the email address before the @. This allows context for customer workflow, such as routing the task to a particular project or owner.
- If the user sends the email from an email address that is associated with TaskRay, that user will be set as the task owner. Otherwise, the user set as the Email to Task Context User will be the default owner.
- If there is an email body, its content will be added as a Chatter post on the TaskRay task. If the user sends the email from an email address that is associated with TaskRay, that user will be set as the Chatter post's author.
- If there is an email attachment, the attachment will be added as a Chatter post on the TaskRay task.
Create Email Service and Configure Settings
- From Setup, navigate to:
- Lightning: Custom Code | Email Services.
- Classic: Develop | Email Services.
- Click on New Email Service.
- Enter Email Service Name (e.g. Email to TaskRay).
- For the Apex Class field, using the Lookup icon, choose trEmailService.
- For Accept Attachments, select Binary attachments only.
- Select the Active checkbox.
- Optional: You can review the Salesforce Defining Email Services article if you have additional questions about the other field options on the page.
- Click Save and New Email Address.
The Apex Class selected is not valid. An Apex Class that implements the Messaging.InboundEmailHandler interface must be selected.
If you receive this error, do the following:
- From Setup, navigate to:
- Classic: Develop | Apex Classes.
- Lightning: Custom Code | Apex Classes.
- Click on the Compile all classes link and wait for process to complete.
- Return to Email Services and retry steps 1-8 above.
Set an Email Address
- The Email Address field should be automatically populated based on the name of your Email Service (from the previous section). This will be the email address that your users will use to forward tasks to TaskRay. The text in the field is the first portion of the email address (before the "@"); Salesforce will assign the end of the email address starting with the @.
Reminder! The email address (before the @) will be used as a prefix in the Task Name so that workflow can be created for autoproject or owner assignment
Tip: You can change this to any address that would be easy for your users to remember. For example, you could consider changing this to "taskray" for easy reference. - The Context User must be a licensed TaskRay user. We also recommend that this user is a System Administrator.
- Optional: In the Accept Email From section, specify the qualified emails by users or domains.
- Click Save.
On the next page, you should see a long email under Email Addresses. This is the address that your users will use to add new tasks to TaskRay via email.
Using Email to TaskRay
Email to TaskRay allows you to create new tasks in TaskRay directly from your mailbox. To create a new task via email, simply create a new email and send it to the address provided by your Admin. When composing the New Task email, there are a few important details to remember in order for the feature to work properly.
- In your mailbox, create a new email.
- For the Recipient, enter the email provided by your Admin.
- Enter Subject. This will be the name of the task.
- Optional: Enter email message. If you enter a message, it will be turned into a Chatter post on the new task.
- Optional: Upload attachments. If you add attachments to the email, they will be uploaded to Chatter on the new task.
- Send.
Email to TaskRay Enhancements [Admin]
Using Workflow Rules, enhancements can be made to the Email to TaskRay feature.
For example, you could create a rule that would assign new tasks to specific users depending on the task type. By default, all tasks created using the Email to TaskRay feature automatically get assigned to whoever sent the email (if the sender's email is associated with TaskRay; otherwise, they are assigned to the specified Context user). However, it is possible to create rules that will assign different owners or queues to tasks.
Below are the basics for creating such rules, but you can modify the criteria further to suit the needs of your organization. Overall, you would first need to modify the existing Email to TaskRay Email Service and create additional emails for the different types of tasks. Next, you would need to create Workflow Rules to specify what you want to happen with new tasks.
Modify Email Service
- From Setup, navigate to:
- Lightning: Custom Code | Email Services.
- Classic: Develop | Email Services.
- Open the Email to TaskRay email service (it might be named differently in your Org).
- Under Email Addresses, click New Email Address.
- For the Email Address field, enter text that applies to the action that you want to happen.
- For example, if you want the tasks that are created using this address to be assigned to the Customer Support queue, you could enter "support". This keyword will also automatically be added as a prefix on the Task Name for all tasks created via email. This prefix will later be used to create the workflow rule.
- The Context User must be a licensed TaskRay user. We also recommend that this user is a System Administrator.
- Optional: In the Accept Email From section, specify the qualified emails by users or domains.
- Click Save.
Create Workflow Rule
- From Setup, navigate to:
- Lightning: Process Automation | Workflow Rules.
- Classic: Create | Workflow & Approval | Workflow Rules.
- Click on New Rule.
- For Object, select TaskRay Task.
- Click Next.
- Enter the Rule Name.
- Under Evaluation Criteria, select Created.
- Under Rule Criteria, select Criteria are met.
- For Field, select TaskRay Task: Task Name.
- For Operator, select starts with.
- For Value, enter "support:".
- Click Save & Next.
- On the next page, under Immediate Workflow Actions, select New Field Update.
- Enter Name (e.g. Change Owner to Customer Support).
- For Field to Update, select Owner.
- Under Specify New Field Value, for Owner, select Queue and add the desired queue (in this case, Customer Support).
- Click Save.
Workflow Rule in Action
With this rule from the example above in place, your users can use Email to TaskRay and create new tasks using the support@ email address. Tasks created using this address will automatically get assigned to the Customer Support queue.