Creating an email alert for Medallia API errors
Configure a basic record-triggered flow to alert designated administrators in your Salesforce org when specific Medallia API errors occur while processing invitations through the queue.
To set up the record-triggered flow:
On Setup, use quick search to find the Flows option.
Click Flows.
Click New Flow.
Select the option Record-Triggered Flow, then click Create.
Set the flow conditions as follows:
Object — medallia_xm__Log__c (Log)
Trigger the Flow When — A record is created
Set entry conditions as follows:
Condition Requirements — Custom Condition Logic is Met
Condition Logic — (1 OR 2 OR 3) AND 4
Condition 1:
Field — medallia_xm__message__c
Operator — Contains
Value — StatusCode=503
Condition 2:
Field — medallia_xm__message_c
Operator — Contains
Value — Service Unavailable
Condition 3:
Field — medallia_xm__StackTrace__c
Operator — Contains
Value — Message Read timed out Stack Trace Class.medallia
Condition 4:
Field — medallia_xm__Level__c
Operator — Equals
Value — ERROR
Click Add Element.
Select Assignment.
Enter a label and assign the API name.
Set the variable value by clicking Variable, and selecting New Resource.
Select Variable.
Set the variable details as follows and click Done.
API Name — Error_Message.
Data Type — Variable.
Set the value to Record — Message.
Click Add Element.
Select Action.
Select Email as the Category, then click Action and select Send Email.
Enter in the details for the send email action:
Label — Send Medallia API Error Email
Body — Tic Include and select
Error_Messagevariable on the dropdown list.Recipient Address List — Tic Include and enter the email addresses for the designated recipients of the alert email.
Subject — Tic Include and enter in the email subject.
Click Done.
On the top bar, click Save.
Enter a descriptive flow label and assign the API name.
On the top bar, click Activate.
When a timeout error occurs and is logged, your designated administrators receive an email alert from Salesforce while this flow is active.
