> For the complete documentation index, see [llms.txt](https://docs.1kosmos.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.1kosmos.com/integrations/identity-verification/sailpoint-identity-verification-for-workflows/sailpoint-workflows/workflow-2-record-the-verification-result.md).

# Workflow 2: Record the Verification Result

This workflow looks up the account created by Workflow 1, retrieves the verification outcome from 1Kosmos, and writes it back to the account. &#x20;

#### Steps

| # | Step                    | SailPoint Step Type |
| - | ----------------------- | ------------------- |
| 1 | External Trigger        | Trigger             |
| 2 | Look Up 1Kosmos Account | Get Accounts        |
| 3 | Get Verification Result | HTTP Request        |
| 4 | Update Account          | HTTP Request        |

&#x20;

#### External Trigger&#x20;

Set the workflow trigger to External Trigger. An external trigger gives the workflow its own callable endpoint and its own auth credentials — calling that endpoint is what starts this workflow. SailPoint generates the endpoint URL, client ID, and client secret automatically when you add this trigger; open the trigger configuration to copy all three. You'll enter them into the 1Kosmos workflow, so that 1Kosmos can call this workflow when verification finishes.&#x20;

1Kosmos calls this endpoint with the workflow instance ID in the request body, available in the workflow as:&#x20;

`$.trigger.data.wfInstanceId`&#x20;

#### Look Up 1Kosmos Account&#x20;

Add a Get Accounts step to find the account whose nativeIdentity matches the wfInstanceId from Step 1, and save its internal id — you'll need it for the update in Step 4.&#x20;

`GET https://{tenant}.api.{domain}.com/v3/accounts?filters=nativeIdentity eq "{wfInstanceId}" and sourceId eq "{sourceId}"`&#x20;

`Authorization: Bearer {access_token}`&#x20;

#### Get Verification Result&#x20;

Add an HTTP Request step that calls the 1Kosmos result summary API to retrieve the outcome of the verification session.&#x20;

&#x20;

`GET https://{1kosmos_host}/workflowapi/workflow_instance/{wfInstanceId}/result_summary`&#x20;

`Accept: application/json`&#x20;

`keyId: {keyId}`&#x20;

`keySecret: {keySecret}`&#x20;

`license: {license}`&#x20;

`requestfromswagger: true`&#x20;

#### Response&#x20;

`{`&#x20;

&#x20;   `"data": {`&#x20;

&#x20;       `"communityId": "{community_id}",`&#x20;

&#x20;       `"createdAt": "2026-06-08T14:27:30.345Z",`&#x20;

&#x20;       `"expiresAt": "2026-06-15T14:27:30.345Z",`&#x20;

&#x20;       `"metaData": {`&#x20;

&#x20;           `"email": "{email}",`&#x20;

&#x20;           `"firstName": "{first_name}",`&#x20;

&#x20;           `"identityId": "{identity_id}",`&#x20;

&#x20;           `"lastName": "{last_name}"`&#x20;

&#x20;       `},`&#x20;

&#x20;       `"startAt": "2026-06-08T14:28:09.983Z",`&#x20;

&#x20;       `"status": "COMPLETED",`&#x20;

&#x20;       `"summary": {`&#x20;

&#x20;           `"docsScanned": ["PASSPORT"],`&#x20;

&#x20;           `"person_info": {`&#x20;

&#x20;               `"dob": "{dob}",`&#x20;

&#x20;               `"firstName": "{first_name}",`&#x20;

&#x20;               `"lastName": "{last_name}"`&#x20;

&#x20;           `}`&#x20;

&#x20;       `},`&#x20;

&#x20;       `"tenantId": "{tenant_id}",`&#x20;

&#x20;       `"updatedAt": "2026-06-08T14:29:03.655Z",`&#x20;

&#x20;       `"wfInstanceId": "{wfInstanceId}",`&#x20;

&#x20;       `"workflowId": "{workflowId}"`&#x20;

&#x20;   `},`&#x20;

&#x20;   `"publicKey": "{publicKey}",`&#x20;

&#x20;   `"signature_token": "{signature_token}"`&#x20;

`}`&#x20;

#### Update Account&#x20;

Add an HTTP Request step that calls the SailPoint PATCH /v3/accounts/{id} API to write the result onto the account, using the internal account id from Step 2 and the status from Step 3.&#x20;

An HTTP Request step is used here rather than a built-in account-update step, since SailPoint's Workflow Builder doesn't currently include a step that can patch arbitrary account attributes like this — calling the API directly is the way to do it.&#x20;

&#x20;

`PATCH https://{tenant}.api.{domain}.com/v3/accounts/{account_id}`&#x20;

`Authorization: Bearer {access_token}`&#x20;

`Content-Type: application/json-patch+json` &#x20;

`[`&#x20;

&#x20;   `{`&#x20;

&#x20;       `"op": "add",`&#x20;

&#x20;       `"path": "/attributes/idvStatus",`&#x20;

&#x20;       `"value": "{{$.hTTPRequest.body.data.status}}"`&#x20;

&#x20;   `},`&#x20;

&#x20;   `{`&#x20;

&#x20;       `"op": "add",`&#x20;

&#x20;       `"path": "/attributes/updateDate",`&#x20;

&#x20;       `"value": "{{$.now()}}"`&#x20;

&#x20;   `}`&#x20;

`]`&#x20;

&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.1kosmos.com/integrations/identity-verification/sailpoint-identity-verification-for-workflows/sailpoint-workflows/workflow-2-record-the-verification-result.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
