ConnectCases / Client / create_template

create_template#

ConnectCases.Client.create_template(**kwargs)#

Creates a template in the Cases domain. This template is used to define the case object model (that is, to define what data can be captured on cases) in a Cases domain. A template must have a unique name within a domain, and it must reference existing field IDs and layout IDs. Additionally, multiple fields with same IDs are not allowed within the same Template. A template can be either Active or Inactive, as indicated by its status. Inactive templates cannot be used to create cases.

See also: AWS API Documentation

Request Syntax

response = client.create_template(
    description='string',
    domainId='string',
    layoutConfiguration={
        'defaultLayout': 'string'
    },
    name='string',
    requiredFields=[
        {
            'fieldId': 'string'
        },
    ],
    status='Active'|'Inactive'
)
Parameters:
  • description (string) – A brief description of the template.

  • domainId (string) –

    [REQUIRED]

    The unique identifier of the Cases domain.

  • layoutConfiguration (dict) –

    Configuration of layouts associated to the template.

    • defaultLayout (string) –

      Unique identifier of a layout.

  • name (string) –

    [REQUIRED]

    A name for the template. It must be unique per domain.

  • requiredFields (list) –

    A list of fields that must contain a value for a case to be successfully created with this template.

    • (dict) –

      List of fields that must have a value provided to create a case.

      • fieldId (string) – [REQUIRED]

        Unique identifier of a field.

  • status (string) – The status of the template.

Return type:

dict

Returns:

Response Syntax

{
    'templateArn': 'string',
    'templateId': 'string'
}

Response Structure

  • (dict) –

    • templateArn (string) –

      The Amazon Resource Name (ARN) of the newly created template.

    • templateId (string) –

      A unique identifier of a template.

Exceptions

  • ConnectCases.Client.exceptions.InternalServerException

  • ConnectCases.Client.exceptions.ResourceNotFoundException

  • ConnectCases.Client.exceptions.ValidationException

  • ConnectCases.Client.exceptions.ThrottlingException

  • ConnectCases.Client.exceptions.AccessDeniedException

  • ConnectCases.Client.exceptions.ConflictException

  • ConnectCases.Client.exceptions.ServiceQuotaExceededException