Updating UCCX Email Queue Database

Version 1
    This document was generated from CDN thread

    Created by: Bill Westby on 06-02-2012 05:45:08 PM
    There isn't a forum for this question but maybe someone can suggest something or a different forum.
    I have the need to control the email CSQ from an external source.  Inserting events isn't an issue in my mind, I can just write a MAPI type client to push a message to the mailbox being monitored by the UCCX email service.
    However, I also need to be able to remove queued emails before they reach an agent.  I tried moving the message out of the inbox->queue CSQ folder and put it in some other folder, I tried them all like handled, deleted, pending delete, etc.  Moving the message works because this is standard Exchange stuff, just use an email client to move the message around.   But...UCCX doesn't notice the email disappeared from the inbox, it keeps the call queued in the Supervisor Agent Desktop real-time status.  The call is obviously still in the real-time database tables in UCCX.
    So I thought about just updating the tables to try and cancel the email request but haven't had luck figuring out the combo yet.
    Has anyone ever done something like this or maybe have a suggestion on how to handle it.
    Basically I have a service that will monitor another CRM system and when it sees a new ticket it drops an email into the Exchange mailbox being monitored by UCCX.  However if the CRM tickets gets resolved (for a variety of reasons) I need to be able to remove the email from the queue from my service.
    Bill Westby