We’re trying to attach data to a call using the Java interaction SDK against a 7.2 GIS. We are not using UCS and we have tried the following scenarios:
Scenario1:
acceptCall
// wait for events
answerCall
// some period of time passes…
attachCallData
hangup
afterCallWork
finaliseInteraction
Scenario2:
acceptCall
// wait for events
answerCall
// some period of time passes…
hangup
afterCallWork
attachCallData
finaliseInteraction
When we try and attach the data in either scenario we get an error of error.common.BadAttributeType (although we see the attached data being sent over to GIS)
12:52:38.016 Alr 20010 [http-9970-Processor100] com.genesyslab.ail.ws.interaction.impl.InteractionUtils setDTOToInteraction bad attribute type interaction:addAttachedData interactionId Phonecall-0400831771-0131016baae42ee9
12:52:38.039 Dbg 20012 [http-9970-Processor100] com.genesyslab.soa.Trace AIL:com.genesyslab.ail.ws.interaction.impl.InteractionServiceImpl setInteractionsDTO return :
InteractionError–>
attributeErrors :
AttributeError–>
attribute : interaction:addAttachedData
error : error.common.BadAttributeType
interactionError : null
interactionId : Phonecall-234567-0131016baae42ee9
We’ve created code based on what’s in agent interaction sdk 7.2 pdf (pages 103-104) as follows:
public void attachCallData( GenesysAgent agent, String interactionId, Map<String, Object> data ) {
try {
Set<String> dataKeys = data.keySet();
AttachedData[] allAttachedData = new AttachedData[dataKeys.size()];
int keyLocation = 0;
for (String key : dataKeys) {
AttachedData attachedData = new AttachedData();
attachedData.setKey(key);
attachedData.setValue(data.get(key));
allAttachedData[keyLocation++] = attachedData;
}
KeyValue keyValue = new KeyValue();
keyValue.setKey("interaction:addAttachedData");
keyValue.setValue(allAttachedData);
InteractionDTO interaction = new InteractionDTO();
interaction.setData(new KeyValue[] { keyValue });
interaction.setInteractionId(interactionId);
InteractionError[] errors =
this.connection.getInteractionService()
.setInteractionsDTO(new InteractionDTO[] { interaction });
if (null != errors) {
// process errors...
}
} else {
success = true;
}
} catch (Exception e) {
// Handle exceptions...
}
}
The documentation states that we should be using interaction:addAttachedData
GIS says otherwise! I’ve tried this on our lab environment (against TServer SIP) and at a customer installation both with the same results.
We’ve got consult-user-data set to joint in the configuration.
Thanks,
David