Hi,
Customer needs that when agent updates a custom field by RecordProcessed or UpdateCallCompletitionStats, all chains in that record, update the same value.
Say, if for example, at the start of call we have for chain_id = 73
I have tried the option update_all_records = true but doesn’t seem to work in the way is needed.
Worst if we do a Reschedule to a new number, then the reschedule doesn’t bring the value and is useless at the end.
What would I need to do to update all chains in that chain_id?
Multiple UpdateCallCompletitionStats? For I have tried won’t work as seems to update only 1 record always.
I don’t know how this can be achieved in Genesys either, but you can have a trigger on the DB that does the trick (as long as the record is not on “retrieved” state, you should be able to use this)
create or alter trigger dbo.trg_update_chain_data
on <your table name here>
after update as
declare @chainid int
declare @custfield varchar
begin
if trigger_nestlevel() <= 1 -- this prevents recurstion on the trigger
begin
if exists (select 1 from deleted where (cust_field = '') or (cust_field is null) )
and exists (select 1 from inserted where (cust_field <> ''))
begin
select @chainid = chain_id from inserted
select @custfield = cust_field from inserted
update <your table name here> set cust_field = @custfield where chain_id = @chainid
end
end
end
For Oracle, I have to dig a little bit more to check how to prevent trigger recursion