Ignore records with Null username coming through JAMF connector

Prashant62
Tera Contributor

We have an existing implementation of ServiceGraph connector for JAMF in our environment and we are trying to restrict the jamf records that are coming with empty Username values.
As the ServiceGraph uses robust transform, I am looking for a way to achieve this.
Any help on this is highly appreciated.

1 ACCEPTED SOLUTION

Yogesh11bhatt
Kilo Guru

Hi @Prashant62 ,

 

The best practice for Service Graph Connectors is to handle this using the built-in conditional logic in IntegrationHub ETL—no scripting required.

  1. Navigate to IntegrationHub ETL in your ServiceNow instance.

  2. Open your Service Graph Connector for JAMF ETL definition.

  3. Go to Step 3: CMDB Classes to Map.

  4. Locate the specific CI Class you want to prevent from being created (e.g., the User or Computer class).

  5. Click the Condition icon (it looks like a funnel/filter) next to that class.

  6. Set the condition to only run if the username is present. For example:

    • [Username] is not empty

  7. Save and activate your ETL definition.

By doing this, the Robust Transform Engine will process the incoming JAMF payload but will simply skip creating or updating that specific record if the username value is missing.

The Low-Code Alternative: RTE Script Operation

If your requirement is strictly to drop the entire row of data before it even reaches the mapping phase, you can flag it in the preparation stage:

  1. In IntegrationHub ETL, go to Step 2: Preview and Prepare Data.

  2. Click Add Operation and select Script Operation.

  3. Pass your incoming JAMF Username column as the input variable (e.g., jamf_user).

  4. Write a simple return script:

    JavaScript
     
    if (jamf_user === '' || jamf_user === null || jamf_user === undefined) {
        return false; 
    }
    return true;
  5. Map the output of this script to a new custom column called Has_Username.

  6. Go to Step 3: CMDB Classes to Map, click the filter icon on your main classes, and set the condition to: [Has_Username] is true.

Bottom Line: Discard the legacy onBefore script you found online. Use IntegrationHub ETL conditions to filter out the empty values safely and correctly.

Please mark this response as helpful if it guided you in the right direction.

 Regards,

View solution in original post

5 REPLIES 5

I have edited the conditional logic from the RTE entity mapping and it worked.