Integrations and APIs for Service

Get Involved. Join the Conversation.

Topic

    Robert Poldervaart
    External Events - source of event
    Topic posted May 31, 2012 by Robert PoldervaartBlue Ribbon: 750+ Points 
    443 Views, 2 Comments
    Title:
    External Events - source of event
    Content:

    I'm not sure if this is the right forum or not, and I know there isn't a lot of documentation on external events.  But I need to check the source of the change that triggered an answer update event.  By setting the EE_ANS_UPDATE_HANDLER , the answer update event fires for all answer updates.  I need it to fire for only answer updates that occured due to an XML API update.  So I would like to exit the php code if the source of the change event is not XML/API.  Does anyone know how to check the source of the event within the event handler php code?

    In the event handler php code, I see the use of the external event file - ee_file_name.  Does anyone know the format of this csv file?   The existing code shows it only pulling the first field, the answer id.  I'm curious if there are more data that might describe the event, including the source of the answer update that triggered the event.

    Failing that, I can query the transactions table and answers table and see a list of transactions for a particular answer.  I could try to find the latest edit and look at the tranaction source lvl1 and lvl2 fields. 

    Thanks for any help, and sorry if this is not the correct forum.

    Robert

    Code Snippet:

    Comment

     

    • Pathaksa Tongpitak

      The contents of the $ee_file_name can be configured by using a Connector template which you can edit using the RightNow FileManager in the console (just search for the Connector in the dropdown).

      In the connector directory you can have the following incident template:

      incident_csv.tmpl

       

      The contents of this file contains field separated with |,| like this:

      |incidents.i_id|,|incidents.subject|

       

      You can add more fields yourself and then in your external event explode the values using "|,|"

       

      Good luck

    • Robert Poldervaart

      Hi Pathaksa,

      Thanks for the reply.  I looked in the file manager and couldn't find a Connector item in the dropdown list.  I wonder if that's because we're on May '10.

      While it sounds like I could add other fields from the incidents table, I was hoping that the ee_file_name file would have Event type information like, what source (xml api, console, customer portal, etc) triggered the event, who the user was, etc.


      Thanks,

      Robert