As far as I know, actually this should be done with IInteraction.SetAttachedData, in a way that SIP Server/T-Server can send data related to the call after it is released as EventUserEvent.
Refer to the following links:
https://docs.genesys.com/Documentation/GIM/latest/Dep/GIMKVPs
[quote]
Some agent desktop applications issue UserEvents to set KVP data after the agent’s participation in the voice interaction has completed (that is, after the call is released). Other components or applications, such as Genesys Mobile Services (GMS), also send data in UserEvents to enable integration with Genesys Info Mart for historical reporting on application usage or performance. You can configure an ICON application that captures Voice details to store UserEvent-based KVP data in its IDB. When you configure the ICON application, you use ICON application configuration options — instead of the attached-data specification XML file — to specify which KVPs ICON should store. Then you can configure Genesys Info Mart to extract this data from the IDB G_CUSTOM_DATA_S table.
[/quote]
https://docs.genesys.com/Documentation/ICON/latest/UG/UDataCustStates
[quote]
If it has been configured to support custom states, ICON stores common data from EventUserEvent in two tables that are created by the IDB initialization script: G_CUSTOM_DATA_S and G_CUSTOM_DATA_P. You can configure unique keys to store values of customer-defined keys. Duplicate key names in the attached data are not supported.
[/quote]