Use PDIs? Take our 5-minute survey to help shape the PDI roadmap.

CSM Case API returning English display values despite French translations configured

satishyanam
Tera Contributor

Hello Team,

 

We are consuming the ServiceNow CSM Case API and are attempting to retrieve localized French display values for choice fields.

 

https://www.servicenow.com/docs/r/api-reference/rest-apis/case-api.html

 

API usage : /api/sn_customerservice/case?sysparm_query=number=XXXXX&sysparm_display_value=all&sysparm_fields=number,state,priority,short_description

 

Observed Behavior

The response returns English display values for fields such as:

 

{

  "result": [

    {

      "number": {

        "name": "number",

        "label": "Number",

        "value": "********",

        "display_value": "*********",

        "type": "string"

      },

      "state": {

        "name": "state",

        "label": "State",

        "value": "1",

        "display_value": "New",

        "type": "integer"

      },

      "priority": {

        "name": "priority",

        "label": "Priority",

        "value": "2",

        "display_value": "2 - High",

        "type": "integer"

      },

      "short_description": {

        "name": "short_description",

        "label": "Short Description",

        "value": " acknowledgement test",

        "display_value": "acknowledgement test",

        "type": "string"

      },

      "case_action_summary": {

        "name": "case_action_summary",

        "label": "Case Action Summary",

        "value": null,

        "display_value": "",

        "type": "reference"

      },

      "sys_id": {

        "label": "Sys ID",

        "value": "************",

        "displayValue": "***************",

        "type": "GUID"

      }

    }

  ]

}

 

Localization Configuration Verified

We have verified that French translations exist in the sys_choice and sys_documentation table  and looks good.

 

Testing Performed

We tested requests with header:

Accept-Language: fr

Accept-Language: fr-CA

Accept-Language: fq

 

However, the API always continues to return only English display labels.

 

Questions

  1. Does the CSM Case API (/api/sn_customerservice/case) support localized display values based on user language or request headers?
  2. Is Accept-Language supported by this API?
  3. When is used(sysparm_display_value=all), should translated labels from sys_choice be returned?
  4. If localization is supported, what is the recommended configuration to retrieve French labels?
  5. If localization is not supported by the Case API, what is the recommended approach for retrieving translated choice labels for CSM fields?

Reviewed the Case API documentation but could not find any references to localization or language-specific response behavior.

 

Thank you for your guidance.

2 REPLIES 2

Kieran Anson
Kilo Patron

Localisation will be based on the user account the integration is running at. I'm not familiar with the header you're trying to pass and wh

Hi Kieran,

Yes, I was able to figure that out yesterday. However, I feel that relying on the integration user's language may not be the ideal approach for this use case.

From a consumer application's perspective, I would typically expect localization to be controlled through a request header (such as Accept-Language) or a query parameter, allowing the consumer to explicitly request English or French labels at runtime. The API could then return the corresponding localized values based on the requested language.

One concern with tying localization to the integration user's language is that a consuming application may need to support both English and French users simultaneously. In that scenario, it could lead to maintaining separate integration accounts for each language or implementing additional workarounds outside the API, which may not be the most scalable approach.

Since ServiceNow is the source of truth for these translated labels, I was expecting there might be a supported mechanism for clients to request the desired language dynamically through the API itself.

That said, I now understand the current behavior and appreciate the clarification. Thank you for taking the time to explain it and for providing your input. Much appreciated! 🙂