Automation Champion

Automating Salesforce One Click at a Time
Automation Champion
  • Home
  • About Me
    • Testimonials
    • Resources
  • Process Builder
  • Salesforce Flow
  • Pardot
  • Apex
  • Training Details
    • Salesforce Administrator
    • Salesforce Advanced Administrator
    • Platform App Builder
    • Lightning Flow
    • Pardot
    • Sales Cloud
    • Service Cloud
    • Community Cloud
    • Hands-on Excercises
  • My Books
  • Contact Me
  • Tag: Process Builder Record Updates action

    • Getting Started with Process Builder – Part 54 (Update the Case Status Through Email-to-Case Response)

      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:

      1. Automatically add customer response to the case email thread, when the customer replies to the email that has been sent from a case.
      2. 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

      Insert Thread ID in the Email Subject and Body

      • 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:
      1. Copy the Email Services Address (i.e. Long email address) from Email-to-Case as shown in the preceding screenshot.
      2. 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:Organization-Wide Email Addresses
      3. For verification purposes, Salesforce will send an email notification with a confirmation link to the above-mentioned email address Read the rest of this entry!
      Posted in Process Builder | 11 Comments | Tagged Activate a Process, Add action Process Builder, Add Criteria Proces builder, ADM 201, adm 201 certification, adm 201 salesforce, Auto reopen a case in Salesforce, auto repoen case salesforce, Automation Champion, Case email threading, Case Thread ID, Chatter and Process builder example, Con 201, dev 401, email-to-case, Email-to-case response an process builder, Email-to-Case response to case field update, Email-to-Case response to process builder, Email-to-Case Setup, Enable Process Builder, flow, Lightning Process builder, Organization-Wide Addresses, Platform App Builder, Platform App Builder Exam, Process Builder, Process Builder action, Process Builder example, Process Builder examples, Process Builder rakesh, Process Builder Record Updates action, Process Builder Sales Cloud, Process Builder Salesforce, Process Builder Service Cloud, Process builder use case, Process Criteria, Process management, Re-open a case when the customer responds to support agent email, salesforce, salesforce Admin exam, salesforce certified developer exam, Salesforce Online Training, Salesforce Platform Developer I, Salesforce Platform Developer I Exam, Salesforce Training, Update the case status, Update the case status through Email-to-Case response, Update the case status through Process, Update the case status through Process Builder, What is Process Builder, when a record is created or edited
    • Getting Started with Process Builder – Part 14 (Automatically assign Pricebook based on Opportunity Record Type)

      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

      1. If the Opportunity record type is Manufacturing then assign a price book Manufacturing 
      2. 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:

      1. Create two opportunity record types – Manufacturing and Retail
      2. Create two Price books – Manufacturing and Retail
      3. Using the Developer Console retrieves the PricebookId fields for the two Price books – Manufacturing and Retail. 
      4. 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: 

      1. Create two record types – Manufacturing and Retail
      2. Create two price books – Manufacturing and Retail
      3. Find the price books Ids for Manufacturing and Retail
      4. Creating a custom label to store price book Ids
      5. Define process properties
      6. Define evaluation criteria
      7. Define process criteria
      8. Add action – update records 

      Step 1: Create Two Record Types

      1. Click Setup.
      2. In the Object Manager, type Opportunity.
      3. Clicks on the Record Type, then click New. 
      4. Name the Record Type Label and the Record Type Name will populate. 
      5. Now select the Sales Process and make sure to select the Active checkbox.
      6. Click Save.

      Step 2: Create Two Price Books

      1. Navigate to App Launcher and select the Price Books.
      2. Click on the New button. 
      3. Name the Price Book and make sure to select the Active checkbox.
      4. 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. 

      1. Click Setup | Developer Console 
      2. In the Query Editor, run the following SOQL query 
        1. Select id, name from pricebook2 where (name=’manufacturing’ or name=’retail’)
      3. Make sure to copy the Ids. 

      Step 4: Creating a Custom Label 

      1. Click Setup.
      2. In the User Interface, type Custom Labels.
      3. Click on the New Custom Label button.
      4. Enter Short Description the Name will auto-populate. 
      5. Now enter the Manufacturing Price Book Id in the Value.
      6. Click Save.
      7. Repeat steps 1-6 to create another label to store the Retail Price Book.

      Step 5: Define Process Properties

      1. Click Setup.
      2. In the Quick Find box, type Process Builder.
      3. Select Process Builder, then click New.
      4. Name the Process and click the Tab button. The API Name will populate. 
      5. As a best practice, always input a description. 
      6. The process starts when A record changes.
      7. Click Save.

      Step 6: Define Evaluation Criteria

      1. Click on the Add Object node to begin selecting the evaluation criteria.
      2. Select the Opportunity object from the dropdown list.
      3. Start the process only when a record is created.
      4. Click Save.

      Step 7: Define Process Criteria

      1. Click the Add Criteria node to begin defining the process criteria.
      2. Name the criteria.
      3. The criteria should execute actions when the conditions are met.
      4. Set Conditions
        1. Row 1
          1. Field: Opportunity | RecordTypeId
          2. Operator: Is null
          3. Type: Boolean
          4. Value: False
      5. Select All of the conditions are met (AND). 
      6. Click Save.

      Step 8: Add Action – Update Records

      1. Below Immediate Actions, click Add Action.
      2. For Action Type, select Update Records. 
      3. Name the action.
      4. Select the option Select the Opportunity that started your process record type. 
      5. The criteria for updating records should be No criteria  – just update the records! 
      6. Set new field values for the records you update: 
        1. Row 1:
          1. Field: Price Book ID
          2. Type: Formula
          3. Value: IF([Opportunity].RecordType.Name=’Manufacturing’,$Label.Manufacturing_Price_Book_Id ,IF([Opportunity].RecordType.Name=’Retail’,$Label.Retail_Price_Book_Id ,[Opportunity].Pricebook2Id) )
      7. Click Save.

      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.

      1. Create an Opportunity with record type Manufacturing, as shown in the following screenshot:
      2. Once you are done, check out the Product related list available on the Opportunity detail page.

      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.

      Author: - Rakesh Gupta
      Technical Editor: - Mrudula Jarugula
      Have feedback, suggestions for posts, or need more information about Salesforce online training offered by me? Say hello, and leave a message!

      Posted in Process Builder, Sales cloud, Spring'15 Release | 23 Comments | Tagged Add Criteria Proces builder, Apex code to assign pricebook based on Opportunity record type, assign a price book to an account, assign a price book to an Asset, auto assign a pricebook based on the recordtype, Auto assign price book to oppotunity, Auto assign Pricebook based on Opportunity Record Type, auto assign pricebook to an Opportunity, Auto assign pricebook to an Order, auto assign pricebook to Opportunity, Auto assign pricebook tOrder, Automatically assign Pricebook based on Opportunity Record Type, default a pricebook based on Opportunity recordtype, default a pricebook based on the recordtype, default a pricebook to an Order, Enable Process Builder, Getting started with Process Builder, How to activate Process builder, how to use Process builder, Immdiate action in process Builder, Lightning App, Lightning Process builder, PB, Price Book, Proces book in Salesforce, Process Builder, Process Builder examples, Process Builder Record Updates action, Process Builder Salesforce, Process builder use case, Process Criteria, Product in Salesforce, Products and Pricebooks in Salesforce, Salesforce process Builder getting started, Spring15 process builder, Spring15 Process builder enhancement, trigger to assign pricebook based on Opportunity record type, Way to active the Process
    • Search

    • Upcoming Trainings

      Salesforce Administrator Certification
      Salesforce Advanced Administrator Certification
      Salesforce Platform App Builder Certification
      Lightning Flow & Process Builder
      Advanced Lightning Flow
      Pardot Specialist & Consultant Certification
      Sales Cloud Consultant Certification
      Service Cloud Consultant Certification
      Community Cloud Consultant Certification
    • Sponsor #1

    • Sponsor #2

    • Sponsor #3

    • Sponsor #4

    • Order Now!

    • Buy My Book

    • Buy My Book

    • Recent Posts

      • Getting Started with Salesforce Flow – Part 58 (Customize Previous, Next, Finish, and Pause Button Label for Screen Flow!)
      • Streamline Data Collection with Salesforce-Connected Forms
      • Getting Started with Salesforce Flow – Part 56 (Merge Chatter Topics with the Help of Salesforce Flow)
      • Getting Started with Salesforce Flow – Part 57 (Adding Validation to Flow Screen Components)
      • Getting Started with Salesforce Flow – Part 55 (Add or Remove Followers to a Record with the Help of Salesforce Flow)
    • Salesforce ID Converter Build on Lightning Flow

      Converting 15 digit ID to 18 digit Salesforce ID
    • Blog Archives

    • Categories

  • Information

    • About Me
    • Affiliate Disclaimer
    • Contact Me
    • Privacy Policy
  • Top Posts

    • Learning Flow
    • Learning Process Builder
    • Salesforce Spring’21 Release Quick Summary
    • Getting Started with Salesforce Flow – Part 11 (Count Number of records in a Record Collection Variable)
    • Getting Started with Process Builder - Part 1 (Automatically Create a record)
    • Getting Started with Salesforce Flow – Part 4 (Need to Redirect a User to a New Record?)
    • Getting Started with Salesforce Flow – Part 41 (Create a Survey Using Flow? Why Not?!)
    • Add Record to Multiple Chatter Groups - Parsing Multi-Select Picklist fields (Flow)
    • Getting Started with Salesforce Flow – Part 33 (Prior Value of a Record in Record-Triggered Flows)
    • Getting Started with Salesforce Flow – Part 31 (Auto Submit Record into Approval Process with Flow)
  • Social Media

    • View Automationchampion’s profile on Facebook
    • View Automationchamp’s profile on Twitter
    • View Rakeshistom’s profile on GitHub