can i have more information about the facade command to create interaction ?

chercm
Mega Sage

hi 

 

i am trying to make use of the following commands to create interaction 
 
 
 
var facade = new sn_walkup.ExtPointUtil().loadExtension("InteractionFacade");
facade.createInteraction(
. is there any documentation on the facade command >? 
2 REPLIES 2

Community Alums
Not applicable

Hi @chercm ,

You can find all the information here :https://developer.servicenow.com/blog.do?p=/post/walk-up-experience/

 

@Community Alums I tried to find on the internet for this, not much examples 

 

if this all the parameters associated with the function : 

 

// Instantiate the InteractionFacade
var facade = new sn_walkup.ExtPointUtil().loadExtension("InteractionFacade");

// Define parameters for the new interaction
var params = {
userId: 'some_user_id', // Replace with the actual user Sys ID
locationId: 'some_location_id', // Replace with the actual location Sys ID
interactionType: 'walk-up', // Replace with the actual interaction type
description: 'User came in for assistance with their laptop.', // Description of the interaction
subject: 'Laptop Assistance', // Subject of the interaction
assignedTo: 'some_agent_id', // Optional: Replace with the actual agent Sys ID if needed
badgeId: 'some_badge_id' // Replace with the actual badge ID
};

// Create the interaction
var interaction = facade.createInteraction(params);

// Check if the interaction was created successfully
if (interaction) {
gs.info('Interaction created with ID: ' + interaction.sys_id);
} else {
gs.error('Failed to create interaction.');
}