why description field not working in outboud integration in servicenow to servicenow integration

Rahul K2
Giga Contributor

##Learning Integration:
I have created below Business rule: 

RahulK2_0-1749912329088.png

Created REST Message method as below: 

RahulK2_1-1749912378947.png

Getting below error: The responseBody is : {"error":{"message":"Exception while reading request","detail":"The payload is not valid JSON."},"status":"failure"}

RahulK2_2-1749912405632.png

 

if I remove the code for description field from the BR and REST Message then it working as expected. Creating new incident in another instance.

Can someone help to why Code is not working if I use the description field? TIA.

3 REPLIES 3

Najmuddin Mohd
Mega Sage

Hello @Rahul K2 ,

Can you try using current.getValue('description') instead of current.description.

current.getValue() returns value in type String,
Where, current.description returns value in type Object.

And, current.getValue() is always a good choice over current.description.

If the above information helps you, Kindly mark it as Helpful and Accept the solution.
Regards,
Najmuddin.

not working current.getValue('description'), still getting same error.
The responseBody is : {"error":{"message":"Exception while reading request","detail":"The payload is not valid JSON."},"status":"failure"}

Marcos Gianoni
Tera Contributor

If the “Description” field is not working correctly in a ServiceNow to ServiceNow outbound integration, there are several potential causes. Here are the most common reasons and troubleshooting steps:

 

Common Causes and Fixes:

  1. Field Mapping Issue in Transform Map (if Import Set API)

    • Check the field mapping in the transform map.

    • Confirm that description on the source table is mapped to description on the target table.

     

  2. Missing Field in the Payload (REST/Scripted API)

    • Check the REST message body or scripted API payload.

    • Confirm that the description field is included and properly populated in the JSON or XML payload.

     

  3. Field Permissions (ACLs)

    • Verify if the description field on the target instance has an ACL that is preventing updates or inserts from the integration user.

     

  4. Incorrect Field Name

    • Sometimes, the field might be a custom field like u_description instead of description.

    • Verify the correct dictionary name in the target system.

     

  5. Data Policy or Business Rule Blocking

    • Check if there are any data policies, business rules, or UI policies that might be preventing the description field from being set via web services.

     

  6. Encoding Issues

    • Special characters in the description field (like line breaks, quotes, etc.) could cause issues if the payload isn’t properly encoded (JSON/XML encoding).

     

  7. Scripted Logic Error

    • If the outbound integration is scripted (via RESTMessageV2), ensure the script includes the description field:

    var r = new sn_ws.RESTMessageV2('Integration_Name', 'POST');
    r.setStringParameterNoEscape('description', current.description);

  • Or in JSON body:

{
"short_description": "Example",
"description": "This is the full description."
}

 

    • On the target instance, verify if the Scripted REST API resource (if used) is capturing the description field:

      Inbound REST API Script Missing Field Handling

      var desc = request.body.data.description;

       

 

 

Checklist for Debugging:

  • Validate the outbound payload includes description.

  • Verify the target instance accepts description (check API docs or field names).

  • Check ACLs on the target system for the description field.

  • Review any error logs (System Logs > REST API logs or ECC Queue if MID Server is involved).

  • Test with Postman or ServiceNow REST API Explorer to isolate the issue