Hi!
I’m not familiar with the Insert API so I’m shooting in the dark. By any chance do you have in the source any field mapped to your Stage field that contains “SomeStage...”?
You could also compare the values in your source versus the Stage Dropdown in Data Management to see what value/s you have in the source that do not exist in the dropdown
Hi Mahesh,
When you send a batch insert request to the Gainsight NXT Company object and receive a jumbled response, you can determine the status of each record by using the 'requestId' provided.
Each record is processed separately, and the 'requestId' applies to the entire batch operation.
- Successfully inserted records are listed in the 'data' section with their 'Gsid'.
- Failed records appear in the 'errors' section, categorized by the error message and field name.
Note : If the error response lacks a 'gsId' or any unique identifier, and there are identical failed records with the same error, it becomes challenging to trace the errors back to the original records. In such scenarios, you should compare the failed values against your initial request payload to pinpoint the erroneous records. To avoid this issue, you might want to insert records in smaller batches or include unique identifiers that facilitate easier mapping of errors to the source records.
You may refer to these for details: https://support.gainsight.com/gainsight_nxt/API_and_Developer_Docs/Company_and_Relationship_API/Company_API_Documentation#Sample_Failure_Response
Even when all records in a batch are successfully inserted, I receive the response records in a jumbled order. This makes it difficult to map each response record to its corresponding request record since the order is not preserved.
What is the best way to identify which response record corresponds to which request record when the response order doesn’t match the request order? Are there any specific fields or identifiers I can use to ensure proper mapping between request and response records?
It would be best to include a unique identity for each record in your request payload to ensure appropriate mapping of response records to their Gainsight NXT Company object related request records, especially when the insertion response order is not sequential.
Any unique system field value or client-generated ID can be used. Use this unique identifier to match response records to request records after receiving them. If the answer contains errors, the unique identifier will match it to your request payload to identify the record that failed. (This unique identity must be in both the request and response for accurate record mapping.)
In the case of failed record errors, the unique identifier that I include in the request payload may not appear in the error response. How can I map the failed record in the error response to the original request record? For example, I receive an error response like this:
"errors": [
{
"success": false,
"oldValue": "NotInActive",
"parsedValue": "NotInActive",
"errors":
{
"errorMessage": "Invalid/Inactive value provided for picklist.",
"errorCode": "GSOBJ_1012",
"fieldName": "Status",
"invalidValue":
"NotInActive"
]
}
]
}
]
Since the unique identifier from the request is missing in the error response, how can I accurately find and map the corresponding request record to this failed error? Should I iterate through the request records and match the field and value mentioned in the error response, or is there a more efficient way to map them?
Hi Mahesh,
Thank you for reaching out! For this specific query, I believe it would be best to connect with your designated CSM or CSSC for more detailed information.
If you have any other questions or need further assistance, please feel free to ask!
Thanks and best regards,
Jagari