Author Topic: get contact name using IContacService  (Read 2753 times)

Offline innspiron

  • Newbie
  • *
  • Posts: 10
  • Karma: -1
get contact name using IContacService
« on: July 12, 2018, 09:08:17 AM »

Genesyslab.Enterprise.Services.IContactService contactService = container.Resolve<IEnterpriseServiceProvider>().Resolve<Genesyslab.Enterprise.Services.IContactService>("contactService");

Now I have contactService , but I still cannot get contact firstname and lastname :( What method I should use for it?

Here documentation for that but still I could not figure out how: https://docs.genesys.com/Documentation/GDP/7.6.6/AISDeveloper/TheContactService#Example_of_ContactAttributeMetaData_and_ContactAttribute
« Last Edit: July 12, 2018, 04:27:05 PM by innspiron »

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: get contact name using IContacService
« Reply #1 on: July 12, 2018, 05:05:16 PM »
Maybe this:
http://www.sggu.com/smf/index.php?topic=9603.0
http://www.sggu.com/smf/index.php?topic=7892.0

Offline innspiron

  • Newbie
  • *
  • Posts: 10
  • Karma: -1
Re: get contact name using IContacService
« Reply #2 on: July 12, 2018, 05:40:32 PM »
Maybe. But it I guess it should be less complicated way.

Offline innspiron

  • Newbie
  • *
  • Posts: 10
  • Karma: -1
Re: get contact name using IContacService
« Reply #3 on: July 15, 2018, 03:13:43 PM »
This is what I end up with (taken from http://www.sggu.com/smf/index.php?topic=9139.0):
[code]IContactService contactService = container.Resolve<IEnterpriseServiceProvider>().Resolve<Genesyslab.Enterprise.Services.IContactService>("contactService");
                Core.SDK.Protocol.IChannelManager channelManager = container.Resolve<Core.SDK.Protocol.IChannelManager>();
                IClientChannel channel = channelManager.Register(container.Resolve<Genesyslab.Desktop.Modules.Core.SDK.Contact.IContactService>().UCSApp, "My@ContactService");
                AttributeList attributeList = new AttributeList();
                if (channel != null && channel.State == ChannelState.Opened)
                {
                    contactService.GetContact(channel, contactID, attributeList);
                }[/code]

But I got time out from request:

[code]ESDK: 18-07-15 17:31:49.978 [45] DEBUG ESDK - Found constructor with 2 parameters
ESDK: 18-07-15 17:31:49.980 [45] DEBUG ESDK - Parameter [Type] System.String [Position] 0
ESDK: 18-07-15 17:31:49.982 [45] DEBUG ESDK - Parameter [Type] System.Boolean [Position] 1
ESDK: 18-07-15 17:31:49.983 [45] DEBUG ESDK - Media object getContact created
ESDK: 18-07-15 17:31:50.021 [45] DEBUG ESDK - Sending request [Id] 24 Msg [Name] RequestGetAttributes Channel [Name] UCS [Uri] tcp://192.X.X.XXX:XXXX/
ESDK: 18-07-15 17:31:50.023 [45] DEBUG ESDK - [Tx::RequestManager] 1 pending request
ESDK: 18-07-15 17:31:50.024 [ 1] DEBUG ESDK - Proxy [BeginInvoke] Thread [Id] 1 Storing Request [Name] ? [ReqId] 24
ESDK: 18-07-15 17:31:50.026 [ 1] DEBUG ESDK - Proxy [EndInvoke] Thread [Id] 1 Waiting for [ReqId] 24
ESDK: 18-07-15 17:32:00.025 [ 1] WARN  ESDK - Proxy [EndInvoke] Timeout on internal [ReqId] 24(?) Submitted [ReqId] -1 after (9997,8729 ms)
{Id=XXXXX}
    Attributes: {Genesyslab.Enterprise.Model.Contact.ContactAttributeList}
    ContactId: "XXXXX"
    EmailAddress: null
    FirstName: null
    FullName: null
    Genesyslab.Enterprise.Model.Contact.IContact.Attributes: {Genesyslab.Enterprise.Model.Contact.ContactAttributeList}
    Interactions: null
    LastName: null
    PhoneNumber: null
    Title: null
    UEID: null
    attributes: {Genesyslab.Enterprise.Model.Contact.ContactAttributeList}
    interactions: null[/code]

Any help would be appreciated :)
« Last Edit: July 15, 2018, 03:16:14 PM by innspiron »

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: get contact name using IContacService
« Reply #4 on: July 15, 2018, 04:06:11 PM »
And what does UCS logs say?

Enviado de meu E6633 usando o Tapatalk