# Jurisdictions



Jurisdictions represent areas governed by distinct government entities, such as U.S. states. Insurance product details may vary by jurisdiction based on government regulations or market characteristics.

To support this differentiation, quotes, policies, and resources can be associated with jurisdictions.

Resource Selection [#resource-selection]

Jurisdictions affect [resource selection](/configuration/resources/versioned-resource-selection) logic. The system executes the following logic when selecting resources:

\| Given a quote or policy, and the `staticName` of a resource, for each [resource group](/configuration/resources/versioned-resource-selection#key_concepts) with a `selectionStartTime` equal to or earlier than the current time:
|
\| The system will identify the resource instance associated with the jurisdiction that matches the jurisdiction associated with the quote or policy, if it exists in the resource group, and add it to a temporary list.
|
\| If no such resource instance exists in the resource group, the system will identify the resource instance that is not associated with any jurisdiction, if it exists in the resource group, and add it to the temporary list.
|
\| The system will then select the resource instance with the most recent `selectionStartTime` from the temporary list.

The [Resource Selector](/configuration/plugins/overview#resource_selector), [Document Selection Plugin](/configuration/plugins/document-selection), and the default document selection flow all execute the resource selection logic described above.

<Callout>
  Jurisdictions will be incorporated into future features, including producer management and tax management.
</Callout>

Configuration [#configuration]

Jurisdictions must be defined in the `jurisdictions` configuration object before they can be associated with quotes, policies, or resources. Each jurisdiction is represented by a map between the jurisdiction name and an optional <ApiLink name="JurisdictionRef" /> object, which can be used to specify the display name and display order.

For example:

```json
{
	"jurisdictions": {
		"CA": {
			"displayHints": {
				"displayName": "California",
				"displayOrder": 1
			}
		},
		"FL": {}
	}
}
```

<Callout type="warn">
  Once a new jurisdiction has been deployed, it will be permanently added to the system.
</Callout>

You can force a product to be associated with a jurisdiction by setting the `requiresJurisdiction` flag to `true` in the <ApiLink name="ProductRef" /> object. Enabling this flag will cause validation requests for quotes and policy transactions without an associated jurisdiction to fail.

For example:

```json
{
	"requiresJurisdiction": true
}
```

Implementation [#implementation]

Quotes and Policies [#quotes-and-policies]

Once your configuration changes have been deployed, you can specify the name of a jurisdiction to associate with a quote or policy in the `jurisdiction` field when using the Socotra API to create or update [quotes](/api/quotes/quotes) and policies. Quotes and policies can only be associated with a maximum of one jurisdiction.

Here's an example of the `jurisdiction` field when sending a request to the <ApiLink name="createQuote">Create a Quote</ApiLink> API endpoint:

```json
{
	"jurisdiction": "CA"
}
```

The <ApiLink name="updatePolicyJurisdiction">Update Policy Jurisdiction</ApiLink> API endpoint can be used to update the jurisdiction associated with a policy directly.

Resources [#resources]

You can specify the name of one or more jurisdictions to associate with resources such as [documents](/api/resources/document-resources), [tables](/api/resources/tables), and [secrets](/api/resources/secrets) when using the Socotra API to create or update resources.

Here's an example of the `jurisdiction` query parameter when sending a request to the <ApiLink name="createDocumentResource">Create a New Document Resource</ApiLink> API endpoint:

```
jurisdiction=CA&jurisdiction=FL
```

<Callout type="warn">
  No jurisdiction can appear more than once across resource instances with the same `staticName` within the same resource group.
</Callout>

See Also [#see-also]

* [Versioned Resource Selection](/configuration/resources/versioned-resource-selection)
* [Resource Selector](/configuration/plugins/overview#resource_selector)
* [Document Selection Plugin](/configuration/plugins/document-selection)
* <ApiLink name="JurisdictionRef" />
* <ApiLink name="ProductRef" />
* [Quotes API](/api/quotes/quotes)
* [Policies API](/api/policy-management/policies)
* [Resources API Index](/api/resources/resource-service)
