Jump to content

Scribe Api not working properly to get the error details for the failed records.


Manoj Chaurasia

Recommended Posts

In our system we are using scribe to sync data between CRM2011 and D365 CRM. Now we have a requirement to generate the error details report. Hence we chose to use Scribe API.....Below stated api we found is fitting our requirement:

GET: /v1/orgs/{orgId}/solutions/{solutionId}/history

 

But the result is so random, we are facing problem in understanding the strange behavior.

 

Below are some results:

 

[

{

"id": "XXXXXX",

"start": "2018-12-15T08:38:43.227Z",

"stop": "2018-12-15T08:39:42.24Z",

"recordsProcessed": 0,

"recordsFailed": 0,

"result": "CompletedSuccessfully",

"details": "",

"reprocessRecordsRemaining": 0,

"isReprocessJob": false,

"duration": 59.013,

"sourceDataLocal": false,

"processExecutionId": "dXXXXXX0"

},

 

{

"id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",

"start": "2018-12-15T10:12:01.337Z",

"stop": "2018-12-15T10:13:05.82Z",

"recordsProcessed": 5,

"recordsFailed": 0,

"result": "CompletedSuccessfully",

"details": "",

"reprocessRecordsRemaining": 0,

"isReprocessJob": false,

"duration": 64.483,

"sourceDataLocal": false,

"processExecutionId": "xxxxxxxxxxxxxxxxxxxxxxxxxxb"

},

 

{

"id": "xxxxxxxxxxxxxxxxx",

"start": "2018-12-15T10:58:58.283Z",

"stop": "2018-12-15T11:00:56.057Z",

"recordsProcessed": 65,

"recordsFailed": 0,

"result": "CompletedSuccessfully",

"details": "",

"reprocessRecordsRemaining": 0,

"isReprocessJob": false,

"duration": 117.774,

"sourceDataLocal": false,

"processExecutionId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxb"

},

 

{

"id": "1xxxxxxxxxxxxxxxxxxxxxxxx",

"start": "2018-12-15T11:46:15.97Z",

"stop": "2018-12-15T11:47:17.363Z",

"recordsProcessed": 0,

"recordsFailed": 0,

"result": "CompletedSuccessfully",

"details": "",

"reprocessRecordsRemaining": 0,

"isReprocessJob": false,

"duration": 61.393,

"sourceDataLocal": false,

"processExecutionId": "9xxxxxxxxxxxxxxxxxxxxxxxxx0"

},

 

{

"id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx4",

"start": "2018-12-15T12:42:31.623Z",

"stop": "2018-12-15T13:49:49.383Z",

"recordsProcessed": 2921,

"recordsFailed": 2,

"result": "CompletedWithErrors",

"details": "",

"reprocessRecordsRemaining": 2,

"isReprocessJob": false,

"duration": 4037.7599999999998,

"sourceDataLocal": false,

"processExecutionId": "xxxxxxxxxxxxxxxxxxxxxxxxc"

},

{

"id": "1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5",

"start": "2018-12-15T14:12:02.18Z",

"stop": "2018-12-15T15:46:58.527Z",

"recordsProcessed": 3877,

"recordsFailed": 488,

"result": "CompletedWithErrors",

"details": "",

"reprocessRecordsRemaining": 488,

"isReprocessJob": false,

"duration": 5696.347,

"sourceDataLocal": false,

"processExecutionId": "9xxxxxxxxxxxxxxxxxxxx4"

},

 

{

"id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",

"start": "2018-12-15T20:19:06.677Z",

"stop": "2018-12-15T20:41:12.57Z",

"recordsProcessed": 863,

"recordsFailed": 0,

"result": "CompletedSuccessfully",

"details": "",

"reprocessRecordsRemaining": 0,

"isReprocessJob": false,

"duration": 1325.893,

"sourceDataLocal": false,

"processExecutionId": "xxxxxxxxxxxxxxxxxxxxxxxxc"

},

{

"id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx8",

"start": "2018-12-15T21:03:23.037Z",

"stop": "2018-12-15T21:04:02.993Z",

"recordsProcessed": 0,

"recordsFailed": 0,

"result": "FatalError",

"details": "Failed to open one or more connections: Verify that you have entered the correct credentials to the target Microsoft 365 Dynamics URL and Organization. Also check to be sure system time for the Scribe Online Agent is current.nnThe following exception message was returned from the 365 Connector:nThe underlying connection was closed: A connection that was expected to be kept alive was closed by the server..rnException type: System.ServiceModel.CommunicationException.rnInner Exception Type: System.Net.WebException..rn Inner Exception: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.rnrn",

"reprocessRecordsRemaining": 0,

"isReprocessJob": false,

"duration": 39.955999999999996,

"sourceDataLocal": false,

"processExecutionId": "xxxxxxxxxx3"

},

{

"id": "1xxxxxxxxx9",

"start": "2018-12-15T21:26:09.843Z",

"stop": "2018-12-15T21:27:55.85Z",

"recordsProcessed": 10,

"recordsFailed": 0,

"result": "CompletedSuccessfully",

"details": "",

"reprocessRecordsRemaining": 0,

"isReprocessJob": false,

"duration": 106.00699999999999,

"sourceDataLocal": false,

"processExecutionId": "xxxxxxxf"

},

 

 

 

We are specifically interested in "Details" field . If its failing we need the name details of the error. But only in one case i am able to see that error detail field. Any suggestion or help will me much appreciated. Kindly reply what i can do to get the error details for the failed records.

Link to comment
Share on other sites

Hello Devender,

 

I responded to the case which a colleague of your opened and had me switch the owner to your contact, using your work related email.

 

With that being said, it sounds like you want the row errors from the solutions which have a result of "CompletedWithErrors". Is that correct

 

If so, there is a process to get the row errors from the API.

 

1) Run against the API using the call below with the following parameters: OrgID, SolutionID, and Result, where Result is set to "CompletedWithErrors".

 

GET /v1/orgs/{orgId}/solutions/{solutionId}/history

 

This will return all executions for a particular solution on a particular org where there were row errors.

 

2) Use the IDs from the solution executions you just got on the next API call below to generate an Export ID:

 

POST /v1/orgs/{orgId}/solutions/{solutionId}/history/{id}/export

 

3) Lastly, use the Export IDs with the previous OrgID, SolutionID, and ExecutionIDs to get the text from the row errors using the call below:

 

GET /v1/orgs/{orgId}/solutions/{solutionId}/history/{id}/export/{exportId}

 

That should give you what you're looking for.

 

Let me know if that helps.

 

Wesley C.

Scribe Support

Link to comment
Share on other sites

@Wesley Couturierthank you for this support. We are able to get the log files for the failed records but, but what we were trying to get that we are still facing the problem in retrieval. We want the error description but using

GET /v1/orgs/{orgId}/solutions/{solutionId}/history/{id}/export/{exportId}

api we are getting just (ref. attached image) a smaller decription. we want a detailed description for the errors occurring. Any suggestion to retrieve the error details for the failed records will be much appreciated.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...