CA Service Management

  • 1.  How to reference special handling in spell_code

    Posted Oct 24, 2017 06:12 AM

    Hi Communities

     

    Where trying identify, special handling in spell, but can't figure out which field can be referenced. We have automated SLA's and we need add a client's specific SLA's to the script that calculates sla's and ad's the service types to the call.

     

    We added special handling to the user we are trying to identify and add there SLA to the call. The way we doing it is special handling.

     

    Specail handling lrel's and qrel's and Brel's:

     

    This is what we trying to add :

     

    else if (customer.cnthandling_list = 400153)
      {
      logf(SIGNIFICANT, "The contact for incident %s is Client_name", ref_num);
      }

     

    Has anybody done this before and please just point me in the right direction would help. I understand CA doesn't like spell, but it's the only way we can do this our org's is the same and user are not tenanted to this clients tenant.

     

    Regards

     

    Edgar Louw



  • 2.  Re: How to reference special handling in spell_code

    Posted Oct 24, 2017 08:57 AM

    Hi,

    you need to perform search over LREL table:

    int zcount, msg_i;
    send_wait(0, top_object(), "call_attr", "contact_handling", "sync_fetch", "STATIC", format("contact = U'%s' and special_handling = 400153", customer.id),  -1, 0);
    if (msg_error()) {
         logf(ERROR, "%s > sync_fetch failed", persistent_id);
         for (msg_i = 0; msg_i < msg_length(); msg_i++)
              logf(ERROR, "%s > msg[%d]: %s", persistent_id, msg_i, msg[msg_i]);
    } else {
         zcount = msg[1];
         if (zcount == 1) {
              // Data found, conact have special handling
         } else {
              // Data not found, conact haven't special handling
         }
    }

    Regards,

    cdtj



  • 3.  Re: How to reference special handling in spell_code

    Posted Oct 24, 2017 09:24 AM

    will have a look Awesomeness



  • 4.  Re: How to reference special handling in spell_code

    Posted Oct 24, 2017 09:25 AM

    cdtj thanks for prompt reply



  • 5.  Re: How to reference special handling in spell_code

    Posted Oct 24, 2017 09:31 AM

    Hi cdtj

     

    Can you Modify that Query to reference a specific type and not all special handlings types. Have you tried that or have client requested it like with our problem now, as we have to do it for one specific special handling not all.



  • 6.  Re: How to reference special handling in spell_code
    Best Answer

    Posted Oct 25, 2017 07:38 AM

    I used handling type (id = 400153) from your example:

    send_wait(0, top_object(), "call_attr", "contact_handling", "sync_fetch", "STATIC", format("contact = U'%s' and special_handling = 400153", customer.id), -1, 0);

    contact_handling is factory which stores relation between contacts and specail handlings, so if you found data row matches search query - handling exists.

     

    to validate this query you can simply check it using sql or try to use more obvious dot referenced query like:

    send_wait(0, top_object(), "call_attr", "contact_handling", "sync_fetch", "STATIC",
    "contact.userid like 'testuser' AND special_handling.sym like 'VIP'"
    -1, 0);
    logf(SIGNIFICANT, "found: %d rows", msg[1]);

     

    Regards, cdtj



  • 7.  Re: How to reference special handling in spell_code

    Posted Oct 26, 2017 02:56 AM

    HI CDTJ

    Awesome really thank you, I will try this and see, if I can get it to work thanks a lot. There is some awesome people on the forums and helpful thank you.

     

    Thanks

    CDTJ



  • 8.  Re: How to reference special handling in spell_code

    Posted Oct 26, 2017 03:16 AM

    you are welcome



  • 9.  Re: How to reference special handling in spell_code

    Posted Oct 26, 2017 08:23 AM

    Thanks Edgar13 - I agree, I think this is a great community with very talented folks!!  Keep the sharing going and pay it forward

    Let us know if cdtj's suggestion works for you.

    Jon



  • 10.  Re: How to reference special handling in spell_code

    Posted Oct 26, 2017 08:50 AM

    HI Mr Jon

     

    I will Post if and when this works.



  • 11.  Re: How to reference special handling in spell_code

    Posted Oct 30, 2017 04:43 PM

    Hi, Edgar13 - any luck on this one with the code?



  • 12.  Re: How to reference special handling in spell_code

    Posted Oct 31, 2017 02:53 AM

    HI Jon

     

    Nope, we haven't yet. Just busy with other custom stuff . Sorry guys we are very busy. Will let you know. But we are going to and post on this forum the outcome.