How can I mark messages that are pending to be sent by iService to be ignored. For instance, if we have created a reply to a customer but it has an issue and can't be processed, how do we get rid of it?
iService has an SMTPOut table that holds all messages waiting to be delivered. Each outbound message has an isSent attribute that tells you whether it has been passed on to an SMTP server for delivery to the end user. If the isSent value is 0 or False, then it is waiting to be processed. Once the message is processed the value will be set to 1 or True.
Because of the transactional nature of the iService database, messages which fail to send that cause crashes fail to have their isSent or TimeSent flags set. This means that some types of failures will continue to be repeated because they continue to be considered the "Next" message to be sent for each iteration of the SMTP Processing cycle. Because of this, most often it is the SMTPOUT entry with the lowest ID number that has an isSent flag equal to 0 and a TimeSent of NULL.
**UPDATE: Version 5.10 and Later**
You can now resolve these messages from the Admin Tools>SMTPOut tab within iService.
You can manually update these records using the following query. Please note, this should only be done by a systems administrator and only in extreme cases when you need to override the processing of a message.
You can get a list of all pending message IDs that have not been processed by using the following query.
Select * from SmtpOut where isSent=0 and TimeSent is NULL order by ID
To update the pending message from unsent to sent, use the following query.
Update SmtpOut Set isSent=1 Where ID = #
If you know the InteractionID of the agent response, you can use the following query to update the corresponding SMTPOut record from a single query.
UPDATE SmtpOut SET isSent=1
WHERE ID IN (SELECT smtpMessageID FROM InteractionsResponses WHERE interactionID=123)
In the above example, replace the 123 with the InteractionID of the agent response.