Skip to Content
Business Trends
Author's profile photo Faisal PC

Setting priority for incoming e-mails

Hi All,

You would have seen most of the times our IC agent inbox e-mails will be with “Medium” priority by default. One of the interesting requirement I got recently was to set the priority of incoming e-mails based on different conditions. Requirement in complete was, if user has marked the email as ‘High importance’ or the email subject contains some words like ‘Urgent’, ‘Last reminder’ etc, then the IC agent inbox email also should have priority as ‘High’. As usual, the first place for getting something for this requirement was nowhere else other than SCN. I didn’t get a complete solution though, I got something to start from one of the threads’ question answer section.

First thing I checked was, whether it’s possible to set the priority like this manually for an email. Yes..It’s possible via transaction code SWI1 to change the priority. Now the question is, how to automate this functionality.

For debugging an incoming email, we can set the debugging parameter in the following path,

SPRO->Customer Relationship Management->E-mail response management system->Define Repository or transaction CRMC_ERMS_REPOSITORY. For context ERMS, insert a property ‘DEBUG’ and value as ‘X’. This is a SAP hard-coded break that stops the routing and waits for you in sm50 to debug. Now you can debug in SM50.

Following are the steps I found after some debugging and analysis.

1. Go to tcode SWO1 and create a sub object for ERMSSUPRT2.


2. Redefine the method RuleExecution in the Z-object.

5. And the last step is making the z-object as the delegated type for ERMSSUPRT2. This is to be done in SWO6 transaction.

Now go to your inbox and see whether the email with ‘High importance’ has come with priority ‘High’.

Please let me know if you have any queries.



Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Saurabh Kabra
      Saurabh Kabra

      Nice Document!!! 😎 😎 😎

      Author's profile photo Naga Yaswanth
      Naga Yaswanth

      Points 3 and 4 are missing . could you please provide

      Author's profile photo Faisal PC
      Faisal PC
      Blog Post Author

      I had seen your comment some time earlier....but because of some technical glitch in SCN, I was neither able to reply nor able to edit my post. Still I am not able to edit and post, in the edit view it shows the 3 and 4 steps but upon updating it goes away. Here below you have them.

      3. Now this method is the place where you have to make the code changes.

      In our case, we created a custom table where we can store the words which needs to be considered as high priority. This allows if in case tomorrow we need some extra words also to be considered.

      Insert following code here..

      Now we got whether there are any words which is to be set to high. We need to check whether the email was sent with high priority also. Hence, add the following code.

      Considering the values found from above, we have to set the priority of email. Hence, use the FM "SAP_WAPI_CHANGE_WORKITEM_PRIO" for setting the priority.


      4. We are done with coding part now. The next is to set the z-bject type is released.


      Hope this comment works...