SAP Knowledge Base Article - Public

3707163 - Unable to fetch current sender email address from incoming email to ticket

Symptom

  • Unable to fetch the current sender email address from the incoming email to the ticket during the "Before Save" event.
  • Attempts to retrieve sender information using nodes such as ServiceRequestInteraction, Email Activity, and other references return previously saved email data from the database instead of the current email data being processed.

Environment

  • SAP Cloud for Customer core applications
  • SAP Cloud Applications Studio 
  • SAP Business ByDesign

Reproducing the Issue

  1. Receive an incoming email related to an existing ticket.
  2. Attempt to capture the sender’s email address from the "From" field to update the ticket fields through business logic before the ticket is saved.
  3. Implement logic to fetch sender information using nodes such as ServiceRequestInteraction, Email Activity, and other references during the "Before Save" event.
  4. Observe that the logic retrieves only previously saved email data from the database, not the current email data in the buffer..

Cause

The ServiceRequestInteraction node does not provide access to runtime interaction data, and script files cannot be created directly on this node to fetch real-time sender email information.

Resolution

  1. Adapt the code to check the ServiceRequestInteraction node.
  2. Filter and sort based on elements such as ReportedDateTime to retrieve the most recently created interaction.
  3. Utilize the BeforeSave directly on the ServiceRequestInteraction node to make changes to the Root when the Interaction node instance is being generated.
  4. If runtime interaction data is required, consider implementing a Workflow (WKF) to process interactions based on specific business requirements.
  5. Note that it is not possible to create a script file for the ServiceRequestInteraction node to fetch runtime data.
    If further assistance is required, refer to expert services or the SAP community forum for additional support.

Keywords

Sender email, Incoming email, Beforesave event, Runtime email data, ServiceRequestInteraction node, ByDesign Studio, ABSL, Email processing, Ticket interaction, Database email data, Real-time email , KBA , AP-RC-BDS-SCR , ByDesign Studio Scripting (ABSL) , Problem

Product

SAP Business ByDesign all versions ; SAP Cloud Applications Studio all versions ; SAP Cloud for Customer core applications all versions