Trying to look up external contact using chat participant data

I have a working demo site that has Genesys Messenger configured. I'm sending dynamic participant data to the chat interaction and I can see it inside the Interaction detail (see screenshot attached). I'm having difficulty understanding the getExternalContact API call and have no idea how to parse it or allow me to use it inside the flow in any way.

I want to search for an external contact using the participant data I sent over (customerID) and once matched (if there's a match) check for other attributes inside that external contact to set different routing strategies.

How can do I this? I've tried using GetExternalContact but I haven't found any examples on the proper usage of this nor how to then save that search and use it in my flow.

Please, any guidance would be greatly appreciated.

I've found that the built in functions for External contacts aren't quite as useful as I would like and had to create data actions to do what i needed (Searching by a customer identifier eg customer number or account number and assigning a call/email/message to that contact)

There is a Search for External Contact block, however this can only search by Phone Number, email address or Twitter handle so not really useful in your case.

We use /api/v2/externalcontacts/contacts,
which can search by custom attributes and if the data action is set up right can return all of the fields for the contact including custom attributes
below is a screenshot of how an output contract could be setup

Thanks! Using Data Actions resolved the issue.