Pull extra location data on UI action from interaction record to CSM case

cassie-le
Tera Guru

Hey 

 

Wondered if anyone can help we have interactions set up for Agent Chat, where a customer (contact) is attached to a location and Account, we want to be able to create a case from the interaction record and pull extra location data onto the case record. 

We have this working the Contact, location, Account (all fields on the interaction) 

But whenever we add more fields e.g.:

newRecord.setValue("u_site_number", current.getValue("location.u_site_id"));
 
This doesn't pull anything through, we have tried the below too to query the location table but that just makes it so the case form doesn't load at all:
 
var locationGR = new GlideRecord('cmn_location');
    locationGR.initialize();
    locationGR.addQuery("name", current.getValue("location"));
    locationGR.query();
    newRecord.setValue('u_site_number',locationGR.getValue('u_site_id'));
 
Has anyone got any ideas on how to do this? 
We're on Utah Patch 9 Hotfix 1a
1 ACCEPTED SOLUTION

cassie-le
Tera Guru

For anyone looking at how to do this I managed to work this out:

I created a field on the interaction table for each field I wanted to pull over, 

Then I've got a Flow that on the creation of an interaction it looks up the location and the contact details and updates the fields I created. 

Then in the UI action added the fields from the interaction table to go through into the new case!

View solution in original post

1 REPLY 1

cassie-le
Tera Guru

For anyone looking at how to do this I managed to work this out:

I created a field on the interaction table for each field I wanted to pull over, 

Then I've got a Flow that on the creation of an interaction it looks up the location and the contact details and updates the fields I created. 

Then in the UI action added the fields from the interaction table to go through into the new case!