Skip to main content
Version: 2

Email Integration and Automation with Plinqx

info

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

  1. 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.

  2. Creating a New Email Service:

    • Click the “New Email Service” button.

    • Enter a name for your new email service.

  3. 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:

NameTypeDescription
ccAddressesString CollectionCarbon copy (CC) addresses, if any
headersString CollectionRFC 2822 headers in the email
toAddressesString Collection'To' addresses in the email
attachmentsAttachment Object CollectionEmail attachments
fromAddressStringEmail address in the 'From' field
fromNameStringSender's name as specified in email client
htmlBodyStringHTML version of the email, if provided by the sender
htmlBodyIsTruncatedBooleanIndicates if the email was truncated
inReplyToStringID of the email being replied to
plainTextBodyStringPlain text body of the email (no HTML tags)
plainTextBodyIsTruncatedBooleanIndicates if the plain text body was truncated
replyToStringReply-to address of the sender
subjectStringSubject 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

  1. 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.

  2. 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.

  3. 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.

  4. 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.
  5. 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.