Integrations and APIs for Service

Get Involved. Join the Conversation.

Topic

    Charlie Mopps
    inc2contacts deletes?
    Topic posted June 8, 2015 by Charlie MoppsGold Medal: 3,500+ Points 
    54 Views, 3 Comments
    Title:
    inc2contacts deletes?
    Content:

    I'm not sure if this is the right forum to put this or not, it doesn't seem to fit any of the catgories in any of the forums.

    We're trying to report on the inc2contacts with API calls. Unfortunately, it's behavior is a bit odd. It seems that, when assosiating a contact with an incident it creates a record in this table. But when you remove the record it DELETES that row. Rather than changing a status, or via some other method.

    Has anyone else run into this? I'm not sure how I can run large reports against this data. It has no "Updated" field, it has no key, and the records are constantly added/deleted with no trace at all.

    Comment

     

    • Allan Schrum

      The inc2contacts table records the current primary and "other" contacts associated with the Incident. There is no "status" field to record old contacts. The Incident.PrimaryContact, when assigned and if it happened to be in the OtherContacts array is removed from the OtherContacts array before being assigned to the PrimaryContact. The PrimaryContact, when replaced by another Contact, is simply replaced (removed from inc2contacts). If you wish to add them to the OtherContacts array (to keep track of all those that had been associated with the Incident) then your API calls need to handle that situation.

      Regards,

      -Allan

    • Charlie Mopps

      I want to know which contacts are currently associated with the incident, and which have changed, without having to go through all 8 million rows.

      Am I correct in assuming the only way to do this is look at incidents.updated? And just know that after an incident is updated, I need to drop and re-import every related inc2contact record that has the same i_id?

    • Allan Schrum

      Yes, that is correct.

      Regards,

      -Allan