---
schema_version: "1"
id: 94efcb1d51de05fc1d14f05c06bc379817a586cf1f77c329c89b89129280ac1b
title: Document Template Match
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/health_cloud_object_reference/connect_resource_document_template_match.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.health_cloud_object_reference.meta/health_cloud_object_reference/connect_resource_document_template_match.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 3cd87fda0af57c27bec1073d4b4e3f6e4830fee5a0732b760bd4c5232ad0d4bb
description: Automatically identifies the Document AI Automation template for a specified document.
---
# Document Template Match

Automatically identifies the Document AI Automation template for a specified document.

## Resource

/connect/document-ai-automation/actions/match-template

## Available Version

67.0

## HTTP Methods

POST

## Properties

| Property Name | Type | Description | Required or Optional |
| --- | --- | --- | --- |
| sourceType | String | The source type of the document. Valid values are ContentDocument, AmazonS3, or ContentHub. | Required |
| contentDocumentId | String | The native Salesforce ContentDocument ID. | Required when sourceType is set to ContentDocument. |
| documentUrl | String | The pre-signed Amazon S3 URL pointing to the document location. | Required when sourceType is set to AmazonS3. |
| contentHubRepositoryId | String | The Content Hub repository ID for the external connection. | Required when sourceType is set to ContentHub. |
| externalId | String | The external object key within the Content Hub repository. | Required when sourceType is set to ContentHub. |
| templates | List<String> | A list of template IDs or developer names to match against. If omitted, the top 20 newest active templates are considered. | Optional |

## Response Body for POST

[Template Match Output](https://developer.salesforce.com/docs/atlas.en-us.health_cloud_object_reference.meta/health_cloud_object_reference/connect_response_template_match_output.htm "Output details returning matched document templates.")