Connect / Client / create_extraction_definition

create_extraction_definition

Connect.Client.create_extraction_definition(**kwargs)

Creates an extraction definition in the specified Connect Customer instance. An extraction definition specifies how structured data is extracted from customer interactions using generative AI, including the prompt hint that guides extraction and the behavior when a value cannot be found.

See also: AWS API Documentation

Request Syntax

response = client.create_extraction_definition(
    ClientToken='string',
    InstanceId='string',
    Name='string',
    ExtractionConfiguration={
        'PromptHint': 'string',
        'NotFoundBehavior': {
            'Behavior': 'USE_DEFAULT_VALUE'|'OMIT',
            'DefaultValue': 'string'
        }
    },
    Display={
        'Label': 'string'
    },
    Tags={
        'string': 'string'
    }
)
Parameters:
  • ClientToken (string) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field.

    This field is autopopulated if not provided.

  • InstanceId (string) –

    [REQUIRED]

    The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

  • Name (string) –

    [REQUIRED]

    A unique name of the extraction definition.

  • ExtractionConfiguration (dict) –

    [REQUIRED]

    The configuration that defines how data is extracted, including the prompt hint and not-found behavior.

    • PromptHint (string) – [REQUIRED]

      The prompt hint that guides the extraction. This text tells the generative AI model what data to look for in the customer interaction.

    • NotFoundBehavior (dict) –

      The behavior when the extraction cannot find the specified data in the interaction.

      • Behavior (string) – [REQUIRED]

        The behavior type. USE_DEFAULT_VALUE returns the specified default value. OMIT excludes the field from the output.

      • DefaultValue (string) –

        The default value to use when the behavior is USE_DEFAULT_VALUE.

  • Display (dict) –

    The display settings for the extraction definition, including the label shown in the agent workspace.

    • Label (string) –

      The label displayed in the agent workspace for this extraction definition.

  • Tags (dict) –

    The tags used to organize, track, or control access for this resource.

    • (string) –

      • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'ExtractionDefinitionArn': 'string',
    'ExtractionDefinitionId': 'string'
}

Response Structure

  • (dict) –

    • ExtractionDefinitionArn (string) –

      The Amazon Resource Name (ARN) of the extraction definition.

    • ExtractionDefinitionId (string) –

      The identifier of the extraction definition.

Exceptions