Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

EIM (4.4.1) - HowTo automatically forward email with original attachment

Hello,

is it possible create a workflow to forward email (with all attachment if exist) to external email address?

In this guide: https://supportforums.cisco.com/message/3261861#3261861 message is not forwarded, but a new message is sent, because the content of email is not from the original email.

I've created a Query Link (Integration->Adapters->Data->Access->Links):

        SELECT a.content

        FROM [eGActiveDB].[dbo].[EGML_EMAIL_DATA] a

        WHERE a.activity_id=<%activity1%>

In Usage->Links I've created a Link, in general tab assigned a macro name (activity_content), in Data Access Links tab I've selected Data Access Link, then in Input tab I've set activity1 input's parameter Value as ``activity_id...

When my macro named activity_content is used in workflow, I'm able to forward email with original content (Create object, set Activity Substatus to Ready for outbound.... as explained in https://supportforums.cisco.com/message/3261861#3261861), but I'm not able to forward email with the original attachment, so I've tried to custom the SQL Query to find out wether the incoming email has an attachment:

IF EXISTS

(SELECT b.EMAIL_ATTACHMENT_ID

    FROM [eGActiveDB].[dbo].[EGML_EMAIL_DATA] a, [eGActiveDB].[dbo].[EGML_EMAIL_ATTACHMENT_LINK] b

    WHERE a.EMAIL_ID=b.EMAIL_ID AND a.activity_id=<%activity1%>

)

SELECT a.content, b.EMAIL_ID, b.EMAIL_ATTACHMENT_ID

    FROM [eGActiveDB].[dbo].[EGML_EMAIL_DATA] a, [eGActiveDB].[dbo].[EGML_EMAIL_ATTACHMENT_LINK] b

    WHERE a.EMAIL_ID=b.EMAIL_ID AND a.activity_id=<%activity2%>

ELSE

        SELECT a.content

        FROM [eGActiveDB].[dbo].[EGML_EMAIL_DATA] a

        WHERE a.activity_id=<%activity3%>

Now I know wether the email has attachment and I know email_ID of original email and I would like to insert a link for new (forwarded email) to DB table [eGActiveDB].[dbo].[EGML_EMAIL_ATTACHMENT_LINK], but I don't know how to get email_ID of the newly created email that will be forwarded:

IF EXISTS

(SELECT b.EMAIL_ATTACHMENT_ID

    FROM [eGActiveDB].[dbo].[EGML_EMAIL_DATA] a, [eGActiveDB].[dbo].[EGML_EMAIL_ATTACHMENT_LINK] b

    WHERE a.EMAIL_ID=b.EMAIL_ID AND a.activity_id=<%activity1%>

)

INSERT [eGActiveDB].[dbo].[EGML_EMAIL_ATTACHMENT_LINK] (a.EMAIL_ATTACHMENT_ID,`NEW_EMAIL_ID`,a.FILE_NAME,a.CONTENT_TYPE, a.ATTACHMENT_TYPE, a.ENCODING_TYPE, a.CHARSET, a.BLOCKED_FLAGS, a.CONTENT)
SELECT a.EMAIL_ATTACHMENT_ID,a.FILE_NAME,a.CONTENT_TYPE, a.ATTACHMENT_TYPE, a.ENCODING_TYPE, a.CHARSET, a.BLOCKED_FLAGS, a.CONTENT
FROM [eGActiveDB].[dbo].[EGML_EMAIL_ATTACHMENT_LINK] a, [eGActiveDB].[dbo].[EGML_EMAIL_DATA] b
WHERE a.EMAIL_ID=b.EMAIL_ID AND b.activity_id=<%activity2%>;

SELECT a.content

        FROM [eGActiveDB].[dbo].[EGML_EMAIL_DATA] a

        WHERE a.activity_id=<%activity4%>;

ELSE

        SELECT a.content

        FROM [eGActiveDB].[dbo].[EGML_EMAIL_DATA] a

        WHERE a.activity_id=<%activity4%>;

Could you help me with solving this issue or is there any other workaround how to automatically in workflow forward emails with original content and all attachments, please?

Everyone's tags (3)
5 REPLIES

EIM (4.4.1) - HowTo automatically forward email with original at

Do you still want to be able to get the emails in EIM or do you just want them forwarded to another address?

New Member

Re: EIM (4.4.1) - HowTo automatically forward email with origina

In EIM's workflow there is the Branch object, where some conditions are set and when some results are true, I would like to forward these emails to one (exact) email address that is not part of EIM, but before sending I'd like to send mail for approval process to a supervisor.

EIM (4.4.1) - HowTo automatically forward email with original at

Sorry Marek, not going to be able to help on this.  The best suggestion I had was to have your mail server forward the emails.

New Member

EIM (4.4.1) - HowTo automatically forward email with original at

Better to add the user as a supervisor and through outbound workflow emails from agent will go to supervisor for approval or rejection, to forward attachments you need a custom rule within EIM as there is no forward function in workflow.

Alternatively you can copy the address on the alias but all emails will go to the recipient specified on the alias.

New Member

EIM (4.4.1) - HowTo automatically forward email with original at

Hi everybody,

I found out, where the problem was:

Everytime I used any type of sql query in EIM's workflow, activity's substatus was set to Workflow-Error. Problem was, because in SQL query I used some spaces:

Wrong Query:

UPDATE b

SET b.EMAIL_ADDRESS= 'xyz@xyz.sk'

FROM [eGActiveDB].[dbo].[EGML_EMAIL] a, [eGActiveDB].[dbo].[EGML_EMAIL_ADDRESS] b WHERE a.ACTIVITY_ID = <%activity_id%> AND b.EMAIL_ID = a.EMAIL_ID AND b.ADDRESS_FLAG = 4;

Correct Query:

UPDATE b

SET b.EMAIL_ADDRESS='xyz@xyz.sk'

FROM [eGActiveDB].[dbo].[EGML_EMAIL] a, [eGActiveDB].[dbo].[EGML_EMAIL_ADDRESS] b WHERE a.ACTIVITY_ID=<%activity_id%> AND b.EMAIL_ID=a.EMAIL_ID AND b.ADDRESS_FLAG=4;

, it means

ACTIVITY_ID=<%activity_id%> is not the same as ACTIVITY_ID = <%activity_id%>

Solution for preparing email to be forwarded to an exact email address after Supervisor's check:

1. create a data access link with JDBC, type update ... prepare Macro name (Don't forget to remove all spaces in SQL query or you'll get activity to substatus Workflow error)

2. in inbound workflow, use modify object, set Activity to be "Ready for outbound workflow" and in Modify object use field called Description and use Macro you've created in step 1

3. Connect modify object to a Supervisory Queue

That's it! :-)

For more information do not hesitate to contact me.

1293
Views
0
Helpful
5
Replies
CreatePlease to create content