How to automate a screlation batch, between SD and 1 RQ or 1 IM

Hi experts,  i'm working with SM 9.34 and a chatBOT with API Rest that creates interactions (SD) identified as "autogestion".  Some of that SD's are also identifided as "RECLAMO" and the RQnumber or IMnumber that must be related with the interaction.  I need to automate the "screlation" between an interaction (SD) with the RQnumber  or  the IMnumber  collected by the chatBOT
There's a few amount of that kind of interactions (50 per month) :
SD "RECLAMO" a RQnumber
SD "RECLAMO" a IMnumber

Nowadays the relation is made later manually but I need to automate it and I don't know how

Perhaps may be a scheduled script that inserts a record in the screlation table (I add an image as an example)

Any suggestion will be appreciated.  Thanks in advance.

Nora