Resolving "Callout response was 204 after tries" Error in Zuora NetSuite Callout Tasks

Edited

Issue: When using a NetSuite Callout task in Zuora workflows, you may encounter an error stating "Callout response was 204 after tries." This occurs when the NetSuite API returns a 204 No Content response, which is a valid success response for operations that don't return data, such as updates.

Cause: The error arises because the default configuration of the NetSuite Callout task doesn't recognize 204 as a successful status code, leading to a misinterpretation of the API response.

Resolution: To resolve this issue, follow these steps in the NetSuite Callout task configuration:

  1. Add 204 as a Successful Status Code:

    • Locate the "SUCCESSFUL STATUS CODES" section.

    • Add "204" alongside the existing "200" status code.

  2. Modify the Response Content Validation:

    • Find the "Response Content Validation" text area.

    • Replace the existing code with:

      {% if Data.ResponseCode == 204 or Data.ResponseBody.success == true %} true {% else %} false {% endif %}
  3. Ensure "Include Request and Response Code in Payload" is checked.

  4. Verify that "Strict Variables" is enabled.

  5. Save the changes to the task configuration.

Explanation: These modifications allow the workflow to correctly interpret both 200 (OK) and 204 (No Content) responses as successful. The updated validation code checks for either a 204 status code or a success flag in the response body, accommodating both scenarios.

Additional Notes:

  • This solution is particularly relevant for NetSuite operations that update records without returning content.

  • Always test the workflow after making these changes to ensure it works as expected across various scenarios.

  • Consider reviewing and updating other NetSuite Callout tasks in your workflows that might benefit from this configuration.

By implementing these changes, you should resolve the "Callout response was 204 after tries" error and ensure smooth execution of your Zuora workflows involving NetSuite Callout tasks.