# Claim Creation Workflows

###

There are a few steps to claim creation, regarding the API;

* Figuring out the correct claim type to use
* Getting the FNOL for that claim type
* Submitting the claim

#### Figuring out the claim type <a href="#figuring-out-the-claim-type" id="figuring-out-the-claim-type"></a>

There are a multitude ways to do this, and it depends purely on the type of integration used. It could be any one or combination of the following;

* You are provided the claim type UUID for the relevant claim type of your integration
* You use the "Get Claim Types" endpoint to retrieve a list of relevant claim types given a policy name. You would then ask the customer which claim type they wish to use (or potentially pick for them based on some automated criteria)
  * Note this is generally not used for the XCover platform
* You use a claim selector designed by the claims team, which will guide your customers to the correct claim type through a series of questions. In this case, you will be provided a claim selector UUID to use with the "Get Claim Selector" endpoint.

#### Submitting the claim <a href="#submitting-the-claim" id="submitting-the-claim"></a>

This is the key part of the whole process. Once you have the correct claim type UUID, you will use the "Get FNOL" endpoint to retrieve the list of questions you need to ask the customer.

How you go about collecting this information is up to you, and there is no right or wrong way, and in some cases you may already have some or all of it beforehand, which means the whole process could be automated on your end if you so choose.

#### Uploading files <a href="#uploading-files" id="uploading-files"></a>

An important process to cover is the uploading of files. If you need to attach customers' file(s) to the claim being created, you will need to actually upload the files before the "Create new claim" request, and use the UUIDs returned by the file creation endpoint, as the value of those file fields as described in the FNOL.

For any file field, you can either use a single UUID string (of an uploaded file) as the value for that field, or you can use a json array of UUID strings as the value of that field. In summary, to be flexible, each file field supports either one or an array of an arbitrary number of files.

#### Providing claimant details <a href="#providing-claimant-details" id="providing-claimant-details"></a>

Note that when creating a claim, you need to always include a section providing information about the claimant. This section is called "claimantSection", and it is required for new claim creation - however it is typically not found in the FNOL.

The reason for that is that in most cases you would already have some or all of this information, so for the convenience of using the FNOL as the basis of form builders, the requirement of this section is implied rather than stated explicitly.

The following is a list of fields that you can pass. All of these are `string` fields.

* `firstName`
* `middleName`
* `lastName`
* `email`
* `phone`
* `stateProvince`
* `city`
* `postalCode`
* `country`
* `address1`
* `address2`

In terms of validation, there are several things to note.

* For `email`, the typical email validations apply.
* For `phone`, the number must be provided in `E.164` format (for example `+551155256325` or `+61466024743`)
* The mandatory fields are `firstName`, and at least one of either `email` or `phone`

The email and/or phone fields are used to send claimants various communications regarding the progress of the claim, and later on payment (as applicable).


---

# Agent Instructions: 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:

```
GET https://docs.covergenius.com/xclaim-api-partner-docs/claim-creation-workflows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
