Hi Vertika,
One option is to fill the custom table with failed and pass status record (with IDOC number) and read the table periodically with some program and raise the alert on failed status.
The CCMS alert configuration can be refer to below blogs
Configuring scenario specific E-mail alerts in XI-CCMS: Part 3
Configuring scenario specific E-mail alerts in XI-CCMS: Part-2
regards,
Harish