Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8604

Re: Sending an email based on a value in the payload

$
0
0

Hello John,

 

probably you tried it already, but why don't you configure two message mappings?

 

1.- One for the messages that have the status A, B or C

2.- One for the messages that have any other status. This last mapping should produce an xml similar to the following:

 

<ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">

  <Subject>Subject</Subject>

  <From>namea@company.com</From>

  <To>nameb@company.com</To>

  <Reply_To />

  <Content_Type>text/plain</Content_Type>

  <Content>

This is the content.

  </Content>

</ns:Mail>


In your ICO or Interface Determination you can create two conditions:

 

1.- One for the messages that have the status A, B or C

2.- One for the messages that have any other status.

 

And depending on the condition, you execute one mapping or another. Finally you can use a Soap Receiver Channel to send "normal" messages and the email adapter to send "error" messages.

 

Please, check the following links for further information:

 

Configuring the Receiver Mail Adapter (SAP Library - Partner Connectivity Kit)

XI/PI: Sending Emails Using XI Mail Adapter


I hope it helps!

 

Regards!


Viewing all articles
Browse latest Browse all 8604


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>