" /> Outbound - Remove record using GAD / GAS - Genesys CTI User Forum

Author Topic: Outbound - Remove record using GAD / GAS  (Read 5630 times)

Offline Adam_W

  • Full Member
  • ***
  • Posts: 171
  • Karma: 0
Outbound - Remove record using GAD / GAS
« on: July 06, 2011, 11:17:27 AM »
Advertisement
I have a bit of a minefield of a request!

I have an implementation where agents use GAD and GAS (Genesys Agent Scripting) to manage calls.  For outbound, there is a custom callback script which, as well as allowing them to schedule the callback, also allows them to add a new record for a customer (for example to add an additional contact number).  This basically adds a new record for that customer to the calling list in the same chain as the existing record.

They also want to be able to amend existing records, for example the customer does not want to be contacted on the current number any more, or one of the other numbers held for the customer is incorrect / out of date.

On top of this, they also need to be able to remove records completely.  Again maybe one of the numbers held is incorrect but does not need replacing with anything, it should just be removed.

Is there a viable way of doing this?  My concern with amending and deleting records is that if the records have already been retrieved by OCS, any changes probably won't work anyway, plus removing records may disrupt the chain etc.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Outbound - Remove record using GAD / GAS
« Reply #1 on: July 06, 2011, 05:41:57 PM »
Delete is not an option, but can cancel a record by sending an order to OCS, you can find the scenario where you delete the record from the DB but it is already on OCS buffer so it will dial it anyway...while using the Cancel OCS will acknowledge it and simply not call it anymore. More details are on the OCS guides

Offline fnunezsa

  • Full Member
  • ***
  • Posts: 213
  • Karma: 5
Re: Outbound - Remove record using GAD / GAS
« Reply #2 on: July 06, 2011, 10:25:06 PM »
Have you considered to use the DNC functionality? DNC can be based either on phone number or customer_id

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: Outbound - Remove record using GAD / GAS
« Reply #3 on: July 11, 2011, 06:06:47 PM »
Hi Adam,

I would recommend you to use combination of what Cav and fnunezsa have proposed in their post - either Cancel the record (number) or add it to DNC (Do Not Call) list - depending on customer's request. Both operations are supported by OCS so modification of your script should be possible as it uses OCS API already.

R.

Offline Adam_W

  • Full Member
  • ***
  • Posts: 171
  • Karma: 0
Re: Outbound - Remove record using GAD / GAS
« Reply #4 on: July 12, 2011, 04:44:13 PM »
Thanks guys, I think Cancel will be the way to go in this case.  I had a function which did this but it cancelled every record in the chain.  I see how to do it per record now in the Outbound Reference Manual.

Will have a go later!

Offline Adam_W

  • Full Member
  • ***
  • Posts: 171
  • Karma: 0
Re: Outbound - Remove record using GAD / GAS
« Reply #5 on: July 14, 2011, 09:49:45 AM »
OK, so I've created the content for a UserEvent using TKVLists and TKVPairs as per the documentation.

What I'm not sure about is how to wrap these into a UserEvent and then send the event.  Presumably there is a UserEvent type and SendUserEvent method in some library but I'm not sure where.  Any ideas?

This is my code so far:

[code]
Genesys.ComLib.TKV.TKVList list1 = new Genesys.ComLib.TKV.TKVList();

Genesys.ComLib.TKV.TKVPair pair1 = new Genesys.ComLib.TKV.TKVPair("GSW_CM_MessageType", 30);
int pairAdded = list1.TKVListAddPair(pair1);

pair1 = new Genesys.ComLib.TKV.TKVPair("GSW_CM_AttrOriginAppID", 198);
pairAdded = list1.TKVListAddPair(pair1);

pair1 = new Genesys.ComLib.TKV.TKVPair("GSW_CM_AttrTargetAppID", 146);
pairAdded = list1.TKVListAddPair(pair1);


Genesys.ComLib.TKV.TKVList list2 = new Genesys.ComLib.TKV.TKVList();

Genesys.ComLib.TKV.TKVPair pair2 = new Genesys.ComLib.TKV.TKVPair("GSW_PHONE", phone);
pairAdded = list2.TKVListAddPair(pair2);

pair2 = new Genesys.ComLib.TKV.TKVPair("GSW_CAMPAIGN_NAME", campaign);
pairAdded = list2.TKVListAddPair(pair2);

pair2 = new Genesys.ComLib.TKV.TKVPair("GSW_CHAIN_ATTR", "RecordOnly");
pairAdded = list2.TKVListAddPair(pair2);


Genesys.ComLib.TKV.TKVList list3 = new Genesys.ComLib.TKV.TKVList();

Genesys.ComLib.TKV.TKVPair pair3 = new Genesys.ComLib.TKV.TKVPair("cancel_record", list2);
pairAdded = list3.TKVListAddPair(pair3);

pair1 = new Genesys.ComLib.TKV.TKVPair("GSW_CM_AttrProperties", list3);
pairAdded = list1.TKVListAddPair(pair1);
[/code]

Offline Adam_W

  • Full Member
  • ***
  • Posts: 171
  • Karma: 0
Re: Outbound - Remove record using GAD / GAS
« Reply #6 on: July 16, 2011, 04:47:06 PM »
I managed to put a UserEvent together and send it.  The format seems to be exactly as per documentation:

[code]
16 07 16:57:49:470 [TelephonyExecutor-35] DEBUG          Ail.Lagaffe  @@ Lagaffe.Deployer.Inner.AilModule -> Lagaffe.Deployer.Ail7.Ail7Driver : Ail7EventDnUserEvent
        AgentId                  TTrain1
        PlaceId                  Place_8013
        DnId                      8013@SIP-01
        DnEventEventReason        User event
        DnStatus                  After call work
        Source                    *****
        UserData                  Map
                GSW_CM_AttrOriginAppID = 198
                GSW_CM_AttrTargetAppID = 146
                GSW_CM_MessageType = 30
                GSW_CM_AttrProperties = Map
                        cancel_record = Map
                                GSW_CHAIN_ATTR = RecordOnly
                                GSW_PHONE = 74401908210686
                                GSW_CAMPAIGN_NAME = TESTCAMP
[/code]

But the event isn't being processed properly.  Error msg below:

[code]
16 07 16:57:49:470 [      Ail7Publisher] INFO              GD.Core  HandleUserEvent : key GSW_CM_AttrProperties has been ignored : neither a String nor an Integer [realtimeSession /getEvents/26/, place Place_8013, person TTrain1]
[/code]

The value for "GSW_CM_AttrProperties" isn't supposed to be a string or integer, it's a TKVList!  Should I be using a different sendUserEvent method that accepts those types?