0% found this document useful (0 votes)
6 views24 pages

Process Automation

The document provides a comprehensive guide on troubleshooting declarative automation in Salesforce, focusing on approval processes and flow automation. It outlines common issues, error messages, and debugging techniques for approval processes, as well as methods for testing and debugging flows. Additionally, it covers monitoring flows, processes, and jobs to ensure smooth operation and resolution of issues.

Uploaded by

Antonio Berrios
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
6 views24 pages

Process Automation

The document provides a comprehensive guide on troubleshooting declarative automation in Salesforce, focusing on approval processes and flow automation. It outlines common issues, error messages, and debugging techniques for approval processes, as well as methods for testing and debugging flows. Additionally, it covers monitoring flows, processes, and jobs to ensure smooth operation and resolution of issues.

Uploaded by

Antonio Berrios
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
Process Automation Given a scenario identify the appropriate tool or method for troubleshooting declarative automation. Table of Contents @ Approval Process Troubleshootin: @ Approval Process Errors @ Approval Process Debuggin 2) Flow Test Automation @ Debugging Flows 2) Debug Flows & Processes @ Monitor Flows, Processes, and Jobs Introduction There are various reasons why a particular automation solution does not behave as expected. In this topic, several scenarios are listed along with the methods to troubleshoot various declarative automation tools available in Salesforce Approval Process Troubleshooting Approval Process Troubleshooting ‘An approval process might not proceed smoothly, resulting in an error message or fai re to complete. COMMON ISSUES Here are the most common scenarios where there may be anisue with ‘an approval pracess and it needs troubleshooting: © ‘Unable to Submit for Approval error © Approval request email notification problems @ “Manager Undefined’ error © Trying tounderstand an Approval Process © Debugging why an Approval Process didnot start © Why ausercan approve any record Approval Process Troubleshooting How tomass transfer Approval requests © “‘Submitfor Approval'button not appearing, © Approving froma Chatter feed © Anapproval step cannot be added © Anapprover cannot approve from amobile device © Approval request in-app or push notifications not appearing, © Why users can/ cannot edit records during an approval process Approval Process Errors Unable to Submit for Approval Error ‘An approval process may result in an error message stating Unable to Submit for Approval SUBMIT FOR APPROVAL The user clicks the Submit for Approval’ button, but an error appears. and the record isnot submitted Unable to Submit for Approval Error ‘SUBMIT ERROR REASONS This typeof error will occur due to any ofthe following reasons: Therecord being submitted doesnot meet the Entry Criteria defined in 5s an Approval Process. i i © The user submitting the record was not specified in the Initial sot tapea ae am © the owner ofthe record being submitted isan inactive user. Unable to Submit for Approval Error © AVOIDING APPROVAL ERROR (One way to avoid this error and to ensure that record is ready for approvals tocreate a formula field that will check ifthe record already ‘meets the Entry Criteria prior to submission, Unable to Submit for Approval Error The Submit for Approval action may result in an ‘Unable to Submit for Approval’ error message. Error Message in Lightning Experience ‘The following approval error message may be displayed in Lightning Experience. Approval Request Email Notification Problems ‘Troubleshooting issues with the approval notification email delivery © EMAIL SETTINGS Ifa user complains that they don't get an an email notification foran approval request it's possible that they have opted out of receiving approval request emails in their personal settings. A system administrator can also change this setting onthe user record. @ EMAIL ADDRESS ‘Asystem administrator should verify thatthe email address of the approver iscorrect. SPAM ‘An approval request email can be considered spam by a mailserver. The email client of the user canbe configured to accept such emails Approval Request Email Notification Problems © IP ADDRESSES ‘The Salesforce email adresses that emails originate from can be allowed. Usually if IP addresses are blocked or filtered, then several MY Users face Issues with email delivery. EMAILLOGS ‘system administrator can check the Email Log to verify that approval request emails are being delivered EMAIL DELIVERABILITY Email Deliverability settings should be checked in Setup to ensure that they are configured correctly. Approval request emails are not sent ifthe access levelis set to’No Access’ 'System emailsonly: Approval Process Email Notifications Options Approver email notification settings are defined in Setup. ‘Approver Setings. Delegates Approver [Admin User Manager Admin User ‘Approval Process Email Notifcations options are set on the User Record ee oor lesorce Newsloter Setings |O8) am an approver ss Jom if | am a delegated approver Recsiv ne Sales news Never 2 Receive ne Slee aris nea = Generate new password and notty user immediatly Email Deliverability Settings Email deliverability settings are defined in Setup. | Deliverability Manager Undefined Error “Manager Undefined Error’ is a common approval error message that relates to the Manager field MANAGER BLANK OR INACTIVE if submitting record for approvalresultsinan error t's posible tat Salesforce red toroute the approval request based ona hierarchical — field such as Manager but the fed has no value orspcites an inactive 23 user ee @ USER RECORD Beforea user submits record for approval ois or her manager the administrator must ensure that hisher user record has an assigned active manager. @ APPROVER ERROR ‘Such an error can also occur when an approver responds to an approval request. Submitting an Approval Request to an Inactive Manager ‘The error message below appears when the approver is an inactive manager. [GEE cst cree te sem coten_stey fonts sane Gn sete per Ate f° [an error appears when Salesforce tries to rout] ‘an approval request to an inactive manager. Approval Process Debugging Debugging Why an Approval Process Did Not Start ‘The debug log displays detalls of evaluations when an approval process is started. sem Warton Oxbungs ‘Renaissance ecg cine, ch. tow hy aie tera ot (Sed ipst ch ats tonne Cher beiharoW ai ohare peso cmegry Let ets Dases inp] SOOL EXECUTE pec soot. EXECUTE eNO. Sos. EXECUTE Stee eta Gascon ct Sarr “1 Flea! statr teh EnRor Pw ELEMENT ERROR AHOCABLE ACTON ENO \wkison [yp] 'ALORTON RULE VALDATION FAL VALOATION PASS: ALOATION ERROR: VALOAION FORMULA Cane b>] AOU REE LEU REGFONGE os ESFOGE 08 RETEREE. ERO ED CEDENTAL REQUEST, ENTERAL SERVICE REGUEST EXTERNAL SERGE RESPONSE Why a User Can Approve Any Record Auser can approve any record even when they are not the assigned approver. KAKA A888 88 Joon ans snnns sy SY Mass Transfer Approval Requests To conduct a bulk transfer of approval requests, use the Mass Transfer Approval Requests option found in Setup. Mass Transfer Approval Processes st greta marge map ery oe Tage apo gn ‘Mass Tanstr Approval Processes Frappr ess et nate oer es “tom =] enone > 0 Sore | eS Submit for Approval Button If the record is not yet been submitted for approval, the Submit for Approval button will be displayed Ses Hane Opporuntion Vv eath Val Rin TO Come Campane Vtnn © flues Entertainment Corp. “ffotow | DasiePrarecumt Newmark NewCanset are = 2 cdot aw Ope 4 coyaszazs8 , omgome Include Submit for Approval Button on the Page Layout ‘Add the Submit for Approval button to the page layout from the Actions section. ‘Qosatnd chore = ‘estore Mobie an Lhning aperence Include Approval History Related List on Page The Approval History Related List displays approval history and current status and actions available. ppv story 2) a sponte Stes eI Approve or Reject Approval Requests Directly from Chatter Feed If Approvals in Chatter are turned on, users receive approval requests as posts in their Chatter feeds. @ ACME Opportunity — John Smith requested approval for this opportunity from Admin User. Opportunity Name ACME Opportunit Close Date 4/10/2016 If activated from Chatter Stage Needs Analysis settings, approvals can directly be Approved or Probability (%) 20% Rejected from the Chatter Feed view. Approval Step Cannot be Added to an Approval Process ‘When additional approval steps are required for an approval process, clone the existing process to ‘add new steps. asa — “Approval steps can no longer be Pek ooo added to approval processes that were once activated, To edit an _existing process it should be cloned. Approver Cannot Approve from a Mobile Device ‘Adjust the Approver Security Settings in Approval Page Layout within the Approval Process to allow approval via mobile. Approval Page Fields Display approval story intamatoninadatont the Held elected above Security Settings Alo aperovers to ‘low approvers the aprox pape only fom within he Salesforce appfcaon (Recommended) Ths approval page For win the [Link] eternal Far WS OAT AERTS Approving via the Mobile App ‘An approval request in the mobile appears as a push notification or an in-app request. If the notification or request does not show, users can check the following configuration: DELIVERY SUPPORTED. CHANNEL APPS Supported delivery | | Supported apps can be channels (desktop and | | enabled or disabled. mobile or both) can be ‘enabled or disabled, Notification Builder Toggles Edit the Notification Delivery Settings in Setup to specify supported channels and applications for approvals. Et Delivery Settings Record Editability Properties ‘Specify who can edit the locked record submitted for approval as part of setting up the ‘approval process. See eet terete — — ‘The Record Editability as ere. — ae the approval process aT a Pa Flow Test Automation Testing Record-Triggered Flows Flow Builder supports automated testing for record-triggered flows. The View Tests button can be used to manage and run tests for the flow. ses aetna eis PES] soe | oe a Creating the Test When creating a test, the test trigger and path to execute are defined. Setting Record Values ‘The intial and updated field values of a record are defined to simulate the saving of a record by a user. Setting Assertions Assertions are defined to verify that the flow operation generated expected results. In this example, the flow is expected to Running the Test Torun the test, a Run Test and View Details option is used, which is available on each test on the Tests table. Debugging Flows View Failed Flows Failed interviews of Screen, Record-triggered, Schedule-triggered, and Autolaunched flow type ‘can be viewed in the Failed Flow Interviews list view in Setup. i Soup tome otenne ~ Debugging Flows Flow Builder allows testing, debugging, and troubleshooting flows using the ‘Debug’ option. DEBUG OPTION Pag DETAILS Wiad Step-by-step details of all operations, actions, and variable assignments can be viewed asthe flow BA exccutes them, NON-DML STATEMENTS. Non-DMAL statements (such as HTTP requests), asynchronous DML statements or actions cannot be rolled back. DEBUGGING AS ANOTHER USER ‘Aflow can berun as another user while debugging n a sandbox org. To enable this feature, one can select the ‘Let admins debus flows as other users’ checkbox in'Process Automation Settings”. When ‘debugging the flow, Run flow as another user’ can be selected in the Debug options, anda user can be selected, Debugging Record-Triggered Flows RUNNING AS ANOTHER USER During debugging, actions and DML operations in arecord-triggered flow can be executed as the specified user. TRIGGERING RECORD Atriggering record can be selected forthe debug run, which triggers the flow asif that records created, updated, or deleted. FLOW RUN OPTIONS. ‘Two options are available forthe debug run behavior of a record-triggered flow. It can be unas it the records created or updated. Using the Debug Option for a Flow ‘The Debug button is available in the button bar area in Flow Builder and is used for testing and troubleshooting a flow. Options Available for Debugging a Flow Clicking on the Debug button opens up the Debug settings window. The following example shows available debug options for a screen flow. Debug fiw De ooton Debug Details and Restarting a Flow Debug information can be viewed in the Debug Details pane. The flow can be restarted anytime while ‘debugging by clicking on the Run Again button. = . Options Available for Debugging a Record-Triggered Flow Various debug options are available for debugging record-triggered flows. Debugging Flows After “Wait for Conditions” Elements ‘When a Wait for Conditions element is used in a flow and configured to resume at a specific time, Flow Bullder provides an option to debug the flow after the element is executed. Debugging Flows After “Wait for Conditions” Elements To continue debugging after the Wait for Conditions element, the Continue the Debug Run button is clicked after the Pause Path is selected, View Transactions Details ‘When debugging schedule-triggered or autolaunched flows with no trigger, details on committed or rolled-back transactions can be Failed Flow Emails When an unhandled error is encountered in a flow interview, an email is sent to either the user who last ‘modified the flow or the Apex exception email recipients. The email contains the following information: ror Occurred During ow “Quick Account This rer occured when the flow tied tocresto ecards: REQ.D wwe & Flow Error Emails NOTES © "evict, flows that i asa result of referencing an invalid record Dinan Update Record element oot send error emails. Startingin the Spring '22release, this flow error sends error email notifications. Failed Flow Interviews Clicking on the filed flow link in the email opens up the saved flow interview in Flow Builder such as the below exemple. This allows more efficient troubleshooting and debugging. Debug an Orchestration DEBUG DETAILS Debug information for orchestration includes details similar to flow debug logs and details on milestones for orchestrations stages, steps, % —_andworkitems detail IN-PROGRESS ORCHESTRATION The "Debug Orchestration actions available for every in-progress runs, Inprogress orchestrations are found inthe Orchestration Runs list view. @ FAILED ORCHESTRATION Failed orchestrations can be reviewed and debugged from the Paused ‘and Failed Flow Interviews page in Setup. Flow Builder and Process Builder Actions NOTES © tansction encounters an error ina proces row any sucessful record changes willbe saved the action eee When an action that supports partial save fails, Salesforce attempts to complete the remaining actions in a bulk operation up to three (3) For failed actions that do not support partial save or follows the alr nothing rule, the entire transaction will berrolled back. °0° Debug Flows & Processes Troubleshooting Flows & Processes When a flow or process fails, steps can be taken to troubleshoot and resolve the issue. © Process Failures Troubleshooting Processes When process fils, the end use sees Debug logs canbe used to find detailed anerror message that contains the information about processes ater they process name, error ID, and sometimes finish running. They appear as flows technical information detailed error and workflow rules in debug gs, The emails also sent to the system log level shouldbe set to FINER for the sdministrator. WORKFLOW log category. & FlowFailures ad Debugging Flows ‘When a flow fails, an email is sent, The ‘Debug’ option ina flow can be which includes the error message from Used totest the flow and observe what thefallure and detail about each flow happens asi runs. ‘element, including user-entered data, Troubleshooting a Failed Process @ Example ‘A developer has defined a process that should be executed when a contact record on Which the value ofthe Title’ field is set to'VP"s created or edited. The process should automatically change the value ofthe ‘Customer Priority’ field on the contact’ parent account record to ‘High’ and create a Chatter post on the contact record with the new value of the field, However, when a sales user updates acontact who is a VP the following error is displayed: Troubleshooting a Failed Process @® Debuesing The email received after the failure of the process can be analyzed: WWW “myVariable_current’ refers to the field ——<—— value when the process was executed, a ‘On the other hand, ‘myVariable_old’ refers to the most recent previous value. Troubleshooting a Failed Process {&} Debugging ‘The emal ceived after the failure ofthe process can be analyzed ee ene Troubleshooting a Failed Process Debugging If auser trace flag has been set. the error can also be viewed inthe generated debug log: Tracking a Flow’s Resource Usage Debug logs can track resource consumption of flows and provide information which can be used for troubleshooting or optimizing flows coed Monitor Flows, Processes, and Jobs Monitoring Flows, processes, and asynchronous Apex can be monitored in Salesforce. @ Monitoring Flows & Processes Paused flow interviews and scheduled actions from processes can be monitored on the ‘Paused And Failed Flows Interviews’ page in Setup. Apex Jobs ‘The Apex Jobs page in Setup can be used to monitor the status of all asynchronous Apex Jobs in Salesforce. Apex Flex Queue in Setup can be used to monitor and reorder the jobs. B Batch Jobs ‘The Batch Jobs page can be used to view only batch jobs. Itis useful when there are many batch jobs. slider can be usedto select a specific date range and narrow down the list of batch jobs. Monitoring Flows, processes, and asynchronous Apex can be monitored in Salesforce. t Scheduled Jobs The ‘Scheduled Jobs’ page in Setup can be used to view all reporting snapshots, scheduled Apex jobs, and dashboards scheduled to refresh. Using SOQL for Monitoring Jobs ‘ASOQL query on AsyncApexdob can be used to obtain information about a submitted job. Information about scheduled jobs can be obtained by running a SOQL query on CronTrigger. Monitoring The Apex Jobs page in Setup can be used to view all the asynchronous Apex jobs, including batch, future, and scheduled jobs. (HUTT Monitoring List ct = [SELECT State, TimesTTiggered, NextFireTime FROM CronTrigger]; [Link] Job State: ° + ct{0}.State); Ll Triggered Flows List View A prebuilt Triggered Flows list view is available for easily checking which object or platform event triggers a flow instead of opening the flow to determine such information. (ford awe] +

You might also like