Hello Viacheslav,
in general IC alerts consist of two parts:
- a rule (which conditions have to be met before the alert will be shown, in your case it's "Partner confirmed" event for example).
- an alert itself (static or dynamic text which will be shown if a rule execute the action "Show alert").
Alerts, as I said, can have dynamic attributes. These attributes can be filled in ABAP with the logic you desire. You can maintain alerts texts and insert dynamic attributes in them in IC_MANAGER role (IC_MANAGER -> Process Modeling -> Alerts). While you're editing an alert you can insert attributes there.
To make a new your own attribute available there you have to extend ICRULE context under IMG -> CRM -> E-mail Response Management System -> Define Repository. And also create a fact gathering service for it. More details can be obtained for example here SAP CRM: Alerts in the header of the IC Webclient
Hope this will help you.