How to add email attachments to incoming emails

Attachments for incoming emails

A while back I wrote a long series on how to process incoming emails into Remedy Incident Management.

I received a number of positive responses to that as well as a lot of questions.  One of the frequent questions was “How do we put attachments in?”.

Robert Fults of Florida International University was nice enough to provide a complete guide on how to do this.  The material below this paragraph was all provided by him.  Thanks Robert!

Getting your incoming email to accept a single attachment

First, add a new tab to the page holder called Attachments.

Remedy email attachment (click for full size)

Remedy email attachment (click for full size)

You will need a Character field to store the Email GUID and temp field to store the Attachment Unique ID or Attachment ID (I used the unique ID).  You also need a place to store those attachments so we add an attachment pool.  NOTE: I added an attachment table for further enhancement (I am planning to do a table loop to get the Attachment IDs of multiple attachments, which will change the way this works to some extent.)

Now we can start putting together some workflow.  First, we need to get the Email GUID from the AR System Messages form.  Remember that filter we created to get all the data pushed to our staging form? Just add this field to the list.  Mine has Email GUID = $Unique Identifier$. Done.

Now we create a filter that fires on submit to our staging form, in my case IncomingEmailProcessing, which will get the attachment to the staging form. It has two Set Fields actions.  The first will get the Attachement ID from the AR System Email Attachment join form.

Remedy Filter action 1 (click for full size)

Remedy Filter action 1 (click for full size)

The next Set Fields action will take the attachment ID and search the AR System Email Attachments form and get the attachment.

Remedy filter action 2 (click for full size)

Remedy filter action 2 (click for full size)

At this point your processing form should be collecting an email attachment. Now, how do we get it to the ticket?  First we need to make a correction: if you are using AR System 7.1, you need to modify filter HPD:HIJ:ModifyIncident_210_CreateWorklog to push z2AF Work Log01 = $SRAttachment (or whatever you name the attachment fields if you add more, point is that you need to push the attachment field).

Now we can go back to the filter we use to create new tickets from the data on our staging form, in my case +HPD:IncomingEmailCreateNewIncident, and add some new fields to it.

z2AF_Act_Attachment_1 = $attachment field1$

z1D_WorklogDetails="Incident submitted via Email" (or whatever you like, it need to contain something)

z1D_View_Access=Internal or Public (your choice)

z1D_CommunicationSource=Email (for clarity)

z1D_Activity_Type=Customer Communication (for clarity)

 And that takes care of New Incident requests. Now for incident updates.  Go to the filter where you processed updates, in my case +HPD:IncomingEmailModifyIncident, and add the attachment fields.

SRAttachment=$attachment field1$

 That’s it.  If you know how to use table loops you can copy the attachment table from the AR System Email Messages form and change the qualification to ( ‘Source ID2′ = $EmailGUID$) AND ( ‘Type’ = “Email”) which will populate it the table with the relevant attachments.  From there you change your work flow to walk the table and get the attachment IDs and attachments one at a time.  Then you could push them all at once to the appropriate places assuming you have added the necessary attachment fields to the attachment pool.

 

-Robert Fults

rfults@fiu.edu

Remedy Developer @ FIU 

 


BMC Remedy ACD Integration via the C API – opening a Display Only form

How to set open a display only field and set fields using the C API

I had posted a question on the ARSList about how to properly format the C API call for “OpenForm” – we were getting errors using it.

Mark Worley – a fellow poster – was kind enough to send me this example which worked and allowed us to fix the problem


Dim arSession as ARUSER.COMAppObj
Dim arForm as ARUSER.ICOMFormWnd
Dim arField as ARUSER.ICOMField
Dim sessionNumber as Long

Set arSession = New ARUSER.COMAppObj
sessionNumber = arSession.Login(“ARUserID”, “ARUserPassword”,False)

arSession.OpenForm sessionNumber, “ARServer”, “Form Name”, ARSubmit , 1
Set arForm = arSession.GetActiveForm
Set arField = arForm.GetFieldById(999999999)
arField.Value = “Value”
arForm.Submit