Thank you Melissa, you confirmed what I was thinking. I will raise an Idea for a Find Wrapup Code function.
Original Message:
Sent: 03-07-2023 11:43
From: Melissa Bailey
Subject: Datatable controlled Wrap Codes
ToWrapupCode is one of the less useful functions. If you look at the documentation, it accepts either a null value or a WrapupCode value.

It does not have an overload that accepts a string value. The ToX function that return more basic types (string, int, bool, etc) can convert a string to the desired type but the ToX functions that return a object (like a wrapupcode, queue, user, etc) can't. For those object types you need to use the Find actions (Find User, Find User By Id, etc) or functions (FindUser, FindQueue, etc). However we do not have find actions/functions for wrapup codes, so see https://help.mypurecloud.com/articles/convert-string-value-typed-value/
------------------------------
Melissa Bailey
Genesys - Employees
Original Message:
Sent: 03-07-2023 11:29
From: Hannah Wrigley
Subject: Datatable controlled Wrap Codes
Hi All
Apologies I am new to posting in the community, so forgive me if this is not the correct place to ask this question.
I have a datatable that contains DID numbers, prompt names and some other data. Part of the data on this table matches a configured wrap code in the system, I am attempting to programme an update data node (whisper) with data collected from the datatable.
I believe the function required is: ToWrapupCode(Variable from datatable response)
There is no ability to find Wrap Code or search for the required text in any other way, using the above expression I return the error: 'ToWrapupCode' at position 1 : There is no implementation that accepts a parameter of type String.
Does anyone have any idea if what I am attempting to do is even possible? or able to offer any advise?
Kind Regards
Hannah
#ArchitectureandDesign
------------------------------
Hannah Wrigley
Bupa Insurance Service Limited
------------------------------