Posted at 9:32 AM by Rakesh Gupta, on June 21, 2016
Big Idea or Enduring Question:
How can you automatically update the case status when receives a response from customers via Email-to-Case?
Objectives:
This blog post will help us to understand the following
Create a Process Builder which fires on customer’s response to an email-to-case
Understand how email-to-case works
Business Use Case
Pamela Kline is working as a System administrator at Universal Containers (UC). She has just implemented an email-to-case process. Now she has received the following enhancements from the support agent:
Automatically add customer response to the case email thread, when the customer replies to the email that has been sent from a case.
Re-open a case when the customer responds to a support agent email, within five days of case closure.
Automation Champion Approach (I-do):
Email-to-Case allows you to create a case automatically when a customer emails in. It also populates some key information, for example, the email subject becomes the case subject, and the email body-mapped to the description. You can configure multiple Email-to-Case channels based on your business use case.
Next, you have to understand the Thread ID. The thread ID is a unique ID generated for outbound emails within the case. The thread ID will look like ref:_00D90wAtk._500901Kc5WN:re. To automatically add customer response to the case email thread, make sure that Email-to-Case has been configured correctly for customer email responses to be attached to the case.
Email Threading is an important part of Email-to-Case setup. Setting this up essentially means that, if a customer emails you more information about an existing Case, their second email will be attached to their existing Case instead of creating a new Case. If you want to auto add a unique Thread ID into your auto-responses and other outgoing emails, then navigate to Setup | Build | Customize | Cases | Email-to-Case and select the check-boxes as shown in the following screenshot
When you are replying to a customer make sure to change the address from the Owner to the Email to the Case support address. If this is not changed, then the response from the customer will be sent to the owner of the case and will not be added to the Email Thread. Follow the below steps to add Email-to-Case support address to from address (Basically we are going to add Email-to-Case support address to Organization-Wide Addresses:
Copy the Email Services Address (i.e. Long email address) from Email-to-Case as shown in the preceding screenshot.
The next step is to add a new Organization-Wide Email Addresses. Use Email Services Address (Long address) in place of Email Address, as shown in the following screenshot:
For verification purposes, Salesforce will send an email notification with a confirmation link to the above-mentioned email addressRead the rest of this entry!
Posted at 10:28 PM by Rakesh Gupta, on March 27, 2015
Big Idea or Enduring Question:
A Price Book is a book in which the prices of products are listed. Currently, business users have to select a price book as soon as an opportunity is created. In this article, let’s check out a way to auto-assign a Price book based on the Opportunity record type using the Process Builder.
Objectives:
This blog post will help us to understand the following
Using process builder to auto-assign Price book when an opportunity is created, based on the opportunity record type.
The opportunity object and creating record types.
The PriceBook object and creating price books
Using Developer Console and SOQL query to find the PriceBookID
How to use Custom Label in process builder
Business Use case
Martin Jones is working as a System administrator at Universal Containers (UC). His organization wants to develop a Process to automate price book assignment based on the Opportunity record type and implement the following requirements
If the Opportunity record type is Manufacturing then assign a price book Manufacturing
If the Opportunity record type is Retail then assign a price book Retail
Automation Champion Approach (I-do):
While this can be solved using various automation tools like Apex or Flow, we will use Process Builder. This is not something that can be accomplished with Workflow Rules.
Let’s breakdown the solution into the following steps for understanding:
Create two opportunity record types – Manufacturing and Retail
Create two Price books – Manufacturing and Retail
Using the Developer Console retrieves the PricebookId fields for the two Price books – Manufacturing and Retail.
Create a process builder to automate the process of assigning the price book depending on the record type.
Before discussing it, let me show you a diagram of a Process Flow at a high level. Please spend a few minutes to go through the following Flow diagram and understand it.
Let’s begin building this automation process.
Guided Practice (We-do):
There are 8 steps to solve Martin’s business requirement using Process Builder. We must:
Create two record types – Manufacturing and Retail
Create two price books – Manufacturing and Retail
Find the price books Ids for Manufacturing and Retail
Creating a custom label to store price book Ids
Define process properties
Define evaluation criteria
Define process criteria
Add action – update records
Step 1: Create Two Record Types
Click Setup.
In the Object Manager, type Opportunity.
Clicks on the Record Type, then click New.
Name the Record Type Label and the Record Type Name will populate.
Now select the Sales Process and make sure to select the Active checkbox.
Click Save.
Step 2: Create Two Price Books
Navigate to App Launcherand select the Price Books.
Click on theNew button.
Name the Price Book and make sure to select the Active checkbox.
Click Save.
Step 3: Find the price books Ids for Manufacturing and Retail
The next step is to find out the Id of price books Manufacturing and Retail. One possible workaround is to use the Developer Console.
Click Setup | Developer Console
In the Query Editor, run the following SOQL query
Select id, name from pricebook2 where (name=’manufacturing’ or name=’retail’)
Make sure to copy the Ids.
Step 4: Creating a Custom Label
Click Setup.
In the User Interface, type Custom Labels.
Click on the New Custom Labelbutton.
Enter Short Description the Name will auto-populate.
Now enter the Manufacturing Price Book Idin the Value.
Click Save.
Repeat steps 1-6 to create another label to store the Retail Price Book.
Step 5: Define Process Properties
Click Setup.
In the Quick Find box, type Process Builder.
Select Process Builder, then click New.
Name the Process and click the Tab button. The API Name will populate.
As a best practice, always input a description.
The process starts when A record changes.
Click Save.
Step 6: Define Evaluation Criteria
Click on the Add Object node to begin selecting the evaluation criteria.
Select the Opportunity object from the dropdown list.
Start the process only when a record is created.
Click Save.
Step 7: Define Process Criteria
Click the Add Criteria node to begin defining the process criteria.
Name the criteria.
The criteria should execute actions when the conditions are met.
Set Conditions
Row 1
Field: Opportunity | RecordTypeId
Operator: Is null
Type: Boolean
Value: False
Select All of the conditions are met (AND).
Click Save.
Step 8: Add Action – Update Records
Below Immediate Actions, click Add Action.
For Action Type, select Update Records.
Name the action.
Select the option Select the Opportunity that started your process record type.
The criteria for updating records should be No criteria – just update the records!
Almost there! Once everything looks good, click the Activate button.
Note:- Before you activate your process, you will want to make sure that you have assigned data in the correct format because Process Builder obeys validation rules. If some fields are required by using validation rules, then make sure you have added those fields. Conversely, if some fields are required on the page layout, you can ignore those fields.
Proof of Concept
Now onwards if a business user creates an Opportunity with any of these two record types, then Process Builder will automatically add a corresponding price book to it.
Create an Opportunity with record type Manufacturing, as shown in the following screenshot:
Once you are done, check out the Product related list available on the Opportunity detailpage.
Formative Assessment:
Hope you all enjoyed learning about assigning Pricebook depending on the selected record type of an opportunity using Process Builder. I shared here one way of solving this use case using Process builder. Feel free to solve this use case with a different approach and share it here so I and my readers can enjoy learning about them. If you have any ideas, insights, or questions you are most welcome to share them with me.
Let me know by Tweeting me at @automationchamp, or find me on LinkedIn.