Overview of Macros in Salesforce



What is the purpose of Macros in Salesforce?

A macro is a set of instructions that tells the system how to complete a task. When a user runs a macro, the system performs each instruction. Macros help your team save time and add consistency.

Users can run macros for the below reasons,

  • To complete repetitive tasks
  • Selecting an email template,
  • Sending an email to a customer,
  • Updating the case status— all in a single click.

You can create macros to perform multiple actions. For example, a macro can enter the subject line of an email and update the case status.A single macro can perform multiple actions on different parts of the case feed at the same time.

How to create Macros in Salesforce?

Follow these steps to create a macro in Lightning Experience.

  1. In your Lightning app, open a record.
  2. Click Macros in the utility bar.(If you don’t have Macros on Utility Bar Please Click here to Know)
  3. Click + or Create Macro.
  4. Enter a name, description, folder, and select the object that the macro applies to.
  5. Click Save
  6. Add instructions for the macro.
    The first instruction is automatically added based on the object you selected from the Apply To field.
    1. Click Edit Instructions.
      The Macro Builder page opens. The left side of the page displays a canvas with a sample record page for the object you selected (1). The right side of the page includes an Instructions tab and Details tab for your macro (2).
  7. Click Add Instruction in right side Instruction Tab
  8. Select Log a Call in left side canvas then select Subject
  9. Give the value for subject in right side Instruction Tab as “Called – Voice Mail”
  10. Select Comments in Left Side canvas and give the comments in right side Instruction Tab as “Tried to call customer but received voice mail left message”
  11. Click Save Button.
  12. Then Again Select Add Instruction
  13. Select Email in left side canvas and select subject
  14. Give the value for subject in Instruction Tab as “Need to Talk “
  15. Select HTML body and give the values as “Tried to Call you but received voice mail. Need to talk to you. Please call me back”
  16. Click Send Button
  17. Click Save and close the Macro Builder Tab.
  18. Open any Lead record and click the Macros in utility bar.
  19. Select the created macro “Voice Mail Macro” and Click Run Macro
  20. Macro run successfully.Click Done.
  21. In Opened Lead the Activities has been updated.

Note : You cannot run macro on List View.