Email Integration and Automation with Plinqx
Available: Starter and Premium
Custom Email Service Handlers in Plinqx
Overview
Plinqx extends Salesforce’s email handling capabilities with two custom email service handlers, designed to seamlessly integrate into your Salesforce environment. These handlers can be implemented as custom email services in Salesforce and reused across different services, offering flexibility and efficiency in managing email-based workflows.
Referencing Salesforce Documentation
For a foundational understanding of Salesforce’s custom email services, please refer to the Salesforce documentation on custom email services. This resource provides an in-depth explanation of the underlying concepts and standard configurations.
Setting Up Plinqx Email Handlers
-
Accessing Email Services:
-
Navigate to Salesforce Setup.
-
In the Quick Find search box, type “Email Services.”
-
From the result list, select Custom Code -> Email Services.
-
-
Creating a New Email Service:
-
Click the “New Email Service” button.
-
Enter a name for your new email service.
-
-
Selecting the Appropriate Apex Class:
-
Choose from the following Plinqx Apex Classes:
-
PlinqxInboundEmailHandler
: Implements the standard email-to-case logic and then directs to your configured Plinqx Event.
-
PlinqxInboundEmailHandlerPassThrough
: Bypasses the standard email-to-case logic and directly calls your Plinqx Event.
-
-
Email Service Flow Inputs
When configuring your email service to call a flow, ensure the following flow input parameters are available in your flow:
Name | Type | Description |
---|---|---|
ccAddresses | String Collection | Carbon copy (CC) addresses, if any |
headers | String Collection | RFC 2822 headers in the email |
toAddresses | String Collection | 'To' addresses in the email |
attachments | Attachment Object Collection | Email attachments |
fromAddress | String | Email address in the 'From' field |
fromName | String | Sender's name as specified in email client |
htmlBody | String | HTML version of the email, if provided by the sender |
htmlBodyIsTruncated | Boolean | Indicates if the email was truncated |
inReplyTo | String | ID of the email being replied to |
plainTextBody | String | Plain text body of the email (no HTML tags) |
plainTextBodyIsTruncated | Boolean | Indicates if the plain text body was truncated |
replyTo | String | Reply-to address of the sender |
subject | String | Subject of the email |
Finalising Configuration
Complete the configuration process as you would for setting up a standard custom email service in Salesforce, as detailed in the Salesforce documentation. This step ensures that your Plinqx email services are optimally integrated into your Salesforce environment, enabling efficient and effective email-based workflows.
Example Scenario: Processing Emails with Attachments in Plinqx
Scenario Overview
Imagine a scenario where your organization frequently receives emails with various types of attachments, such as CSV, XML, JSON files, or even PDF documents. These emails might contain crucial data for order processing, customer inquiries, or operational updates. Using Plinqx’s custom email service handlers, you can automate the processing of these emails and their attachments, streamlining your workflow and ensuring prompt and accurate data handling.
Scenario Steps
-
Email Receipt: An email is received in your Salesforce environment. This could be an order confirmation email with a CSV attachment detailing the order items, or a customer inquiry email with a PDF attachment.
-
Email Service Handler Activation:
-
The PlinqxInboundEmailHandler or PlinqxInboundEmailHandlerPassThrough is triggered, depending on your configuration.
-
The handler parses the email, identifying important elements like the sender’s information, subject, and attachments.
-
-
Attachment Processing:
-
If the attachment is a CSV, XML, or JSON file, Plinqx processes the data within the file, extracting relevant information. This could involve parsing line items in an order or extracting specific customer details.
-
For PDF attachments, Plinqx, in conjunction with OCR technology (available in the Enterprise package), can extract text data from the PDF, making it usable for further processing.
-
-
Data Utilization:
- The extracted data can then be used to automatically update records in Salesforce, trigger specific workflows, or even initiate outbound communications. For instance, order details from a CSV can be used to update inventory records, or customer information from a PDF can be used to update a customer service case.
-
Flow Completion and Logging:
- Upon successful processing, the flow completes, and relevant logging is done for audit and tracking purposes.
Benefits of the Scenario
-
Efficiency:
Automates the processing of email attachments, saving time and reducing manual effort.
-
Accuracy:
Minimizes the risk of human error in data entry and processing.
-
Scalability:
Can handle a large volume of emails and diverse file types efficiently.
-
Versatility:
Applicable to various business scenarios, from order processing to customer service.