How to close all related interactions of a case , when the case is closed ?

Buddy 1
Tera Contributor

Hi,

Requirement:

Close all associated interactions of a case, when the case is set to closed.

 

How to achieve this in BR? 

Thanks in advance!

 

1 REPLY 1

SatyakiBose
Mega Sage

Hello @Buddy 1 

As per the OOB design of Case & Interaction relation, only 1 interaction can be associated with a case.

When a new interaction lands, the agent gets the Create Case, option, wherein the Case:Interaction is 1:1 relation.

This relation is stored in interaction_related_record table.

The expected OOB steps are:

  • Interaction is created
  • Case is created from interaction
  • Interaction is closed (this does not necessarily means that case is also closed)

However, it seems your requirement is the other way round.

For that you might want to consider a customization where:

  1. you run a query on the document_id field on interaction_related_record table to match the case record.
  2. get the list of interactions associated with it.
  3. update the interaction state for the records fetched from step 2 above.