Opened by field remains blank for Request/RITM created via inbound email — Flow Designer script not

nameisnani
Giga Sage

Hi all,

 

I'm trying to fix an issue where the Opened by field comes up empty on Request/RITM records created via inbound email for a specific catalog item ("Request Help").

Setup:

  • Catalog item "Request Help" uses a subflow named "Generic - Request Help: Fulfillment"
  • Action 1: Get Catalog Variables from Request Help from Request Help — retrieves catalog variables including email_subject, requested_for, etc.
  • Action 2: Update Request Record on table Request [sc_request], which sets several fields including Opened by via a scripted field value

Desired logic for Opened by (email submissions only):

  1. Match sender's email address to a sys_user record → use that user
  2. If no match found → use Requested For
  3. If Requested For is also empty → use a placeholder "Person not in Database" user



Current script in the "Opened by" field (Update Record action):

 

var emailSubject = fd_data["1_get_catalog_variables"].email_subject;
var requestedFor = fd_data["1_get_catalog_variables"].requested_for;

function getPersonNotInDatabase() {
    var gr = new GlideRecord('sys_user');
    gr.addQuery('first_name', 'Person not in');
    gr.addQuery('last_name', 'Database');
    gr.query();
    if (gr.next()) {
        return gr.sys_id.toString();
    }
    return null;
}

if (emailSubject) {
    if (requestedFor) {
        return requestedFor;
    }
    return getPersonNotInDatabase();
}

return getPersonNotInDatabase();

 

 

Issue:
Despite this script, Opened by is still blank on newly created Request/RITM records when tested via a real inbound test email (subject line matching the expected trigger condition). Requested For also shows blank on the resulting record in some tests.

What I've checked so far:

  • Confirmed the inbound email is received and marked "Processed" in Inbound Email logs
  • Confirmed the Request/RITM record IS being created
  • Confirmed the flow is Published (not draft)
  • Uncertain whether fd_data["1_get_catalog_variables"] is the correct reference key for the "Get Catalog Variables from Request Help from Request Help" action — the action's auto-generated internal name may differ from what I've hardcoded .
  •  
  • nameisnani_0-1784306188883.png

     

    nameisnani_1-1784306246284.png

     




    @Ankur Bawiskar  - can u please help me here to fix this issue . Please help me to fix this . 
1 REPLY 1

Vikram Reddy
Tera Guru

Hi @nameisnani,

 

The hardcoded fd_data key is the bug. fd_data["1_get_catalog_variables"] is not the reference Flow Designer actually generated for that action, so email_subject dot-walks off undefined, throws right away, and the script dies before it ever reaches your getPersonNotInDatabase() fallback. That's why Opened by lands blank instead of at least resolving to the placeholder user. Flow Designer builds that key itself from the action's internal name and sequence (something like fd_data._1__get_catalog_variables), it is not meant to be typed from memory.

  • Re-insert the pills for email_subject and requested_for using the fx/data pill picker inside the script editor instead of the hand-typed key
  • Hover the pill in the Data panel to confirm the actual generated reference before you dot-walk into it
  • Check the flow's Run history for that Update Record step, a script error there will confirm this is exactly what's happening
  • Confirm requested_for is actually populated coming out of the catalog variables on the email-created record, a blank value upstream feeds straight into your fallback too

 

Thank you,
Vikram Karety
Octigo Solutions INC