How to Format Error Messages in Workflow

Hello everyone,

I’m currently configuring a workflow in SailPoint IdentityNow to identify errors within the last few hours. However, I’ve encountered an issue where the error messages being generated are too repetitive and lengthy, making them difficult to read.

The current messages list every individual failure, even when the errors are of the same type and affect the same objects. For example, if the same error occurs multiple times on the same object, it’s listed separately for each occurrence, resulting in a cluttered and confusing message. image below

<html>
   <head></head>
   <body>
      Prezado(a),<br/><br/>
      Identificamos os seguintes erros durante o processo:
      <br/><br/>
      <b>Falha :</b> <FONT COLOR="RED">${erro}  </b> <FONT COLOR="BLACK"> em </FONT>   ${erro2}  </FONT><br/><br/>
      Por favor, verifique os detalhes acima e tente novamente. Se os problemas persistirem, entre em contato com o suporte técnico.
      <br/><br/>
      Telefone para contato com o suporte técnico:
      <br/>
      (11) 999999999
   </body>
</html>

I’m looking for a way to group these errors by type and affected object so that the message is more concise and easier to understand. Ideally, I would like the final message to summarize the errors, grouping them by type and object, rather than listing each one individually.

Does anyone have experience with this or could offer advice on how to implement this in a SailPoint workflow?

Hi @clebercarvalhoRaise ,

If you want to summarize it neatly in a table, like below:

image

You can use the body of the “Send Email” Action as:

<html>
   <head></head>
   <body>
      Prezado(a),<br/><br/>
      Identificamos os seguintes erros durante o processo:
      <br/><br/>
      <b>Falha :</b> 
	  <table style="border: 1px solid black;border-collapse: collapse;">
        <tr>
			<th style="border: 1px solid black;border-collapse: collapse;font-size:12px;">Action</th>
            <th style="border: 1px solid black;border-collapse: collapse;font-size:12px;">Attribute Values</th>
		</tr>
		 #foreach($error in ${erro})
			<tr>
			<td style="border: 1px solid black;border-collapse: collapse;font-size:12px;">$error.action</td>
			<td style="border: 1px solid black;border-collapse: collapse;font-size:12px;">$error.attributes.attributeValue</td>
			</tr>
		#end
		</table>
	<br/><br/>
      Por favor, verifique os detalhes acima e tente novamente. Se os problemas persistirem, entre em contato com o suporte técnico.
      <br/><br/>
	  
      Telefone para contato com o suporte técnico:
      <br/>
      (11) 999999999
   </body>
</html>

with the Templating context as: {"erro.$":"$.hTTPRequest.body"}

HTH

2 Likes

thanks very much :heart:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.