Author Topic: IWS - Read custom field and update attach data  (Read 4680 times)

Offline luca.assandro

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
IWS - Read custom field and update attach data
« on: April 07, 2015, 01:57:59 PM »
Hi everybody
I'm starting with the first customization iws and I have a problem to continue .
I added a combobox in the region " ToolbarWorksheetButtonRegion " with some reasons for outbound calls .
before you can make a call , the agent must choose a reason ; to do this, I change the ChainCommand " MediaVoiceMakeCall " entering my custom command " ControlloMotivazioni " .
in " ControlloMotivazioni " I have to check that the combobox is completed and assign that value to a attach data ... but I can not get the value from the combo box and I do not find a way to change the attach data .
can you help me please?

Thank you
Bye
Luca

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: IWS - Read custom field and update attach data
« Reply #1 on: April 07, 2015, 04:22:24 PM »
And why not use own functions from IWS who already provide that??

Offline abudwill

  • Full Member
  • ***
  • Posts: 157
  • Karma: 4
Re: IWS - Read custom field and update attach data
« Reply #2 on: April 07, 2015, 09:20:06 PM »
The question isn't entirely clear to me.

I interpreted it as: "How can I create some sort of dependency that needs to be fulfilled before an agent can initiate an outbound dial", presumably during a preview or push preview interaction.

Cavagnaro, not sure I know how to do this without customization, are you aware of bits in IWS that can fulfill this without customization?

luca.assandro,

Assuming for a second there is not a way to do this native in IWS - you could bind the value of the ComboBox to some static class variable or dictionary.  Alternatively you can try to resolve the instance of your view model in your custom command.  Then from within your custom command you can refer to the value.  Additionally, look at the ICase interface in the IWS APIs.  There is a MainInteraction property which gives you a reference to the interaction.  Once you have a reference to the interaction you can use method SetAttachedData to add attached data to the interaction.

Regards,
Andrew

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: IWS - Read custom field and update attach data
« Reply #3 on: April 07, 2015, 09:33:51 PM »
Well, Disposition Codes can but after the call, not before... Why before?
You create a business attributes and attach it's name via strategy and IWS options. Make it mandatory and will satisfy the need, I think so...

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: IWS - Read custom field and update attach data
« Reply #4 on: April 07, 2015, 09:34:43 PM »
Before the call is no interaction to attach to, just saying

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: IWS - Read custom field and update attach data
« Reply #5 on: April 08, 2015, 10:36:13 AM »
I have achieved it through commands. I have added before command (VoiceMakeCall) own logic. Within this logic the values from combobox are used (value reffering via interface) and if the validation is ok, the call is dialed.

From my point of view, the hint about using static dictionary is not good way.

Offline luca.assandro

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: IWS - Read custom field and update attach data
« Reply #6 on: April 08, 2015, 02:18:57 PM »
Thank guys
I created a static class to check the combobox values, then in chain of command "ShowInteractionsWindow" that value is saved by "SetAttachData" methond of Interaction interface.

Thanks
Bye
Luca

Offline abudwill

  • Full Member
  • ***
  • Posts: 157
  • Karma: 4
Re: IWS - Read custom field and update attach data
« Reply #7 on: April 08, 2015, 07:53:41 PM »
Kubig,

Agree that static dictionary is not a best practice.

From time to time I have run into problems getting references to things from within my custom command code.  Out of curiosity, how do you end up getting values from your WPF controls (ComboBox in this case) from your custom command code?

Regards,
Andrew