Amazon Q Connect

2025/11/21 - Amazon Q Connect - 9 updated api methods

Changes  This release introduces two new messaging channel subtypes: Push, WhatsApp, under MessageTemplate which is a resource in Amazon Q in Connect.

CreateMessageTemplate (updated) Link ¶
Changes (request, response)
Request
{'channelSubtype': {'WHATSAPP', 'PUSH'},
 'content': {'push': {'adm': {'action': 'OPEN_APP | DEEP_LINK | URL',
                              'body': {'content': 'string'},
                              'imageIconUrl': 'string',
                              'imageUrl': 'string',
                              'rawContent': {'content': 'string'},
                              'smallImageIconUrl': 'string',
                              'sound': 'string',
                              'title': 'string',
                              'url': 'string'},
                      'apns': {'action': 'OPEN_APP | DEEP_LINK | URL',
                               'body': {'content': 'string'},
                               'mediaUrl': 'string',
                               'rawContent': {'content': 'string'},
                               'sound': 'string',
                               'title': 'string',
                               'url': 'string'},
                      'baidu': {'action': 'OPEN_APP | DEEP_LINK | URL',
                                'body': {'content': 'string'},
                                'imageIconUrl': 'string',
                                'imageUrl': 'string',
                                'rawContent': {'content': 'string'},
                                'smallImageIconUrl': 'string',
                                'sound': 'string',
                                'title': 'string',
                                'url': 'string'},
                      'fcm': {'action': 'OPEN_APP | DEEP_LINK | URL',
                              'body': {'content': 'string'},
                              'imageIconUrl': 'string',
                              'imageUrl': 'string',
                              'rawContent': {'content': 'string'},
                              'smallImageIconUrl': 'string',
                              'sound': 'string',
                              'title': 'string',
                              'url': 'string'}},
             'whatsApp': {'data': 'string'}},
 'sourceConfiguration': {'whatsApp': {'businessAccountId': 'string',
                                      'components': ['string'],
                                      'templateId': 'string'}}}
Response
{'messageTemplate': {'channel': 'string',
                     'channelSubtype': {'WHATSAPP', 'PUSH'},
                     'content': {'push': {'adm': {'action': 'OPEN_APP | '
                                                            'DEEP_LINK | URL',
                                                  'body': {'content': 'string'},
                                                  'imageIconUrl': 'string',
                                                  'imageUrl': 'string',
                                                  'rawContent': {'content': 'string'},
                                                  'smallImageIconUrl': 'string',
                                                  'sound': 'string',
                                                  'title': 'string',
                                                  'url': 'string'},
                                          'apns': {'action': 'OPEN_APP | '
                                                             'DEEP_LINK | URL',
                                                   'body': {'content': 'string'},
                                                   'mediaUrl': 'string',
                                                   'rawContent': {'content': 'string'},
                                                   'sound': 'string',
                                                   'title': 'string',
                                                   'url': 'string'},
                                          'baidu': {'action': 'OPEN_APP | '
                                                              'DEEP_LINK | URL',
                                                    'body': {'content': 'string'},
                                                    'imageIconUrl': 'string',
                                                    'imageUrl': 'string',
                                                    'rawContent': {'content': 'string'},
                                                    'smallImageIconUrl': 'string',
                                                    'sound': 'string',
                                                    'title': 'string',
                                                    'url': 'string'},
                                          'fcm': {'action': 'OPEN_APP | '
                                                            'DEEP_LINK | URL',
                                                  'body': {'content': 'string'},
                                                  'imageIconUrl': 'string',
                                                  'imageUrl': 'string',
                                                  'rawContent': {'content': 'string'},
                                                  'smallImageIconUrl': 'string',
                                                  'sound': 'string',
                                                  'title': 'string',
                                                  'url': 'string'}},
                                 'whatsApp': {'data': 'string'}},
                     'sourceConfigurationSummary': {'whatsApp': {'businessAccountId': 'string',
                                                                 'components': ['string'],
                                                                 'language': 'string',
                                                                 'name': 'string',
                                                                 'status': 'VALID '
                                                                           '| '
                                                                           'INVALID '
                                                                           '| '
                                                                           'REJECTED',
                                                                 'statusReason': 'string',
                                                                 'templateId': 'string'}}}}

Creates an Amazon Q in Connect message template. The name of the message template has to be unique for each knowledge base. The channel subtype of the message template is immutable and cannot be modified after creation. After the message template is created, you can use the $LATEST qualifier to reference the created message template.

See also: AWS API Documentation

Request Syntax

client.create_message_template(
    knowledgeBaseId='string',
    name='string',
    content={
        'email': {
            'subject': 'string',
            'body': {
                'plainText': {
                    'content': 'string'
                },
                'html': {
                    'content': 'string'
                }
            },
            'headers': [
                {
                    'name': 'string',
                    'value': 'string'
                },
            ]
        },
        'sms': {
            'body': {
                'plainText': {
                    'content': 'string'
                }
            }
        },
        'whatsApp': {
            'data': 'string'
        },
        'push': {
            'adm': {
                'title': 'string',
                'body': {
                    'content': 'string'
                },
                'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'sound': 'string',
                'url': 'string',
                'imageUrl': 'string',
                'imageIconUrl': 'string',
                'smallImageIconUrl': 'string',
                'rawContent': {
                    'content': 'string'
                }
            },
            'apns': {
                'title': 'string',
                'body': {
                    'content': 'string'
                },
                'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'sound': 'string',
                'url': 'string',
                'mediaUrl': 'string',
                'rawContent': {
                    'content': 'string'
                }
            },
            'fcm': {
                'title': 'string',
                'body': {
                    'content': 'string'
                },
                'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'sound': 'string',
                'url': 'string',
                'imageUrl': 'string',
                'imageIconUrl': 'string',
                'smallImageIconUrl': 'string',
                'rawContent': {
                    'content': 'string'
                }
            },
            'baidu': {
                'title': 'string',
                'body': {
                    'content': 'string'
                },
                'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'sound': 'string',
                'url': 'string',
                'imageUrl': 'string',
                'imageIconUrl': 'string',
                'smallImageIconUrl': 'string',
                'rawContent': {
                    'content': 'string'
                }
            }
        }
    },
    description='string',
    channelSubtype='EMAIL'|'SMS'|'WHATSAPP'|'PUSH',
    language='string',
    sourceConfiguration={
        'whatsApp': {
            'businessAccountId': 'string',
            'templateId': 'string',
            'components': [
                'string',
            ]
        }
    },
    defaultAttributes={
        'systemAttributes': {
            'name': 'string',
            'customerEndpoint': {
                'address': 'string'
            },
            'systemEndpoint': {
                'address': 'string'
            }
        },
        'agentAttributes': {
            'firstName': 'string',
            'lastName': 'string'
        },
        'customerProfileAttributes': {
            'profileId': 'string',
            'profileARN': 'string',
            'firstName': 'string',
            'middleName': 'string',
            'lastName': 'string',
            'accountNumber': 'string',
            'emailAddress': 'string',
            'phoneNumber': 'string',
            'additionalInformation': 'string',
            'partyType': 'string',
            'businessName': 'string',
            'birthDate': 'string',
            'gender': 'string',
            'mobilePhoneNumber': 'string',
            'homePhoneNumber': 'string',
            'businessPhoneNumber': 'string',
            'businessEmailAddress': 'string',
            'address1': 'string',
            'address2': 'string',
            'address3': 'string',
            'address4': 'string',
            'city': 'string',
            'county': 'string',
            'country': 'string',
            'postalCode': 'string',
            'province': 'string',
            'state': 'string',
            'shippingAddress1': 'string',
            'shippingAddress2': 'string',
            'shippingAddress3': 'string',
            'shippingAddress4': 'string',
            'shippingCity': 'string',
            'shippingCounty': 'string',
            'shippingCountry': 'string',
            'shippingPostalCode': 'string',
            'shippingProvince': 'string',
            'shippingState': 'string',
            'mailingAddress1': 'string',
            'mailingAddress2': 'string',
            'mailingAddress3': 'string',
            'mailingAddress4': 'string',
            'mailingCity': 'string',
            'mailingCounty': 'string',
            'mailingCountry': 'string',
            'mailingPostalCode': 'string',
            'mailingProvince': 'string',
            'mailingState': 'string',
            'billingAddress1': 'string',
            'billingAddress2': 'string',
            'billingAddress3': 'string',
            'billingAddress4': 'string',
            'billingCity': 'string',
            'billingCounty': 'string',
            'billingCountry': 'string',
            'billingPostalCode': 'string',
            'billingProvince': 'string',
            'billingState': 'string',
            'custom': {
                'string': 'string'
            }
        },
        'customAttributes': {
            'string': 'string'
        }
    },
    groupingConfiguration={
        'criteria': 'string',
        'values': [
            'string',
        ]
    },
    clientToken='string',
    tags={
        'string': 'string'
    }
)
type knowledgeBaseId:

string

param knowledgeBaseId:

[REQUIRED]

The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

type name:

string

param name:

The name of the message template.

type content:

dict

param content:

The content of the message template.

  • email (dict) --

    The content of the message template that applies to the email channel subtype.

    • subject (string) --

      The subject line, or title, to use in email messages.

    • body (dict) --

      The body to use in email messages.

      • plainText (dict) --

        The message body, in plain text format, to use in email messages that are based on the message template. We recommend using plain text format for email clients that don't render HTML content and clients that are connected to high-latency networks, such as mobile devices.

        • content (string) --

          The content of the message template.

      • html (dict) --

        The message body, in HTML format, to use in email messages that are based on the message template. We recommend using HTML format for email clients that render HTML content. You can include links, formatted text, and more in an HTML message.

        • content (string) --

          The content of the message template.

    • headers (list) --

      The email headers to include in email messages.

      • (dict) --

        The email header to include in email messages.

        • name (string) --

          The name of the email header.

        • value (string) --

          The value of the email header.

  • sms (dict) --

    The content of the message template that applies to the SMS channel subtype.

    • body (dict) --

      The body to use in SMS messages.

      • plainText (dict) --

        The message body to use in SMS messages.

        • content (string) --

          The content of the message template.

  • whatsApp (dict) --

    The content of the message template that applies to the WHATSAPP channel subtype.

    • data (string) --

      The data.

  • push (dict) --

    The content of the message template that applies to the push channel subtype.

    • adm (dict) --

      The content of the message template that applies to ADM (Amazon Device Messaging) notification service.

      • title (string) --

        The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

      • body (dict) --

        The message body to use in a push notification that is based on the message template.

        • content (string) --

          The content of the message template.

      • action (string) --

        The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

        • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

        • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

        • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

      • sound (string) --

        The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

      • url (string) --

        The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

      • imageUrl (string) --

        The URL of an image to display in a push notification that's based on the message template.

      • imageIconUrl (string) --

        The URL of the large icon image to display in the content view of a push notification that's based on the message template.

      • smallImageIconUrl (string) --

        The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

      • rawContent (dict) --

        The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

        • content (string) --

          The content of the message template.

    • apns (dict) --

      The content of the message template that applies to APNS(Apple Push Notification service) notification service.

      • title (string) --

        The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

      • body (dict) --

        The message body to use in a push notification that is based on the message template.

        • content (string) --

          The content of the message template.

      • action (string) --

        The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

        • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

        • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the iOS platform.

        • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

      • sound (string) --

        The key for the sound to play when the recipient receives a push notification that's based on the message template. The value for this key is the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.

      • url (string) --

        The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

      • mediaUrl (string) --

        The URL of an image or video to display in push notifications that are based on the message template.

      • rawContent (dict) --

        The raw, JSON-formatted string to use as the payload for a push notification that's based on the message template. If specified, this value overrides all other content for the message template.

        • content (string) --

          The content of the message template.

    • fcm (dict) --

      The content of the message template that applies to FCM (Firebase Cloud Messaging) notification service.

      • title (string) --

        The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

      • body (dict) --

        The message body to use in a push notification that is based on the message template.

        • content (string) --

          The content of the message template.

      • action (string) --

        The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

        • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

        • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

        • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

      • sound (string) --

        The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

      • url (string) --

        The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

      • imageUrl (string) --

        The URL of an image to display in a push notification that's based on the message template.

      • imageIconUrl (string) --

        The URL of the large icon image to display in the content view of a push notification that's based on the message template.

      • smallImageIconUrl (string) --

        The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

      • rawContent (dict) --

        The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

        • content (string) --

          The content of the message template.

    • baidu (dict) --

      The content of the message template that applies to Baidu notification service.

      • title (string) --

        The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

      • body (dict) --

        The message body to use in a push notification that is based on the message template.

        • content (string) --

          The content of the message template.

      • action (string) --

        The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

        • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

        • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

        • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

      • sound (string) --

        The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

      • url (string) --

        The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

      • imageUrl (string) --

        The URL of an image to display in a push notification that's based on the message template.

      • imageIconUrl (string) --

        The URL of the large icon image to display in the content view of a push notification that's based on the message template.

      • smallImageIconUrl (string) --

        The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

      • rawContent (dict) --

        The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

        • content (string) --

          The content of the message template.

type description:

string

param description:

The description of the message template.

type channelSubtype:

string

param channelSubtype:

[REQUIRED]

The channel subtype this message template applies to.

type language:

string

param language:

The language code value for the language in which the quick response is written. The supported language codes include de_DE, en_US, es_ES, fr_FR, id_ID, it_IT, ja_JP, ko_KR, pt_BR, zh_CN, zh_TW

type sourceConfiguration:

dict

param sourceConfiguration:

The source configuration of the message template. Only set this argument for WHATSAPP channel subtype.

  • whatsApp (dict) --

    The sourceConfiguration of the message template that applies to the WHATSAPP channel subtype.

    • businessAccountId (string) -- [REQUIRED]

      The ID of the End User Messaging WhatsApp Business Account to associate with this template.

    • templateId (string) -- [REQUIRED]

      The WhatsApp template ID.

    • components (list) --

      The list of component mapping from WhatsApp template parameters to Message Template attributes.

      • (string) --

        The component mapping from WhatsApp template parameters to Message Template attributes.

type defaultAttributes:

dict

param defaultAttributes:

An object that specifies the default values to use for variables in the message template. This object contains different categories of key-value pairs. Each key defines a variable or placeholder in the message template. The corresponding value defines the default value for that variable.

  • systemAttributes (dict) --

    The system attributes that are used with the message template.

    • name (string) --

      The name of the task.

    • customerEndpoint (dict) --

      The CustomerEndpoint attribute.

      • address (string) --

        The customer's phone number if used with customerEndpoint, or the number the customer dialed to call your contact center if used with systemEndpoint.

    • systemEndpoint (dict) --

      The SystemEndpoint attribute.

      • address (string) --

        The customer's phone number if used with customerEndpoint, or the number the customer dialed to call your contact center if used with systemEndpoint.

  • agentAttributes (dict) --

    The agent attributes that are used with the message template.

    • firstName (string) --

      The agent’s first name as entered in their Amazon Connect user account.

    • lastName (string) --

      The agent’s last name as entered in their Amazon Connect user account.

  • customerProfileAttributes (dict) --

    The customer profile attributes that are used with the message template.

    • profileId (string) --

      The unique identifier of a customer profile.

    • profileARN (string) --

      The ARN of a customer profile.

    • firstName (string) --

      The customer's first name.

    • middleName (string) --

      The customer's middle name.

    • lastName (string) --

      The customer's last name.

    • accountNumber (string) --

      A unique account number that you have given to the customer.

    • emailAddress (string) --

      The customer's email address, which has not been specified as a personal or business address.

    • phoneNumber (string) --

      The customer's phone number, which has not been specified as a mobile, home, or business number.

    • additionalInformation (string) --

      Any additional information relevant to the customer's profile.

    • partyType (string) --

      The customer's party type.

    • businessName (string) --

      The name of the customer's business.

    • birthDate (string) --

      The customer's birth date.

    • gender (string) --

      The customer's gender.

    • mobilePhoneNumber (string) --

      The customer's mobile phone number.

    • homePhoneNumber (string) --

      The customer's mobile phone number.

    • businessPhoneNumber (string) --

      The customer's business phone number.

    • businessEmailAddress (string) --

      The customer's business email address.

    • address1 (string) --

      The first line of a customer address.

    • address2 (string) --

      The second line of a customer address.

    • address3 (string) --

      The third line of a customer address.

    • address4 (string) --

      The fourth line of a customer address.

    • city (string) --

      The city in which a customer lives.

    • county (string) --

      The county in which a customer lives.

    • country (string) --

      The country in which a customer lives.

    • postalCode (string) --

      The postal code of a customer address.

    • province (string) --

      The province in which a customer lives.

    • state (string) --

      The state in which a customer lives.

    • shippingAddress1 (string) --

      The first line of a customer’s shipping address.

    • shippingAddress2 (string) --

      The second line of a customer’s shipping address.

    • shippingAddress3 (string) --

      The third line of a customer’s shipping address.

    • shippingAddress4 (string) --

      The fourth line of a customer’s shipping address.

    • shippingCity (string) --

      The city of a customer’s shipping address.

    • shippingCounty (string) --

      The county of a customer’s shipping address.

    • shippingCountry (string) --

      The country of a customer’s shipping address.

    • shippingPostalCode (string) --

      The postal code of a customer’s shipping address.

    • shippingProvince (string) --

      The province of a customer’s shipping address.

    • shippingState (string) --

      The state of a customer’s shipping address.

    • mailingAddress1 (string) --

      The first line of a customer’s mailing address.

    • mailingAddress2 (string) --

      The second line of a customer’s mailing address.

    • mailingAddress3 (string) --

      The third line of a customer’s mailing address.

    • mailingAddress4 (string) --

      The fourth line of a customer’s mailing address.

    • mailingCity (string) --

      The city of a customer’s mailing address.

    • mailingCounty (string) --

      The county of a customer’s mailing address.

    • mailingCountry (string) --

      The country of a customer’s mailing address.

    • mailingPostalCode (string) --

      The postal code of a customer’s mailing address.

    • mailingProvince (string) --

      The province of a customer’s mailing address.

    • mailingState (string) --

      The state of a customer’s mailing address.

    • billingAddress1 (string) --

      The first line of a customer’s billing address.

    • billingAddress2 (string) --

      The second line of a customer’s billing address.

    • billingAddress3 (string) --

      The third line of a customer’s billing address.

    • billingAddress4 (string) --

      The fourth line of a customer’s billing address.

    • billingCity (string) --

      The city of a customer’s billing address.

    • billingCounty (string) --

      The county of a customer’s billing address.

    • billingCountry (string) --

      The country of a customer’s billing address.

    • billingPostalCode (string) --

      The postal code of a customer’s billing address.

    • billingProvince (string) --

      The province of a customer’s billing address.

    • billingState (string) --

      The state of a customer’s billing address.

    • custom (dict) --

      The custom attributes in customer profile attributes.

      • (string) --

        • (string) --

  • customAttributes (dict) --

    The custom attributes that are used with the message template.

    • (string) --

      • (string) --

type groupingConfiguration:

dict

param groupingConfiguration:

The configuration information of the grouping of Amazon Q in Connect users.

  • criteria (string) --

    The criteria used for grouping Amazon Q in Connect users.

    The following is the list of supported criteria values.

  • values (list) --

    The list of values that define different groups of Amazon Q in Connect users.

    • (string) --

type clientToken:

string

param clientToken:

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. For more information about idempotency, see Making retries safe with idempotent APIs.

This field is autopopulated if not provided.

type tags:

dict

param tags:

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

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'messageTemplate': {
        'messageTemplateArn': 'string',
        'messageTemplateId': 'string',
        'knowledgeBaseArn': 'string',
        'knowledgeBaseId': 'string',
        'name': 'string',
        'channel': 'string',
        'channelSubtype': 'EMAIL'|'SMS'|'WHATSAPP'|'PUSH',
        'createdTime': datetime(2015, 1, 1),
        'lastModifiedTime': datetime(2015, 1, 1),
        'lastModifiedBy': 'string',
        'content': {
            'email': {
                'subject': 'string',
                'body': {
                    'plainText': {
                        'content': 'string'
                    },
                    'html': {
                        'content': 'string'
                    }
                },
                'headers': [
                    {
                        'name': 'string',
                        'value': 'string'
                    },
                ]
            },
            'sms': {
                'body': {
                    'plainText': {
                        'content': 'string'
                    }
                }
            },
            'whatsApp': {
                'data': 'string'
            },
            'push': {
                'adm': {
                    'title': 'string',
                    'body': {
                        'content': 'string'
                    },
                    'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                    'sound': 'string',
                    'url': 'string',
                    'imageUrl': 'string',
                    'imageIconUrl': 'string',
                    'smallImageIconUrl': 'string',
                    'rawContent': {
                        'content': 'string'
                    }
                },
                'apns': {
                    'title': 'string',
                    'body': {
                        'content': 'string'
                    },
                    'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                    'sound': 'string',
                    'url': 'string',
                    'mediaUrl': 'string',
                    'rawContent': {
                        'content': 'string'
                    }
                },
                'fcm': {
                    'title': 'string',
                    'body': {
                        'content': 'string'
                    },
                    'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                    'sound': 'string',
                    'url': 'string',
                    'imageUrl': 'string',
                    'imageIconUrl': 'string',
                    'smallImageIconUrl': 'string',
                    'rawContent': {
                        'content': 'string'
                    }
                },
                'baidu': {
                    'title': 'string',
                    'body': {
                        'content': 'string'
                    },
                    'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                    'sound': 'string',
                    'url': 'string',
                    'imageUrl': 'string',
                    'imageIconUrl': 'string',
                    'smallImageIconUrl': 'string',
                    'rawContent': {
                        'content': 'string'
                    }
                }
            }
        },
        'description': 'string',
        'language': 'string',
        'sourceConfigurationSummary': {
            'whatsApp': {
                'businessAccountId': 'string',
                'templateId': 'string',
                'name': 'string',
                'language': 'string',
                'components': [
                    'string',
                ],
                'status': 'VALID'|'INVALID'|'REJECTED',
                'statusReason': 'string'
            }
        },
        'groupingConfiguration': {
            'criteria': 'string',
            'values': [
                'string',
            ]
        },
        'defaultAttributes': {
            'systemAttributes': {
                'name': 'string',
                'customerEndpoint': {
                    'address': 'string'
                },
                'systemEndpoint': {
                    'address': 'string'
                }
            },
            'agentAttributes': {
                'firstName': 'string',
                'lastName': 'string'
            },
            'customerProfileAttributes': {
                'profileId': 'string',
                'profileARN': 'string',
                'firstName': 'string',
                'middleName': 'string',
                'lastName': 'string',
                'accountNumber': 'string',
                'emailAddress': 'string',
                'phoneNumber': 'string',
                'additionalInformation': 'string',
                'partyType': 'string',
                'businessName': 'string',
                'birthDate': 'string',
                'gender': 'string',
                'mobilePhoneNumber': 'string',
                'homePhoneNumber': 'string',
                'businessPhoneNumber': 'string',
                'businessEmailAddress': 'string',
                'address1': 'string',
                'address2': 'string',
                'address3': 'string',
                'address4': 'string',
                'city': 'string',
                'county': 'string',
                'country': 'string',
                'postalCode': 'string',
                'province': 'string',
                'state': 'string',
                'shippingAddress1': 'string',
                'shippingAddress2': 'string',
                'shippingAddress3': 'string',
                'shippingAddress4': 'string',
                'shippingCity': 'string',
                'shippingCounty': 'string',
                'shippingCountry': 'string',
                'shippingPostalCode': 'string',
                'shippingProvince': 'string',
                'shippingState': 'string',
                'mailingAddress1': 'string',
                'mailingAddress2': 'string',
                'mailingAddress3': 'string',
                'mailingAddress4': 'string',
                'mailingCity': 'string',
                'mailingCounty': 'string',
                'mailingCountry': 'string',
                'mailingPostalCode': 'string',
                'mailingProvince': 'string',
                'mailingState': 'string',
                'billingAddress1': 'string',
                'billingAddress2': 'string',
                'billingAddress3': 'string',
                'billingAddress4': 'string',
                'billingCity': 'string',
                'billingCounty': 'string',
                'billingCountry': 'string',
                'billingPostalCode': 'string',
                'billingProvince': 'string',
                'billingState': 'string',
                'custom': {
                    'string': 'string'
                }
            },
            'customAttributes': {
                'string': 'string'
            }
        },
        'attributeTypes': [
            'SYSTEM'|'AGENT'|'CUSTOMER_PROFILE'|'CUSTOM',
        ],
        'messageTemplateContentSha256': 'string',
        'tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • messageTemplate (dict) --

      The message template.

      • messageTemplateArn (string) --

        The Amazon Resource Name (ARN) of the message template.

      • messageTemplateId (string) --

        The identifier of the message template.

      • knowledgeBaseArn (string) --

        The Amazon Resource Name (ARN) of the knowledge base.

      • knowledgeBaseId (string) --

        The identifier of the knowledge base.

      • name (string) --

        The name of the message template.

      • channel (string) --

        The channel of the message template.

      • channelSubtype (string) --

        The channel subtype this message template applies to.

      • createdTime (datetime) --

        The timestamp when the message template was created.

      • lastModifiedTime (datetime) --

        The timestamp when the message template data was last modified.

      • lastModifiedBy (string) --

        The Amazon Resource Name (ARN) of the user who last updated the message template data.

      • content (dict) --

        The content of the message template.

        • email (dict) --

          The content of the message template that applies to the email channel subtype.

          • subject (string) --

            The subject line, or title, to use in email messages.

          • body (dict) --

            The body to use in email messages.

            • plainText (dict) --

              The message body, in plain text format, to use in email messages that are based on the message template. We recommend using plain text format for email clients that don't render HTML content and clients that are connected to high-latency networks, such as mobile devices.

              • content (string) --

                The content of the message template.

            • html (dict) --

              The message body, in HTML format, to use in email messages that are based on the message template. We recommend using HTML format for email clients that render HTML content. You can include links, formatted text, and more in an HTML message.

              • content (string) --

                The content of the message template.

          • headers (list) --

            The email headers to include in email messages.

            • (dict) --

              The email header to include in email messages.

              • name (string) --

                The name of the email header.

              • value (string) --

                The value of the email header.

        • sms (dict) --

          The content of the message template that applies to the SMS channel subtype.

          • body (dict) --

            The body to use in SMS messages.

            • plainText (dict) --

              The message body to use in SMS messages.

              • content (string) --

                The content of the message template.

        • whatsApp (dict) --

          The content of the message template that applies to the WHATSAPP channel subtype.

          • data (string) --

            The data.

        • push (dict) --

          The content of the message template that applies to the push channel subtype.

          • adm (dict) --

            The content of the message template that applies to ADM (Amazon Device Messaging) notification service.

            • title (string) --

              The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

            • body (dict) --

              The message body to use in a push notification that is based on the message template.

              • content (string) --

                The content of the message template.

            • action (string) --

              The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

              • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

              • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

              • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

            • sound (string) --

              The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

            • url (string) --

              The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

            • imageUrl (string) --

              The URL of an image to display in a push notification that's based on the message template.

            • imageIconUrl (string) --

              The URL of the large icon image to display in the content view of a push notification that's based on the message template.

            • smallImageIconUrl (string) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

            • rawContent (dict) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

              • content (string) --

                The content of the message template.

          • apns (dict) --

            The content of the message template that applies to APNS(Apple Push Notification service) notification service.

            • title (string) --

              The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

            • body (dict) --

              The message body to use in a push notification that is based on the message template.

              • content (string) --

                The content of the message template.

            • action (string) --

              The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

              • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

              • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the iOS platform.

              • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

            • sound (string) --

              The key for the sound to play when the recipient receives a push notification that's based on the message template. The value for this key is the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.

            • url (string) --

              The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

            • mediaUrl (string) --

              The URL of an image or video to display in push notifications that are based on the message template.

            • rawContent (dict) --

              The raw, JSON-formatted string to use as the payload for a push notification that's based on the message template. If specified, this value overrides all other content for the message template.

              • content (string) --

                The content of the message template.

          • fcm (dict) --

            The content of the message template that applies to FCM (Firebase Cloud Messaging) notification service.

            • title (string) --

              The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

            • body (dict) --

              The message body to use in a push notification that is based on the message template.

              • content (string) --

                The content of the message template.

            • action (string) --

              The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

              • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

              • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

              • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

            • sound (string) --

              The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

            • url (string) --

              The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

            • imageUrl (string) --

              The URL of an image to display in a push notification that's based on the message template.

            • imageIconUrl (string) --

              The URL of the large icon image to display in the content view of a push notification that's based on the message template.

            • smallImageIconUrl (string) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

            • rawContent (dict) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

              • content (string) --

                The content of the message template.

          • baidu (dict) --

            The content of the message template that applies to Baidu notification service.

            • title (string) --

              The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

            • body (dict) --

              The message body to use in a push notification that is based on the message template.

              • content (string) --

                The content of the message template.

            • action (string) --

              The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

              • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

              • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

              • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

            • sound (string) --

              The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

            • url (string) --

              The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

            • imageUrl (string) --

              The URL of an image to display in a push notification that's based on the message template.

            • imageIconUrl (string) --

              The URL of the large icon image to display in the content view of a push notification that's based on the message template.

            • smallImageIconUrl (string) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

            • rawContent (dict) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

              • content (string) --

                The content of the message template.

      • description (string) --

        The description of the message template.

      • language (string) --

        The language code value for the language in which the quick response is written. The supported language codes include de_DE, en_US, es_ES, fr_FR, id_ID, it_IT, ja_JP, ko_KR, pt_BR, zh_CN, zh_TW

      • sourceConfigurationSummary (dict) --

        The source configuration summary of the message template.

        • whatsApp (dict) --

          The sourceConfiguration summary of the message template that applies to the WHATSAPP channel subtype.

          • businessAccountId (string) --

            The ID of the End User Messaging WhatsApp Business Account to associate with this template.

          • templateId (string) --

            The ID of WhatsApp template.

          • name (string) --

            The name of the WhatsApp template.

          • language (string) --

            The language of the WhatsApp template.

          • components (list) --

            The list of component mapping from WhatsApp template parameters to Message Template attributes.

            • (string) --

              The component mapping from WhatsApp template parameters to Message Template attributes.

          • status (string) --

            The status of the message template.

          • statusReason (string) --

            The status reason of the message template.

      • groupingConfiguration (dict) --

        The configuration information of the grouping of Amazon Q in Connect users.

        • criteria (string) --

          The criteria used for grouping Amazon Q in Connect users.

          The following is the list of supported criteria values.

        • values (list) --

          The list of values that define different groups of Amazon Q in Connect users.

          • (string) --

      • defaultAttributes (dict) --

        An object that specifies the default values to use for variables in the message template. This object contains different categories of key-value pairs. Each key defines a variable or placeholder in the message template. The corresponding value defines the default value for that variable.

        • systemAttributes (dict) --

          The system attributes that are used with the message template.

          • name (string) --

            The name of the task.

          • customerEndpoint (dict) --

            The CustomerEndpoint attribute.

            • address (string) --

              The customer's phone number if used with customerEndpoint, or the number the customer dialed to call your contact center if used with systemEndpoint.

          • systemEndpoint (dict) --

            The SystemEndpoint attribute.

            • address (string) --

              The customer's phone number if used with customerEndpoint, or the number the customer dialed to call your contact center if used with systemEndpoint.

        • agentAttributes (dict) --

          The agent attributes that are used with the message template.

          • firstName (string) --

            The agent’s first name as entered in their Amazon Connect user account.

          • lastName (string) --

            The agent’s last name as entered in their Amazon Connect user account.

        • customerProfileAttributes (dict) --

          The customer profile attributes that are used with the message template.

          • profileId (string) --

            The unique identifier of a customer profile.

          • profileARN (string) --

            The ARN of a customer profile.

          • firstName (string) --

            The customer's first name.

          • middleName (string) --

            The customer's middle name.

          • lastName (string) --

            The customer's last name.

          • accountNumber (string) --

            A unique account number that you have given to the customer.

          • emailAddress (string) --

            The customer's email address, which has not been specified as a personal or business address.

          • phoneNumber (string) --

            The customer's phone number, which has not been specified as a mobile, home, or business number.

          • additionalInformation (string) --

            Any additional information relevant to the customer's profile.

          • partyType (string) --

            The customer's party type.

          • businessName (string) --

            The name of the customer's business.

          • birthDate (string) --

            The customer's birth date.

          • gender (string) --

            The customer's gender.

          • mobilePhoneNumber (string) --

            The customer's mobile phone number.

          • homePhoneNumber (string) --

            The customer's mobile phone number.

          • businessPhoneNumber (string) --

            The customer's business phone number.

          • businessEmailAddress (string) --

            The customer's business email address.

          • address1 (string) --

            The first line of a customer address.

          • address2 (string) --

            The second line of a customer address.

          • address3 (string) --

            The third line of a customer address.

          • address4 (string) --

            The fourth line of a customer address.

          • city (string) --

            The city in which a customer lives.

          • county (string) --

            The county in which a customer lives.

          • country (string) --

            The country in which a customer lives.

          • postalCode (string) --

            The postal code of a customer address.

          • province (string) --

            The province in which a customer lives.

          • state (string) --

            The state in which a customer lives.

          • shippingAddress1 (string) --

            The first line of a customer’s shipping address.

          • shippingAddress2 (string) --

            The second line of a customer’s shipping address.

          • shippingAddress3 (string) --

            The third line of a customer’s shipping address.

          • shippingAddress4 (string) --

            The fourth line of a customer’s shipping address.

          • shippingCity (string) --

            The city of a customer’s shipping address.

          • shippingCounty (string) --

            The county of a customer’s shipping address.

          • shippingCountry (string) --

            The country of a customer’s shipping address.

          • shippingPostalCode (string) --

            The postal code of a customer’s shipping address.

          • shippingProvince (string) --

            The province of a customer’s shipping address.

          • shippingState (string) --

            The state of a customer’s shipping address.

          • mailingAddress1 (string) --

            The first line of a customer’s mailing address.

          • mailingAddress2 (string) --

            The second line of a customer’s mailing address.

          • mailingAddress3 (string) --

            The third line of a customer’s mailing address.

          • mailingAddress4 (string) --

            The fourth line of a customer’s mailing address.

          • mailingCity (string) --

            The city of a customer’s mailing address.

          • mailingCounty (string) --

            The county of a customer’s mailing address.

          • mailingCountry (string) --

            The country of a customer’s mailing address.

          • mailingPostalCode (string) --

            The postal code of a customer’s mailing address.

          • mailingProvince (string) --

            The province of a customer’s mailing address.

          • mailingState (string) --

            The state of a customer’s mailing address.

          • billingAddress1 (string) --

            The first line of a customer’s billing address.

          • billingAddress2 (string) --

            The second line of a customer’s billing address.

          • billingAddress3 (string) --

            The third line of a customer’s billing address.

          • billingAddress4 (string) --

            The fourth line of a customer’s billing address.

          • billingCity (string) --

            The city of a customer’s billing address.

          • billingCounty (string) --

            The county of a customer’s billing address.

          • billingCountry (string) --

            The country of a customer’s billing address.

          • billingPostalCode (string) --

            The postal code of a customer’s billing address.

          • billingProvince (string) --

            The province of a customer’s billing address.

          • billingState (string) --

            The state of a customer’s billing address.

          • custom (dict) --

            The custom attributes in customer profile attributes.

            • (string) --

              • (string) --

        • customAttributes (dict) --

          The custom attributes that are used with the message template.

          • (string) --

            • (string) --

      • attributeTypes (list) --

        The types of attributes that the message template contains.

        • (string) --

      • messageTemplateContentSha256 (string) --

        The checksum value of the message template content that is referenced by the $LATEST qualifier. It can be returned in MessageTemplateData or ExtendedMessageTemplateData. It’s calculated by content, language, defaultAttributes and Attachments of the message template.

      • tags (dict) --

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

        • (string) --

          • (string) --

CreateMessageTemplateVersion (updated) Link ¶
Changes (response)
{'messageTemplate': {'channel': 'string',
                     'channelSubtype': {'WHATSAPP', 'PUSH'},
                     'content': {'push': {'adm': {'action': 'OPEN_APP | '
                                                            'DEEP_LINK | URL',
                                                  'body': {'content': 'string'},
                                                  'imageIconUrl': 'string',
                                                  'imageUrl': 'string',
                                                  'rawContent': {'content': 'string'},
                                                  'smallImageIconUrl': 'string',
                                                  'sound': 'string',
                                                  'title': 'string',
                                                  'url': 'string'},
                                          'apns': {'action': 'OPEN_APP | '
                                                             'DEEP_LINK | URL',
                                                   'body': {'content': 'string'},
                                                   'mediaUrl': 'string',
                                                   'rawContent': {'content': 'string'},
                                                   'sound': 'string',
                                                   'title': 'string',
                                                   'url': 'string'},
                                          'baidu': {'action': 'OPEN_APP | '
                                                              'DEEP_LINK | URL',
                                                    'body': {'content': 'string'},
                                                    'imageIconUrl': 'string',
                                                    'imageUrl': 'string',
                                                    'rawContent': {'content': 'string'},
                                                    'smallImageIconUrl': 'string',
                                                    'sound': 'string',
                                                    'title': 'string',
                                                    'url': 'string'},
                                          'fcm': {'action': 'OPEN_APP | '
                                                            'DEEP_LINK | URL',
                                                  'body': {'content': 'string'},
                                                  'imageIconUrl': 'string',
                                                  'imageUrl': 'string',
                                                  'rawContent': {'content': 'string'},
                                                  'smallImageIconUrl': 'string',
                                                  'sound': 'string',
                                                  'title': 'string',
                                                  'url': 'string'}},
                                 'whatsApp': {'data': 'string'}},
                     'sourceConfigurationSummary': {'whatsApp': {'businessAccountId': 'string',
                                                                 'components': ['string'],
                                                                 'language': 'string',
                                                                 'name': 'string',
                                                                 'status': 'VALID '
                                                                           '| '
                                                                           'INVALID '
                                                                           '| '
                                                                           'REJECTED',
                                                                 'statusReason': 'string',
                                                                 'templateId': 'string'}}}}

Creates a new Amazon Q in Connect message template version from the current content and configuration of a message template. Versions are immutable and monotonically increasing. Once a version is created, you can reference a specific version of the message template by passing in <message-template-id>:<versionNumber> as the message template identifier. An error is displayed if the supplied messageTemplateContentSha256 is different from the messageTemplateContentSha256 of the message template with $LATEST qualifier. If multiple CreateMessageTemplateVersion requests are made while the message template remains the same, only the first invocation creates a new version and the succeeding requests will return the same response as the first invocation.

See also: AWS API Documentation

Request Syntax

client.create_message_template_version(
    knowledgeBaseId='string',
    messageTemplateId='string',
    messageTemplateContentSha256='string'
)
type knowledgeBaseId:

string

param knowledgeBaseId:

[REQUIRED]

The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

type messageTemplateId:

string

param messageTemplateId:

[REQUIRED]

The identifier of the message template. Can be either the ID or the ARN. It cannot contain any qualifier.

type messageTemplateContentSha256:

string

param messageTemplateContentSha256:

The checksum value of the message template content that is referenced by the $LATEST qualifier. It can be returned in MessageTemplateData or ExtendedMessageTemplateData. It’s calculated by content, language, defaultAttributes and Attachments of the message template. If not supplied, the message template version will be created based on the message template content that is referenced by the $LATEST qualifier by default.

rtype:

dict

returns:

Response Syntax

{
    'messageTemplate': {
        'messageTemplateArn': 'string',
        'messageTemplateId': 'string',
        'knowledgeBaseArn': 'string',
        'knowledgeBaseId': 'string',
        'name': 'string',
        'channel': 'string',
        'channelSubtype': 'EMAIL'|'SMS'|'WHATSAPP'|'PUSH',
        'createdTime': datetime(2015, 1, 1),
        'lastModifiedTime': datetime(2015, 1, 1),
        'lastModifiedBy': 'string',
        'content': {
            'email': {
                'subject': 'string',
                'body': {
                    'plainText': {
                        'content': 'string'
                    },
                    'html': {
                        'content': 'string'
                    }
                },
                'headers': [
                    {
                        'name': 'string',
                        'value': 'string'
                    },
                ]
            },
            'sms': {
                'body': {
                    'plainText': {
                        'content': 'string'
                    }
                }
            },
            'whatsApp': {
                'data': 'string'
            },
            'push': {
                'adm': {
                    'title': 'string',
                    'body': {
                        'content': 'string'
                    },
                    'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                    'sound': 'string',
                    'url': 'string',
                    'imageUrl': 'string',
                    'imageIconUrl': 'string',
                    'smallImageIconUrl': 'string',
                    'rawContent': {
                        'content': 'string'
                    }
                },
                'apns': {
                    'title': 'string',
                    'body': {
                        'content': 'string'
                    },
                    'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                    'sound': 'string',
                    'url': 'string',
                    'mediaUrl': 'string',
                    'rawContent': {
                        'content': 'string'
                    }
                },
                'fcm': {
                    'title': 'string',
                    'body': {
                        'content': 'string'
                    },
                    'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                    'sound': 'string',
                    'url': 'string',
                    'imageUrl': 'string',
                    'imageIconUrl': 'string',
                    'smallImageIconUrl': 'string',
                    'rawContent': {
                        'content': 'string'
                    }
                },
                'baidu': {
                    'title': 'string',
                    'body': {
                        'content': 'string'
                    },
                    'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                    'sound': 'string',
                    'url': 'string',
                    'imageUrl': 'string',
                    'imageIconUrl': 'string',
                    'smallImageIconUrl': 'string',
                    'rawContent': {
                        'content': 'string'
                    }
                }
            }
        },
        'description': 'string',
        'language': 'string',
        'sourceConfigurationSummary': {
            'whatsApp': {
                'businessAccountId': 'string',
                'templateId': 'string',
                'name': 'string',
                'language': 'string',
                'components': [
                    'string',
                ],
                'status': 'VALID'|'INVALID'|'REJECTED',
                'statusReason': 'string'
            }
        },
        'groupingConfiguration': {
            'criteria': 'string',
            'values': [
                'string',
            ]
        },
        'defaultAttributes': {
            'systemAttributes': {
                'name': 'string',
                'customerEndpoint': {
                    'address': 'string'
                },
                'systemEndpoint': {
                    'address': 'string'
                }
            },
            'agentAttributes': {
                'firstName': 'string',
                'lastName': 'string'
            },
            'customerProfileAttributes': {
                'profileId': 'string',
                'profileARN': 'string',
                'firstName': 'string',
                'middleName': 'string',
                'lastName': 'string',
                'accountNumber': 'string',
                'emailAddress': 'string',
                'phoneNumber': 'string',
                'additionalInformation': 'string',
                'partyType': 'string',
                'businessName': 'string',
                'birthDate': 'string',
                'gender': 'string',
                'mobilePhoneNumber': 'string',
                'homePhoneNumber': 'string',
                'businessPhoneNumber': 'string',
                'businessEmailAddress': 'string',
                'address1': 'string',
                'address2': 'string',
                'address3': 'string',
                'address4': 'string',
                'city': 'string',
                'county': 'string',
                'country': 'string',
                'postalCode': 'string',
                'province': 'string',
                'state': 'string',
                'shippingAddress1': 'string',
                'shippingAddress2': 'string',
                'shippingAddress3': 'string',
                'shippingAddress4': 'string',
                'shippingCity': 'string',
                'shippingCounty': 'string',
                'shippingCountry': 'string',
                'shippingPostalCode': 'string',
                'shippingProvince': 'string',
                'shippingState': 'string',
                'mailingAddress1': 'string',
                'mailingAddress2': 'string',
                'mailingAddress3': 'string',
                'mailingAddress4': 'string',
                'mailingCity': 'string',
                'mailingCounty': 'string',
                'mailingCountry': 'string',
                'mailingPostalCode': 'string',
                'mailingProvince': 'string',
                'mailingState': 'string',
                'billingAddress1': 'string',
                'billingAddress2': 'string',
                'billingAddress3': 'string',
                'billingAddress4': 'string',
                'billingCity': 'string',
                'billingCounty': 'string',
                'billingCountry': 'string',
                'billingPostalCode': 'string',
                'billingProvince': 'string',
                'billingState': 'string',
                'custom': {
                    'string': 'string'
                }
            },
            'customAttributes': {
                'string': 'string'
            }
        },
        'attributeTypes': [
            'SYSTEM'|'AGENT'|'CUSTOMER_PROFILE'|'CUSTOM',
        ],
        'attachments': [
            {
                'contentDisposition': 'ATTACHMENT',
                'name': 'string',
                'uploadedTime': datetime(2015, 1, 1),
                'url': 'string',
                'urlExpiry': datetime(2015, 1, 1),
                'attachmentId': 'string'
            },
        ],
        'isActive': True|False,
        'versionNumber': 123,
        'messageTemplateContentSha256': 'string',
        'tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • messageTemplate (dict) --

      The message template.

      • messageTemplateArn (string) --

        The Amazon Resource Name (ARN) of the message template.

      • messageTemplateId (string) --

        The identifier of the message template.

      • knowledgeBaseArn (string) --

        The Amazon Resource Name (ARN) of the knowledge base.

      • knowledgeBaseId (string) --

        The identifier of the knowledge base.

      • name (string) --

        The name of the message template.

      • channel (string) --

        The channel of the message template.

      • channelSubtype (string) --

        The channel subtype this message template applies to.

      • createdTime (datetime) --

        The timestamp when the message template was created.

      • lastModifiedTime (datetime) --

        The timestamp when the message template data was last modified.

      • lastModifiedBy (string) --

        The Amazon Resource Name (ARN) of the user who last updated the message template data.

      • content (dict) --

        The content of the message template.

        • email (dict) --

          The content of the message template that applies to the email channel subtype.

          • subject (string) --

            The subject line, or title, to use in email messages.

          • body (dict) --

            The body to use in email messages.

            • plainText (dict) --

              The message body, in plain text format, to use in email messages that are based on the message template. We recommend using plain text format for email clients that don't render HTML content and clients that are connected to high-latency networks, such as mobile devices.

              • content (string) --

                The content of the message template.

            • html (dict) --

              The message body, in HTML format, to use in email messages that are based on the message template. We recommend using HTML format for email clients that render HTML content. You can include links, formatted text, and more in an HTML message.

              • content (string) --

                The content of the message template.

          • headers (list) --

            The email headers to include in email messages.

            • (dict) --

              The email header to include in email messages.

              • name (string) --

                The name of the email header.

              • value (string) --

                The value of the email header.

        • sms (dict) --

          The content of the message template that applies to the SMS channel subtype.

          • body (dict) --

            The body to use in SMS messages.

            • plainText (dict) --

              The message body to use in SMS messages.

              • content (string) --

                The content of the message template.

        • whatsApp (dict) --

          The content of the message template that applies to the WHATSAPP channel subtype.

          • data (string) --

            The data.

        • push (dict) --

          The content of the message template that applies to the push channel subtype.

          • adm (dict) --

            The content of the message template that applies to ADM (Amazon Device Messaging) notification service.

            • title (string) --

              The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

            • body (dict) --

              The message body to use in a push notification that is based on the message template.

              • content (string) --

                The content of the message template.

            • action (string) --

              The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

              • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

              • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

              • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

            • sound (string) --

              The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

            • url (string) --

              The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

            • imageUrl (string) --

              The URL of an image to display in a push notification that's based on the message template.

            • imageIconUrl (string) --

              The URL of the large icon image to display in the content view of a push notification that's based on the message template.

            • smallImageIconUrl (string) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

            • rawContent (dict) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

              • content (string) --

                The content of the message template.

          • apns (dict) --

            The content of the message template that applies to APNS(Apple Push Notification service) notification service.

            • title (string) --

              The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

            • body (dict) --

              The message body to use in a push notification that is based on the message template.

              • content (string) --

                The content of the message template.

            • action (string) --

              The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

              • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

              • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the iOS platform.

              • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

            • sound (string) --

              The key for the sound to play when the recipient receives a push notification that's based on the message template. The value for this key is the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.

            • url (string) --

              The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

            • mediaUrl (string) --

              The URL of an image or video to display in push notifications that are based on the message template.

            • rawContent (dict) --

              The raw, JSON-formatted string to use as the payload for a push notification that's based on the message template. If specified, this value overrides all other content for the message template.

              • content (string) --

                The content of the message template.

          • fcm (dict) --

            The content of the message template that applies to FCM (Firebase Cloud Messaging) notification service.

            • title (string) --

              The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

            • body (dict) --

              The message body to use in a push notification that is based on the message template.

              • content (string) --

                The content of the message template.

            • action (string) --

              The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

              • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

              • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

              • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

            • sound (string) --

              The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

            • url (string) --

              The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

            • imageUrl (string) --

              The URL of an image to display in a push notification that's based on the message template.

            • imageIconUrl (string) --

              The URL of the large icon image to display in the content view of a push notification that's based on the message template.

            • smallImageIconUrl (string) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

            • rawContent (dict) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

              • content (string) --

                The content of the message template.

          • baidu (dict) --

            The content of the message template that applies to Baidu notification service.

            • title (string) --

              The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

            • body (dict) --

              The message body to use in a push notification that is based on the message template.

              • content (string) --

                The content of the message template.

            • action (string) --

              The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

              • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

              • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

              • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

            • sound (string) --

              The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

            • url (string) --

              The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

            • imageUrl (string) --

              The URL of an image to display in a push notification that's based on the message template.

            • imageIconUrl (string) --

              The URL of the large icon image to display in the content view of a push notification that's based on the message template.

            • smallImageIconUrl (string) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

            • rawContent (dict) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

              • content (string) --

                The content of the message template.

      • description (string) --

        The description of the message template.

      • language (string) --

        The language code value for the language in which the quick response is written. The supported language codes include de_DE, en_US, es_ES, fr_FR, id_ID, it_IT, ja_JP, ko_KR, pt_BR, zh_CN, zh_TW

      • sourceConfigurationSummary (dict) --

        The source configuration summary of the message template.

        • whatsApp (dict) --

          The sourceConfiguration summary of the message template that applies to the WHATSAPP channel subtype.

          • businessAccountId (string) --

            The ID of the End User Messaging WhatsApp Business Account to associate with this template.

          • templateId (string) --

            The ID of WhatsApp template.

          • name (string) --

            The name of the WhatsApp template.

          • language (string) --

            The language of the WhatsApp template.

          • components (list) --

            The list of component mapping from WhatsApp template parameters to Message Template attributes.

            • (string) --

              The component mapping from WhatsApp template parameters to Message Template attributes.

          • status (string) --

            The status of the message template.

          • statusReason (string) --

            The status reason of the message template.

      • groupingConfiguration (dict) --

        The configuration information of the grouping of Amazon Q in Connect users.

        • criteria (string) --

          The criteria used for grouping Amazon Q in Connect users.

          The following is the list of supported criteria values.

        • values (list) --

          The list of values that define different groups of Amazon Q in Connect users.

          • (string) --

      • defaultAttributes (dict) --

        An object that specifies the default values to use for variables in the message template. This object contains different categories of key-value pairs. Each key defines a variable or placeholder in the message template. The corresponding value defines the default value for that variable.

        • systemAttributes (dict) --

          The system attributes that are used with the message template.

          • name (string) --

            The name of the task.

          • customerEndpoint (dict) --

            The CustomerEndpoint attribute.

            • address (string) --

              The customer's phone number if used with customerEndpoint, or the number the customer dialed to call your contact center if used with systemEndpoint.

          • systemEndpoint (dict) --

            The SystemEndpoint attribute.

            • address (string) --

              The customer's phone number if used with customerEndpoint, or the number the customer dialed to call your contact center if used with systemEndpoint.

        • agentAttributes (dict) --

          The agent attributes that are used with the message template.

          • firstName (string) --

            The agent’s first name as entered in their Amazon Connect user account.

          • lastName (string) --

            The agent’s last name as entered in their Amazon Connect user account.

        • customerProfileAttributes (dict) --

          The customer profile attributes that are used with the message template.

          • profileId (string) --

            The unique identifier of a customer profile.

          • profileARN (string) --

            The ARN of a customer profile.

          • firstName (string) --

            The customer's first name.

          • middleName (string) --

            The customer's middle name.

          • lastName (string) --

            The customer's last name.

          • accountNumber (string) --

            A unique account number that you have given to the customer.

          • emailAddress (string) --

            The customer's email address, which has not been specified as a personal or business address.

          • phoneNumber (string) --

            The customer's phone number, which has not been specified as a mobile, home, or business number.

          • additionalInformation (string) --

            Any additional information relevant to the customer's profile.

          • partyType (string) --

            The customer's party type.

          • businessName (string) --

            The name of the customer's business.

          • birthDate (string) --

            The customer's birth date.

          • gender (string) --

            The customer's gender.

          • mobilePhoneNumber (string) --

            The customer's mobile phone number.

          • homePhoneNumber (string) --

            The customer's mobile phone number.

          • businessPhoneNumber (string) --

            The customer's business phone number.

          • businessEmailAddress (string) --

            The customer's business email address.

          • address1 (string) --

            The first line of a customer address.

          • address2 (string) --

            The second line of a customer address.

          • address3 (string) --

            The third line of a customer address.

          • address4 (string) --

            The fourth line of a customer address.

          • city (string) --

            The city in which a customer lives.

          • county (string) --

            The county in which a customer lives.

          • country (string) --

            The country in which a customer lives.

          • postalCode (string) --

            The postal code of a customer address.

          • province (string) --

            The province in which a customer lives.

          • state (string) --

            The state in which a customer lives.

          • shippingAddress1 (string) --

            The first line of a customer’s shipping address.

          • shippingAddress2 (string) --

            The second line of a customer’s shipping address.

          • shippingAddress3 (string) --

            The third line of a customer’s shipping address.

          • shippingAddress4 (string) --

            The fourth line of a customer’s shipping address.

          • shippingCity (string) --

            The city of a customer’s shipping address.

          • shippingCounty (string) --

            The county of a customer’s shipping address.

          • shippingCountry (string) --

            The country of a customer’s shipping address.

          • shippingPostalCode (string) --

            The postal code of a customer’s shipping address.

          • shippingProvince (string) --

            The province of a customer’s shipping address.

          • shippingState (string) --

            The state of a customer’s shipping address.

          • mailingAddress1 (string) --

            The first line of a customer’s mailing address.

          • mailingAddress2 (string) --

            The second line of a customer’s mailing address.

          • mailingAddress3 (string) --

            The third line of a customer’s mailing address.

          • mailingAddress4 (string) --

            The fourth line of a customer’s mailing address.

          • mailingCity (string) --

            The city of a customer’s mailing address.

          • mailingCounty (string) --

            The county of a customer’s mailing address.

          • mailingCountry (string) --

            The country of a customer’s mailing address.

          • mailingPostalCode (string) --

            The postal code of a customer’s mailing address.

          • mailingProvince (string) --

            The province of a customer’s mailing address.

          • mailingState (string) --

            The state of a customer’s mailing address.

          • billingAddress1 (string) --

            The first line of a customer’s billing address.

          • billingAddress2 (string) --

            The second line of a customer’s billing address.

          • billingAddress3 (string) --

            The third line of a customer’s billing address.

          • billingAddress4 (string) --

            The fourth line of a customer’s billing address.

          • billingCity (string) --

            The city of a customer’s billing address.

          • billingCounty (string) --

            The county of a customer’s billing address.

          • billingCountry (string) --

            The country of a customer’s billing address.

          • billingPostalCode (string) --

            The postal code of a customer’s billing address.

          • billingProvince (string) --

            The province of a customer’s billing address.

          • billingState (string) --

            The state of a customer’s billing address.

          • custom (dict) --

            The custom attributes in customer profile attributes.

            • (string) --

              • (string) --

        • customAttributes (dict) --

          The custom attributes that are used with the message template.

          • (string) --

            • (string) --

      • attributeTypes (list) --

        The types of attributes contain the message template.

        • (string) --

      • attachments (list) --

        The message template attachments.

        • (dict) --

          Information about the message template attachment.

          • contentDisposition (string) --

            The presentation information for the attachment file.

          • name (string) --

            The name of the attachment file being uploaded. The name should include the file extension.

          • uploadedTime (datetime) --

            The timestamp when the attachment file was uploaded.

          • url (string) --

            A pre-signed Amazon S3 URL that can be used to download the attachment file.

          • urlExpiry (datetime) --

            The expiration time of the pre-signed Amazon S3 URL.

          • attachmentId (string) --

            The identifier of the attachment file.

      • isActive (boolean) --

        Whether the version of the message template is activated.

      • versionNumber (integer) --

        The version number of the message template version.

      • messageTemplateContentSha256 (string) --

        The checksum value of the message template content that is referenced by the $LATEST qualifier. It can be returned in MessageTemplateData or ExtendedMessageTemplateData. It’s calculated by content, language, defaultAttributes and Attachments of the message template.

      • tags (dict) --

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

        • (string) --

          • (string) --

GetMessageTemplate (updated) Link ¶
Changes (response)
{'messageTemplate': {'channel': 'string',
                     'channelSubtype': {'WHATSAPP', 'PUSH'},
                     'content': {'push': {'adm': {'action': 'OPEN_APP | '
                                                            'DEEP_LINK | URL',
                                                  'body': {'content': 'string'},
                                                  'imageIconUrl': 'string',
                                                  'imageUrl': 'string',
                                                  'rawContent': {'content': 'string'},
                                                  'smallImageIconUrl': 'string',
                                                  'sound': 'string',
                                                  'title': 'string',
                                                  'url': 'string'},
                                          'apns': {'action': 'OPEN_APP | '
                                                             'DEEP_LINK | URL',
                                                   'body': {'content': 'string'},
                                                   'mediaUrl': 'string',
                                                   'rawContent': {'content': 'string'},
                                                   'sound': 'string',
                                                   'title': 'string',
                                                   'url': 'string'},
                                          'baidu': {'action': 'OPEN_APP | '
                                                              'DEEP_LINK | URL',
                                                    'body': {'content': 'string'},
                                                    'imageIconUrl': 'string',
                                                    'imageUrl': 'string',
                                                    'rawContent': {'content': 'string'},
                                                    'smallImageIconUrl': 'string',
                                                    'sound': 'string',
                                                    'title': 'string',
                                                    'url': 'string'},
                                          'fcm': {'action': 'OPEN_APP | '
                                                            'DEEP_LINK | URL',
                                                  'body': {'content': 'string'},
                                                  'imageIconUrl': 'string',
                                                  'imageUrl': 'string',
                                                  'rawContent': {'content': 'string'},
                                                  'smallImageIconUrl': 'string',
                                                  'sound': 'string',
                                                  'title': 'string',
                                                  'url': 'string'}},
                                 'whatsApp': {'data': 'string'}},
                     'sourceConfigurationSummary': {'whatsApp': {'businessAccountId': 'string',
                                                                 'components': ['string'],
                                                                 'language': 'string',
                                                                 'name': 'string',
                                                                 'status': 'VALID '
                                                                           '| '
                                                                           'INVALID '
                                                                           '| '
                                                                           'REJECTED',
                                                                 'statusReason': 'string',
                                                                 'templateId': 'string'}}}}

Retrieves the Amazon Q in Connect message template. The message template identifier can contain an optional qualifier, for example, <message-template-id>:<qualifier>, which is either an actual version number or an Amazon Q Connect managed qualifier $ACTIVE_VERSION | $LATEST. If it is not supplied, then $LATEST is assumed implicitly.

See also: AWS API Documentation

Request Syntax

client.get_message_template(
    messageTemplateId='string',
    knowledgeBaseId='string'
)
type messageTemplateId:

string

param messageTemplateId:

[REQUIRED]

The identifier of the message template. Can be either the ID or the ARN.

type knowledgeBaseId:

string

param knowledgeBaseId:

[REQUIRED]

The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

rtype:

dict

returns:

Response Syntax

{
    'messageTemplate': {
        'messageTemplateArn': 'string',
        'messageTemplateId': 'string',
        'knowledgeBaseArn': 'string',
        'knowledgeBaseId': 'string',
        'name': 'string',
        'channel': 'string',
        'channelSubtype': 'EMAIL'|'SMS'|'WHATSAPP'|'PUSH',
        'createdTime': datetime(2015, 1, 1),
        'lastModifiedTime': datetime(2015, 1, 1),
        'lastModifiedBy': 'string',
        'content': {
            'email': {
                'subject': 'string',
                'body': {
                    'plainText': {
                        'content': 'string'
                    },
                    'html': {
                        'content': 'string'
                    }
                },
                'headers': [
                    {
                        'name': 'string',
                        'value': 'string'
                    },
                ]
            },
            'sms': {
                'body': {
                    'plainText': {
                        'content': 'string'
                    }
                }
            },
            'whatsApp': {
                'data': 'string'
            },
            'push': {
                'adm': {
                    'title': 'string',
                    'body': {
                        'content': 'string'
                    },
                    'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                    'sound': 'string',
                    'url': 'string',
                    'imageUrl': 'string',
                    'imageIconUrl': 'string',
                    'smallImageIconUrl': 'string',
                    'rawContent': {
                        'content': 'string'
                    }
                },
                'apns': {
                    'title': 'string',
                    'body': {
                        'content': 'string'
                    },
                    'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                    'sound': 'string',
                    'url': 'string',
                    'mediaUrl': 'string',
                    'rawContent': {
                        'content': 'string'
                    }
                },
                'fcm': {
                    'title': 'string',
                    'body': {
                        'content': 'string'
                    },
                    'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                    'sound': 'string',
                    'url': 'string',
                    'imageUrl': 'string',
                    'imageIconUrl': 'string',
                    'smallImageIconUrl': 'string',
                    'rawContent': {
                        'content': 'string'
                    }
                },
                'baidu': {
                    'title': 'string',
                    'body': {
                        'content': 'string'
                    },
                    'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                    'sound': 'string',
                    'url': 'string',
                    'imageUrl': 'string',
                    'imageIconUrl': 'string',
                    'smallImageIconUrl': 'string',
                    'rawContent': {
                        'content': 'string'
                    }
                }
            }
        },
        'description': 'string',
        'language': 'string',
        'sourceConfigurationSummary': {
            'whatsApp': {
                'businessAccountId': 'string',
                'templateId': 'string',
                'name': 'string',
                'language': 'string',
                'components': [
                    'string',
                ],
                'status': 'VALID'|'INVALID'|'REJECTED',
                'statusReason': 'string'
            }
        },
        'groupingConfiguration': {
            'criteria': 'string',
            'values': [
                'string',
            ]
        },
        'defaultAttributes': {
            'systemAttributes': {
                'name': 'string',
                'customerEndpoint': {
                    'address': 'string'
                },
                'systemEndpoint': {
                    'address': 'string'
                }
            },
            'agentAttributes': {
                'firstName': 'string',
                'lastName': 'string'
            },
            'customerProfileAttributes': {
                'profileId': 'string',
                'profileARN': 'string',
                'firstName': 'string',
                'middleName': 'string',
                'lastName': 'string',
                'accountNumber': 'string',
                'emailAddress': 'string',
                'phoneNumber': 'string',
                'additionalInformation': 'string',
                'partyType': 'string',
                'businessName': 'string',
                'birthDate': 'string',
                'gender': 'string',
                'mobilePhoneNumber': 'string',
                'homePhoneNumber': 'string',
                'businessPhoneNumber': 'string',
                'businessEmailAddress': 'string',
                'address1': 'string',
                'address2': 'string',
                'address3': 'string',
                'address4': 'string',
                'city': 'string',
                'county': 'string',
                'country': 'string',
                'postalCode': 'string',
                'province': 'string',
                'state': 'string',
                'shippingAddress1': 'string',
                'shippingAddress2': 'string',
                'shippingAddress3': 'string',
                'shippingAddress4': 'string',
                'shippingCity': 'string',
                'shippingCounty': 'string',
                'shippingCountry': 'string',
                'shippingPostalCode': 'string',
                'shippingProvince': 'string',
                'shippingState': 'string',
                'mailingAddress1': 'string',
                'mailingAddress2': 'string',
                'mailingAddress3': 'string',
                'mailingAddress4': 'string',
                'mailingCity': 'string',
                'mailingCounty': 'string',
                'mailingCountry': 'string',
                'mailingPostalCode': 'string',
                'mailingProvince': 'string',
                'mailingState': 'string',
                'billingAddress1': 'string',
                'billingAddress2': 'string',
                'billingAddress3': 'string',
                'billingAddress4': 'string',
                'billingCity': 'string',
                'billingCounty': 'string',
                'billingCountry': 'string',
                'billingPostalCode': 'string',
                'billingProvince': 'string',
                'billingState': 'string',
                'custom': {
                    'string': 'string'
                }
            },
            'customAttributes': {
                'string': 'string'
            }
        },
        'attributeTypes': [
            'SYSTEM'|'AGENT'|'CUSTOMER_PROFILE'|'CUSTOM',
        ],
        'attachments': [
            {
                'contentDisposition': 'ATTACHMENT',
                'name': 'string',
                'uploadedTime': datetime(2015, 1, 1),
                'url': 'string',
                'urlExpiry': datetime(2015, 1, 1),
                'attachmentId': 'string'
            },
        ],
        'isActive': True|False,
        'versionNumber': 123,
        'messageTemplateContentSha256': 'string',
        'tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • messageTemplate (dict) --

      The message template.

      • messageTemplateArn (string) --

        The Amazon Resource Name (ARN) of the message template.

      • messageTemplateId (string) --

        The identifier of the message template.

      • knowledgeBaseArn (string) --

        The Amazon Resource Name (ARN) of the knowledge base.

      • knowledgeBaseId (string) --

        The identifier of the knowledge base.

      • name (string) --

        The name of the message template.

      • channel (string) --

        The channel of the message template.

      • channelSubtype (string) --

        The channel subtype this message template applies to.

      • createdTime (datetime) --

        The timestamp when the message template was created.

      • lastModifiedTime (datetime) --

        The timestamp when the message template data was last modified.

      • lastModifiedBy (string) --

        The Amazon Resource Name (ARN) of the user who last updated the message template data.

      • content (dict) --

        The content of the message template.

        • email (dict) --

          The content of the message template that applies to the email channel subtype.

          • subject (string) --

            The subject line, or title, to use in email messages.

          • body (dict) --

            The body to use in email messages.

            • plainText (dict) --

              The message body, in plain text format, to use in email messages that are based on the message template. We recommend using plain text format for email clients that don't render HTML content and clients that are connected to high-latency networks, such as mobile devices.

              • content (string) --

                The content of the message template.

            • html (dict) --

              The message body, in HTML format, to use in email messages that are based on the message template. We recommend using HTML format for email clients that render HTML content. You can include links, formatted text, and more in an HTML message.

              • content (string) --

                The content of the message template.

          • headers (list) --

            The email headers to include in email messages.

            • (dict) --

              The email header to include in email messages.

              • name (string) --

                The name of the email header.

              • value (string) --

                The value of the email header.

        • sms (dict) --

          The content of the message template that applies to the SMS channel subtype.

          • body (dict) --

            The body to use in SMS messages.

            • plainText (dict) --

              The message body to use in SMS messages.

              • content (string) --

                The content of the message template.

        • whatsApp (dict) --

          The content of the message template that applies to the WHATSAPP channel subtype.

          • data (string) --

            The data.

        • push (dict) --

          The content of the message template that applies to the push channel subtype.

          • adm (dict) --

            The content of the message template that applies to ADM (Amazon Device Messaging) notification service.

            • title (string) --

              The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

            • body (dict) --

              The message body to use in a push notification that is based on the message template.

              • content (string) --

                The content of the message template.

            • action (string) --

              The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

              • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

              • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

              • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

            • sound (string) --

              The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

            • url (string) --

              The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

            • imageUrl (string) --

              The URL of an image to display in a push notification that's based on the message template.

            • imageIconUrl (string) --

              The URL of the large icon image to display in the content view of a push notification that's based on the message template.

            • smallImageIconUrl (string) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

            • rawContent (dict) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

              • content (string) --

                The content of the message template.

          • apns (dict) --

            The content of the message template that applies to APNS(Apple Push Notification service) notification service.

            • title (string) --

              The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

            • body (dict) --

              The message body to use in a push notification that is based on the message template.

              • content (string) --

                The content of the message template.

            • action (string) --

              The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

              • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

              • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the iOS platform.

              • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

            • sound (string) --

              The key for the sound to play when the recipient receives a push notification that's based on the message template. The value for this key is the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.

            • url (string) --

              The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

            • mediaUrl (string) --

              The URL of an image or video to display in push notifications that are based on the message template.

            • rawContent (dict) --

              The raw, JSON-formatted string to use as the payload for a push notification that's based on the message template. If specified, this value overrides all other content for the message template.

              • content (string) --

                The content of the message template.

          • fcm (dict) --

            The content of the message template that applies to FCM (Firebase Cloud Messaging) notification service.

            • title (string) --

              The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

            • body (dict) --

              The message body to use in a push notification that is based on the message template.

              • content (string) --

                The content of the message template.

            • action (string) --

              The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

              • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

              • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

              • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

            • sound (string) --

              The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

            • url (string) --

              The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

            • imageUrl (string) --

              The URL of an image to display in a push notification that's based on the message template.

            • imageIconUrl (string) --

              The URL of the large icon image to display in the content view of a push notification that's based on the message template.

            • smallImageIconUrl (string) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

            • rawContent (dict) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

              • content (string) --

                The content of the message template.

          • baidu (dict) --

            The content of the message template that applies to Baidu notification service.

            • title (string) --

              The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

            • body (dict) --

              The message body to use in a push notification that is based on the message template.

              • content (string) --

                The content of the message template.

            • action (string) --

              The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

              • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

              • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

              • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

            • sound (string) --

              The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

            • url (string) --

              The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

            • imageUrl (string) --

              The URL of an image to display in a push notification that's based on the message template.

            • imageIconUrl (string) --

              The URL of the large icon image to display in the content view of a push notification that's based on the message template.

            • smallImageIconUrl (string) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

            • rawContent (dict) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

              • content (string) --

                The content of the message template.

      • description (string) --

        The description of the message template.

      • language (string) --

        The language code value for the language in which the quick response is written. The supported language codes include de_DE, en_US, es_ES, fr_FR, id_ID, it_IT, ja_JP, ko_KR, pt_BR, zh_CN, zh_TW

      • sourceConfigurationSummary (dict) --

        The source configuration summary of the message template.

        • whatsApp (dict) --

          The sourceConfiguration summary of the message template that applies to the WHATSAPP channel subtype.

          • businessAccountId (string) --

            The ID of the End User Messaging WhatsApp Business Account to associate with this template.

          • templateId (string) --

            The ID of WhatsApp template.

          • name (string) --

            The name of the WhatsApp template.

          • language (string) --

            The language of the WhatsApp template.

          • components (list) --

            The list of component mapping from WhatsApp template parameters to Message Template attributes.

            • (string) --

              The component mapping from WhatsApp template parameters to Message Template attributes.

          • status (string) --

            The status of the message template.

          • statusReason (string) --

            The status reason of the message template.

      • groupingConfiguration (dict) --

        The configuration information of the grouping of Amazon Q in Connect users.

        • criteria (string) --

          The criteria used for grouping Amazon Q in Connect users.

          The following is the list of supported criteria values.

        • values (list) --

          The list of values that define different groups of Amazon Q in Connect users.

          • (string) --

      • defaultAttributes (dict) --

        An object that specifies the default values to use for variables in the message template. This object contains different categories of key-value pairs. Each key defines a variable or placeholder in the message template. The corresponding value defines the default value for that variable.

        • systemAttributes (dict) --

          The system attributes that are used with the message template.

          • name (string) --

            The name of the task.

          • customerEndpoint (dict) --

            The CustomerEndpoint attribute.

            • address (string) --

              The customer's phone number if used with customerEndpoint, or the number the customer dialed to call your contact center if used with systemEndpoint.

          • systemEndpoint (dict) --

            The SystemEndpoint attribute.

            • address (string) --

              The customer's phone number if used with customerEndpoint, or the number the customer dialed to call your contact center if used with systemEndpoint.

        • agentAttributes (dict) --

          The agent attributes that are used with the message template.

          • firstName (string) --

            The agent’s first name as entered in their Amazon Connect user account.

          • lastName (string) --

            The agent’s last name as entered in their Amazon Connect user account.

        • customerProfileAttributes (dict) --

          The customer profile attributes that are used with the message template.

          • profileId (string) --

            The unique identifier of a customer profile.

          • profileARN (string) --

            The ARN of a customer profile.

          • firstName (string) --

            The customer's first name.

          • middleName (string) --

            The customer's middle name.

          • lastName (string) --

            The customer's last name.

          • accountNumber (string) --

            A unique account number that you have given to the customer.

          • emailAddress (string) --

            The customer's email address, which has not been specified as a personal or business address.

          • phoneNumber (string) --

            The customer's phone number, which has not been specified as a mobile, home, or business number.

          • additionalInformation (string) --

            Any additional information relevant to the customer's profile.

          • partyType (string) --

            The customer's party type.

          • businessName (string) --

            The name of the customer's business.

          • birthDate (string) --

            The customer's birth date.

          • gender (string) --

            The customer's gender.

          • mobilePhoneNumber (string) --

            The customer's mobile phone number.

          • homePhoneNumber (string) --

            The customer's mobile phone number.

          • businessPhoneNumber (string) --

            The customer's business phone number.

          • businessEmailAddress (string) --

            The customer's business email address.

          • address1 (string) --

            The first line of a customer address.

          • address2 (string) --

            The second line of a customer address.

          • address3 (string) --

            The third line of a customer address.

          • address4 (string) --

            The fourth line of a customer address.

          • city (string) --

            The city in which a customer lives.

          • county (string) --

            The county in which a customer lives.

          • country (string) --

            The country in which a customer lives.

          • postalCode (string) --

            The postal code of a customer address.

          • province (string) --

            The province in which a customer lives.

          • state (string) --

            The state in which a customer lives.

          • shippingAddress1 (string) --

            The first line of a customer’s shipping address.

          • shippingAddress2 (string) --

            The second line of a customer’s shipping address.

          • shippingAddress3 (string) --

            The third line of a customer’s shipping address.

          • shippingAddress4 (string) --

            The fourth line of a customer’s shipping address.

          • shippingCity (string) --

            The city of a customer’s shipping address.

          • shippingCounty (string) --

            The county of a customer’s shipping address.

          • shippingCountry (string) --

            The country of a customer’s shipping address.

          • shippingPostalCode (string) --

            The postal code of a customer’s shipping address.

          • shippingProvince (string) --

            The province of a customer’s shipping address.

          • shippingState (string) --

            The state of a customer’s shipping address.

          • mailingAddress1 (string) --

            The first line of a customer’s mailing address.

          • mailingAddress2 (string) --

            The second line of a customer’s mailing address.

          • mailingAddress3 (string) --

            The third line of a customer’s mailing address.

          • mailingAddress4 (string) --

            The fourth line of a customer’s mailing address.

          • mailingCity (string) --

            The city of a customer’s mailing address.

          • mailingCounty (string) --

            The county of a customer’s mailing address.

          • mailingCountry (string) --

            The country of a customer’s mailing address.

          • mailingPostalCode (string) --

            The postal code of a customer’s mailing address.

          • mailingProvince (string) --

            The province of a customer’s mailing address.

          • mailingState (string) --

            The state of a customer’s mailing address.

          • billingAddress1 (string) --

            The first line of a customer’s billing address.

          • billingAddress2 (string) --

            The second line of a customer’s billing address.

          • billingAddress3 (string) --

            The third line of a customer’s billing address.

          • billingAddress4 (string) --

            The fourth line of a customer’s billing address.

          • billingCity (string) --

            The city of a customer’s billing address.

          • billingCounty (string) --

            The county of a customer’s billing address.

          • billingCountry (string) --

            The country of a customer’s billing address.

          • billingPostalCode (string) --

            The postal code of a customer’s billing address.

          • billingProvince (string) --

            The province of a customer’s billing address.

          • billingState (string) --

            The state of a customer’s billing address.

          • custom (dict) --

            The custom attributes in customer profile attributes.

            • (string) --

              • (string) --

        • customAttributes (dict) --

          The custom attributes that are used with the message template.

          • (string) --

            • (string) --

      • attributeTypes (list) --

        The types of attributes contain the message template.

        • (string) --

      • attachments (list) --

        The message template attachments.

        • (dict) --

          Information about the message template attachment.

          • contentDisposition (string) --

            The presentation information for the attachment file.

          • name (string) --

            The name of the attachment file being uploaded. The name should include the file extension.

          • uploadedTime (datetime) --

            The timestamp when the attachment file was uploaded.

          • url (string) --

            A pre-signed Amazon S3 URL that can be used to download the attachment file.

          • urlExpiry (datetime) --

            The expiration time of the pre-signed Amazon S3 URL.

          • attachmentId (string) --

            The identifier of the attachment file.

      • isActive (boolean) --

        Whether the version of the message template is activated.

      • versionNumber (integer) --

        The version number of the message template version.

      • messageTemplateContentSha256 (string) --

        The checksum value of the message template content that is referenced by the $LATEST qualifier. It can be returned in MessageTemplateData or ExtendedMessageTemplateData. It’s calculated by content, language, defaultAttributes and Attachments of the message template.

      • tags (dict) --

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

        • (string) --

          • (string) --

ListMessageTemplateVersions (updated) Link ¶
Changes (response)
{'messageTemplateVersionSummaries': {'channel': 'string',
                                     'channelSubtype': {'WHATSAPP', 'PUSH'}}}

Lists all the available versions for the specified Amazon Q in Connect message template.

See also: AWS API Documentation

Request Syntax

client.list_message_template_versions(
    knowledgeBaseId='string',
    messageTemplateId='string',
    nextToken='string',
    maxResults=123
)
type knowledgeBaseId:

string

param knowledgeBaseId:

[REQUIRED]

The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

type messageTemplateId:

string

param messageTemplateId:

[REQUIRED]

The identifier of the message template. Can be either the ID or the ARN. It cannot contain any qualifier.

type nextToken:

string

param nextToken:

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

type maxResults:

integer

param maxResults:

The maximum number of results to return per page.

rtype:

dict

returns:

Response Syntax

{
    'messageTemplateVersionSummaries': [
        {
            'messageTemplateArn': 'string',
            'messageTemplateId': 'string',
            'knowledgeBaseArn': 'string',
            'knowledgeBaseId': 'string',
            'name': 'string',
            'channel': 'string',
            'channelSubtype': 'EMAIL'|'SMS'|'WHATSAPP'|'PUSH',
            'isActive': True|False,
            'versionNumber': 123
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • messageTemplateVersionSummaries (list) --

      Summary information about the versions of a message template.

      • (dict) --

        The summary of the message template version.

        • messageTemplateArn (string) --

          The Amazon Resource Name (ARN) of the message template.

        • messageTemplateId (string) --

          The identifier of the message template.

        • knowledgeBaseArn (string) --

          The Amazon Resource Name (ARN) of the knowledge base.

        • knowledgeBaseId (string) --

          The identifier of the knowledge base.

        • name (string) --

          The name of the message template.

        • channel (string) --

          The channel of the message template.

        • channelSubtype (string) --

          The channel subtype this message template applies to.

        • isActive (boolean) --

          Whether the version of the message template is activated.

        • versionNumber (integer) --

          The version number of the message template version.

    • nextToken (string) --

      If there are additional results, this is the token for the next set of results.

ListMessageTemplates (updated) Link ¶
Changes (response)
{'messageTemplateSummaries': {'channel': 'string',
                              'channelSubtype': {'WHATSAPP', 'PUSH'},
                              'sourceConfiguration': {'whatsApp': {'businessAccountId': 'string',
                                                                   'components': ['string'],
                                                                   'templateId': 'string'}}}}

Lists all the available Amazon Q in Connect message templates for the specified knowledge base.

See also: AWS API Documentation

Request Syntax

client.list_message_templates(
    nextToken='string',
    maxResults=123,
    knowledgeBaseId='string'
)
type nextToken:

string

param nextToken:

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

type maxResults:

integer

param maxResults:

The maximum number of results to return per page.

type knowledgeBaseId:

string

param knowledgeBaseId:

[REQUIRED]

The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

rtype:

dict

returns:

Response Syntax

{
    'messageTemplateSummaries': [
        {
            'messageTemplateArn': 'string',
            'messageTemplateId': 'string',
            'knowledgeBaseArn': 'string',
            'knowledgeBaseId': 'string',
            'name': 'string',
            'channel': 'string',
            'channelSubtype': 'EMAIL'|'SMS'|'WHATSAPP'|'PUSH',
            'createdTime': datetime(2015, 1, 1),
            'lastModifiedTime': datetime(2015, 1, 1),
            'lastModifiedBy': 'string',
            'sourceConfiguration': {
                'whatsApp': {
                    'businessAccountId': 'string',
                    'templateId': 'string',
                    'components': [
                        'string',
                    ]
                }
            },
            'activeVersionNumber': 123,
            'description': 'string',
            'tags': {
                'string': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • messageTemplateSummaries (list) --

      Summary information about the message template.

      • (dict) --

        The summary of the message template.

        • messageTemplateArn (string) --

          The Amazon Resource Name (ARN) of the message template.

        • messageTemplateId (string) --

          The identifier of the message template.

        • knowledgeBaseArn (string) --

          The Amazon Resource Name (ARN) of the knowledge base.

        • knowledgeBaseId (string) --

          The identifier of the knowledge base.

        • name (string) --

          The name of the message template.

        • channel (string) --

          The channel this message template applies to.

        • channelSubtype (string) --

          The channel subtype this message template applies to.

        • createdTime (datetime) --

          The timestamp when the message template was created.

        • lastModifiedTime (datetime) --

          The timestamp when the message template data was last modified.

        • lastModifiedBy (string) --

          The Amazon Resource Name (ARN) of the user who last updated the message template data.

        • sourceConfiguration (dict) --

          The container of message template source configuration.

          • whatsApp (dict) --

            The sourceConfiguration of the message template that applies to the WHATSAPP channel subtype.

            • businessAccountId (string) --

              The ID of the End User Messaging WhatsApp Business Account to associate with this template.

            • templateId (string) --

              The WhatsApp template ID.

            • components (list) --

              The list of component mapping from WhatsApp template parameters to Message Template attributes.

              • (string) --

                The component mapping from WhatsApp template parameters to Message Template attributes.

        • activeVersionNumber (integer) --

          The version number of the message template version that is activated.

        • description (string) --

          The description of the message template.

        • tags (dict) --

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

          • (string) --

            • (string) --

    • nextToken (string) --

      If there are additional results, this is the token for the next set of results.

RenderMessageTemplate (updated) Link ¶
Changes (response)
{'content': {'push': {'adm': {'action': 'OPEN_APP | DEEP_LINK | URL',
                              'body': {'content': 'string'},
                              'imageIconUrl': 'string',
                              'imageUrl': 'string',
                              'rawContent': {'content': 'string'},
                              'smallImageIconUrl': 'string',
                              'sound': 'string',
                              'title': 'string',
                              'url': 'string'},
                      'apns': {'action': 'OPEN_APP | DEEP_LINK | URL',
                               'body': {'content': 'string'},
                               'mediaUrl': 'string',
                               'rawContent': {'content': 'string'},
                               'sound': 'string',
                               'title': 'string',
                               'url': 'string'},
                      'baidu': {'action': 'OPEN_APP | DEEP_LINK | URL',
                                'body': {'content': 'string'},
                                'imageIconUrl': 'string',
                                'imageUrl': 'string',
                                'rawContent': {'content': 'string'},
                                'smallImageIconUrl': 'string',
                                'sound': 'string',
                                'title': 'string',
                                'url': 'string'},
                      'fcm': {'action': 'OPEN_APP | DEEP_LINK | URL',
                              'body': {'content': 'string'},
                              'imageIconUrl': 'string',
                              'imageUrl': 'string',
                              'rawContent': {'content': 'string'},
                              'smallImageIconUrl': 'string',
                              'sound': 'string',
                              'title': 'string',
                              'url': 'string'}},
             'whatsApp': {'data': 'string'}},
 'sourceConfigurationSummary': {'whatsApp': {'businessAccountId': 'string',
                                             'components': ['string'],
                                             'language': 'string',
                                             'name': 'string',
                                             'status': 'VALID | INVALID | '
                                                       'REJECTED',
                                             'statusReason': 'string',
                                             'templateId': 'string'}}}

Renders the Amazon Q in Connect message template based on the attribute values provided and generates the message content. For any variable present in the message template, if the attribute value is neither provided in the attribute request parameter nor the default attribute of the message template, the rendered message content will keep the variable placeholder as it is and return the attribute keys that are missing.

See also: AWS API Documentation

Request Syntax

client.render_message_template(
    knowledgeBaseId='string',
    messageTemplateId='string',
    attributes={
        'systemAttributes': {
            'name': 'string',
            'customerEndpoint': {
                'address': 'string'
            },
            'systemEndpoint': {
                'address': 'string'
            }
        },
        'agentAttributes': {
            'firstName': 'string',
            'lastName': 'string'
        },
        'customerProfileAttributes': {
            'profileId': 'string',
            'profileARN': 'string',
            'firstName': 'string',
            'middleName': 'string',
            'lastName': 'string',
            'accountNumber': 'string',
            'emailAddress': 'string',
            'phoneNumber': 'string',
            'additionalInformation': 'string',
            'partyType': 'string',
            'businessName': 'string',
            'birthDate': 'string',
            'gender': 'string',
            'mobilePhoneNumber': 'string',
            'homePhoneNumber': 'string',
            'businessPhoneNumber': 'string',
            'businessEmailAddress': 'string',
            'address1': 'string',
            'address2': 'string',
            'address3': 'string',
            'address4': 'string',
            'city': 'string',
            'county': 'string',
            'country': 'string',
            'postalCode': 'string',
            'province': 'string',
            'state': 'string',
            'shippingAddress1': 'string',
            'shippingAddress2': 'string',
            'shippingAddress3': 'string',
            'shippingAddress4': 'string',
            'shippingCity': 'string',
            'shippingCounty': 'string',
            'shippingCountry': 'string',
            'shippingPostalCode': 'string',
            'shippingProvince': 'string',
            'shippingState': 'string',
            'mailingAddress1': 'string',
            'mailingAddress2': 'string',
            'mailingAddress3': 'string',
            'mailingAddress4': 'string',
            'mailingCity': 'string',
            'mailingCounty': 'string',
            'mailingCountry': 'string',
            'mailingPostalCode': 'string',
            'mailingProvince': 'string',
            'mailingState': 'string',
            'billingAddress1': 'string',
            'billingAddress2': 'string',
            'billingAddress3': 'string',
            'billingAddress4': 'string',
            'billingCity': 'string',
            'billingCounty': 'string',
            'billingCountry': 'string',
            'billingPostalCode': 'string',
            'billingProvince': 'string',
            'billingState': 'string',
            'custom': {
                'string': 'string'
            }
        },
        'customAttributes': {
            'string': 'string'
        }
    }
)
type knowledgeBaseId:

string

param knowledgeBaseId:

[REQUIRED]

The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

type messageTemplateId:

string

param messageTemplateId:

[REQUIRED]

The identifier of the message template. Can be either the ID or the ARN.

type attributes:

dict

param attributes:

[REQUIRED]

An object that specifies the values to use for variables in the message template. This object contains different categories of key-value pairs. Each key defines a variable or placeholder in the message template. The corresponding value defines the value for that variable.

  • systemAttributes (dict) --

    The system attributes that are used with the message template.

    • name (string) --

      The name of the task.

    • customerEndpoint (dict) --

      The CustomerEndpoint attribute.

      • address (string) --

        The customer's phone number if used with customerEndpoint, or the number the customer dialed to call your contact center if used with systemEndpoint.

    • systemEndpoint (dict) --

      The SystemEndpoint attribute.

      • address (string) --

        The customer's phone number if used with customerEndpoint, or the number the customer dialed to call your contact center if used with systemEndpoint.

  • agentAttributes (dict) --

    The agent attributes that are used with the message template.

    • firstName (string) --

      The agent’s first name as entered in their Amazon Connect user account.

    • lastName (string) --

      The agent’s last name as entered in their Amazon Connect user account.

  • customerProfileAttributes (dict) --

    The customer profile attributes that are used with the message template.

    • profileId (string) --

      The unique identifier of a customer profile.

    • profileARN (string) --

      The ARN of a customer profile.

    • firstName (string) --

      The customer's first name.

    • middleName (string) --

      The customer's middle name.

    • lastName (string) --

      The customer's last name.

    • accountNumber (string) --

      A unique account number that you have given to the customer.

    • emailAddress (string) --

      The customer's email address, which has not been specified as a personal or business address.

    • phoneNumber (string) --

      The customer's phone number, which has not been specified as a mobile, home, or business number.

    • additionalInformation (string) --

      Any additional information relevant to the customer's profile.

    • partyType (string) --

      The customer's party type.

    • businessName (string) --

      The name of the customer's business.

    • birthDate (string) --

      The customer's birth date.

    • gender (string) --

      The customer's gender.

    • mobilePhoneNumber (string) --

      The customer's mobile phone number.

    • homePhoneNumber (string) --

      The customer's mobile phone number.

    • businessPhoneNumber (string) --

      The customer's business phone number.

    • businessEmailAddress (string) --

      The customer's business email address.

    • address1 (string) --

      The first line of a customer address.

    • address2 (string) --

      The second line of a customer address.

    • address3 (string) --

      The third line of a customer address.

    • address4 (string) --

      The fourth line of a customer address.

    • city (string) --

      The city in which a customer lives.

    • county (string) --

      The county in which a customer lives.

    • country (string) --

      The country in which a customer lives.

    • postalCode (string) --

      The postal code of a customer address.

    • province (string) --

      The province in which a customer lives.

    • state (string) --

      The state in which a customer lives.

    • shippingAddress1 (string) --

      The first line of a customer’s shipping address.

    • shippingAddress2 (string) --

      The second line of a customer’s shipping address.

    • shippingAddress3 (string) --

      The third line of a customer’s shipping address.

    • shippingAddress4 (string) --

      The fourth line of a customer’s shipping address.

    • shippingCity (string) --

      The city of a customer’s shipping address.

    • shippingCounty (string) --

      The county of a customer’s shipping address.

    • shippingCountry (string) --

      The country of a customer’s shipping address.

    • shippingPostalCode (string) --

      The postal code of a customer’s shipping address.

    • shippingProvince (string) --

      The province of a customer’s shipping address.

    • shippingState (string) --

      The state of a customer’s shipping address.

    • mailingAddress1 (string) --

      The first line of a customer’s mailing address.

    • mailingAddress2 (string) --

      The second line of a customer’s mailing address.

    • mailingAddress3 (string) --

      The third line of a customer’s mailing address.

    • mailingAddress4 (string) --

      The fourth line of a customer’s mailing address.

    • mailingCity (string) --

      The city of a customer’s mailing address.

    • mailingCounty (string) --

      The county of a customer’s mailing address.

    • mailingCountry (string) --

      The country of a customer’s mailing address.

    • mailingPostalCode (string) --

      The postal code of a customer’s mailing address.

    • mailingProvince (string) --

      The province of a customer’s mailing address.

    • mailingState (string) --

      The state of a customer’s mailing address.

    • billingAddress1 (string) --

      The first line of a customer’s billing address.

    • billingAddress2 (string) --

      The second line of a customer’s billing address.

    • billingAddress3 (string) --

      The third line of a customer’s billing address.

    • billingAddress4 (string) --

      The fourth line of a customer’s billing address.

    • billingCity (string) --

      The city of a customer’s billing address.

    • billingCounty (string) --

      The county of a customer’s billing address.

    • billingCountry (string) --

      The country of a customer’s billing address.

    • billingPostalCode (string) --

      The postal code of a customer’s billing address.

    • billingProvince (string) --

      The province of a customer’s billing address.

    • billingState (string) --

      The state of a customer’s billing address.

    • custom (dict) --

      The custom attributes in customer profile attributes.

      • (string) --

        • (string) --

  • customAttributes (dict) --

    The custom attributes that are used with the message template.

    • (string) --

      • (string) --

rtype:

dict

returns:

Response Syntax

{
    'content': {
        'email': {
            'subject': 'string',
            'body': {
                'plainText': {
                    'content': 'string'
                },
                'html': {
                    'content': 'string'
                }
            },
            'headers': [
                {
                    'name': 'string',
                    'value': 'string'
                },
            ]
        },
        'sms': {
            'body': {
                'plainText': {
                    'content': 'string'
                }
            }
        },
        'whatsApp': {
            'data': 'string'
        },
        'push': {
            'adm': {
                'title': 'string',
                'body': {
                    'content': 'string'
                },
                'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'sound': 'string',
                'url': 'string',
                'imageUrl': 'string',
                'imageIconUrl': 'string',
                'smallImageIconUrl': 'string',
                'rawContent': {
                    'content': 'string'
                }
            },
            'apns': {
                'title': 'string',
                'body': {
                    'content': 'string'
                },
                'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'sound': 'string',
                'url': 'string',
                'mediaUrl': 'string',
                'rawContent': {
                    'content': 'string'
                }
            },
            'fcm': {
                'title': 'string',
                'body': {
                    'content': 'string'
                },
                'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'sound': 'string',
                'url': 'string',
                'imageUrl': 'string',
                'imageIconUrl': 'string',
                'smallImageIconUrl': 'string',
                'rawContent': {
                    'content': 'string'
                }
            },
            'baidu': {
                'title': 'string',
                'body': {
                    'content': 'string'
                },
                'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'sound': 'string',
                'url': 'string',
                'imageUrl': 'string',
                'imageIconUrl': 'string',
                'smallImageIconUrl': 'string',
                'rawContent': {
                    'content': 'string'
                }
            }
        }
    },
    'sourceConfigurationSummary': {
        'whatsApp': {
            'businessAccountId': 'string',
            'templateId': 'string',
            'name': 'string',
            'language': 'string',
            'components': [
                'string',
            ],
            'status': 'VALID'|'INVALID'|'REJECTED',
            'statusReason': 'string'
        }
    },
    'attributesNotInterpolated': [
        'string',
    ],
    'attachments': [
        {
            'contentDisposition': 'ATTACHMENT',
            'name': 'string',
            'uploadedTime': datetime(2015, 1, 1),
            'url': 'string',
            'urlExpiry': datetime(2015, 1, 1),
            'attachmentId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • content (dict) --

      The content of the message template.

      • email (dict) --

        The content of the message template that applies to the email channel subtype.

        • subject (string) --

          The subject line, or title, to use in email messages.

        • body (dict) --

          The body to use in email messages.

          • plainText (dict) --

            The message body, in plain text format, to use in email messages that are based on the message template. We recommend using plain text format for email clients that don't render HTML content and clients that are connected to high-latency networks, such as mobile devices.

            • content (string) --

              The content of the message template.

          • html (dict) --

            The message body, in HTML format, to use in email messages that are based on the message template. We recommend using HTML format for email clients that render HTML content. You can include links, formatted text, and more in an HTML message.

            • content (string) --

              The content of the message template.

        • headers (list) --

          The email headers to include in email messages.

          • (dict) --

            The email header to include in email messages.

            • name (string) --

              The name of the email header.

            • value (string) --

              The value of the email header.

      • sms (dict) --

        The content of the message template that applies to the SMS channel subtype.

        • body (dict) --

          The body to use in SMS messages.

          • plainText (dict) --

            The message body to use in SMS messages.

            • content (string) --

              The content of the message template.

      • whatsApp (dict) --

        The content of the message template that applies to the WHATSAPP channel subtype.

        • data (string) --

          The data.

      • push (dict) --

        The content of the message template that applies to the push channel subtype.

        • adm (dict) --

          The content of the message template that applies to ADM (Amazon Device Messaging) notification service.

          • title (string) --

            The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

          • body (dict) --

            The message body to use in a push notification that is based on the message template.

            • content (string) --

              The content of the message template.

          • action (string) --

            The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

            • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

            • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

            • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

          • sound (string) --

            The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

          • url (string) --

            The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

          • imageUrl (string) --

            The URL of an image to display in a push notification that's based on the message template.

          • imageIconUrl (string) --

            The URL of the large icon image to display in the content view of a push notification that's based on the message template.

          • smallImageIconUrl (string) --

            The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

          • rawContent (dict) --

            The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

            • content (string) --

              The content of the message template.

        • apns (dict) --

          The content of the message template that applies to APNS(Apple Push Notification service) notification service.

          • title (string) --

            The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

          • body (dict) --

            The message body to use in a push notification that is based on the message template.

            • content (string) --

              The content of the message template.

          • action (string) --

            The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

            • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

            • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the iOS platform.

            • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

          • sound (string) --

            The key for the sound to play when the recipient receives a push notification that's based on the message template. The value for this key is the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.

          • url (string) --

            The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

          • mediaUrl (string) --

            The URL of an image or video to display in push notifications that are based on the message template.

          • rawContent (dict) --

            The raw, JSON-formatted string to use as the payload for a push notification that's based on the message template. If specified, this value overrides all other content for the message template.

            • content (string) --

              The content of the message template.

        • fcm (dict) --

          The content of the message template that applies to FCM (Firebase Cloud Messaging) notification service.

          • title (string) --

            The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

          • body (dict) --

            The message body to use in a push notification that is based on the message template.

            • content (string) --

              The content of the message template.

          • action (string) --

            The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

            • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

            • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

            • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

          • sound (string) --

            The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

          • url (string) --

            The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

          • imageUrl (string) --

            The URL of an image to display in a push notification that's based on the message template.

          • imageIconUrl (string) --

            The URL of the large icon image to display in the content view of a push notification that's based on the message template.

          • smallImageIconUrl (string) --

            The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

          • rawContent (dict) --

            The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

            • content (string) --

              The content of the message template.

        • baidu (dict) --

          The content of the message template that applies to Baidu notification service.

          • title (string) --

            The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

          • body (dict) --

            The message body to use in a push notification that is based on the message template.

            • content (string) --

              The content of the message template.

          • action (string) --

            The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

            • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

            • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

            • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

          • sound (string) --

            The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

          • url (string) --

            The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

          • imageUrl (string) --

            The URL of an image to display in a push notification that's based on the message template.

          • imageIconUrl (string) --

            The URL of the large icon image to display in the content view of a push notification that's based on the message template.

          • smallImageIconUrl (string) --

            The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

          • rawContent (dict) --

            The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

            • content (string) --

              The content of the message template.

    • sourceConfigurationSummary (dict) --

      The source configuration of the message template.

      • whatsApp (dict) --

        The sourceConfiguration summary of the message template that applies to the WHATSAPP channel subtype.

        • businessAccountId (string) --

          The ID of the End User Messaging WhatsApp Business Account to associate with this template.

        • templateId (string) --

          The ID of WhatsApp template.

        • name (string) --

          The name of the WhatsApp template.

        • language (string) --

          The language of the WhatsApp template.

        • components (list) --

          The list of component mapping from WhatsApp template parameters to Message Template attributes.

          • (string) --

            The component mapping from WhatsApp template parameters to Message Template attributes.

        • status (string) --

          The status of the message template.

        • statusReason (string) --

          The status reason of the message template.

    • attributesNotInterpolated (list) --

      The attribute keys that are not resolved.

      • (string) --

    • attachments (list) --

      The message template attachments.

      • (dict) --

        Information about the message template attachment.

        • contentDisposition (string) --

          The presentation information for the attachment file.

        • name (string) --

          The name of the attachment file being uploaded. The name should include the file extension.

        • uploadedTime (datetime) --

          The timestamp when the attachment file was uploaded.

        • url (string) --

          A pre-signed Amazon S3 URL that can be used to download the attachment file.

        • urlExpiry (datetime) --

          The expiration time of the pre-signed Amazon S3 URL.

        • attachmentId (string) --

          The identifier of the attachment file.

SearchMessageTemplates (updated) Link ¶
Changes (response)
{'results': {'channel': 'string',
             'channelSubtype': {'WHATSAPP', 'PUSH'},
             'sourceConfigurationSummary': {'whatsApp': {'businessAccountId': 'string',
                                                         'components': ['string'],
                                                         'language': 'string',
                                                         'name': 'string',
                                                         'status': 'VALID | '
                                                                   'INVALID | '
                                                                   'REJECTED',
                                                         'statusReason': 'string',
                                                         'templateId': 'string'}}}}

Searches for Amazon Q in Connect message templates in the specified knowledge base.

See also: AWS API Documentation

Request Syntax

client.search_message_templates(
    knowledgeBaseId='string',
    searchExpression={
        'queries': [
            {
                'name': 'string',
                'values': [
                    'string',
                ],
                'operator': 'CONTAINS'|'CONTAINS_AND_PREFIX',
                'allowFuzziness': True|False,
                'priority': 'HIGH'|'MEDIUM'|'LOW'
            },
        ],
        'filters': [
            {
                'name': 'string',
                'values': [
                    'string',
                ],
                'operator': 'EQUALS'|'PREFIX',
                'includeNoExistence': True|False
            },
        ],
        'orderOnField': {
            'name': 'string',
            'order': 'ASC'|'DESC'
        }
    },
    nextToken='string',
    maxResults=123
)
type knowledgeBaseId:

string

param knowledgeBaseId:

[REQUIRED]

The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

type searchExpression:

dict

param searchExpression:

[REQUIRED]

The search expression for querying the message template.

  • queries (list) --

    The message template query expressions.

    • (dict) --

      The message template fields to query message templates by. The following is the list of supported field names:

      • name

      • description

      • name (string) -- [REQUIRED]

        The name of the attribute to query the message templates by.

      • values (list) -- [REQUIRED]

        The values of the attribute to query the message templates by.

        • (string) --

      • operator (string) -- [REQUIRED]

        The operator to use for matching attribute field values in the query.

      • allowFuzziness (boolean) --

        Whether the query expects only exact matches on the attribute field values. The results of the query will only include exact matches if this parameter is set to false.

      • priority (string) --

        The importance of the attribute field when calculating query result relevancy scores. The value set for this parameter affects the ordering of search results.

  • filters (list) --

    The configuration of filtering rules applied to message template query results.

    • (dict) --

      The message template fields to filter the message template query results by. The following is the list of supported field names:

      • name

      • description

      • channel

      • channelSubtype

      • language

      • qualifier

      • createdTime

      • lastModifiedTime

      • lastModifiedBy

      • groupingConfiguration.criteria

      • groupingConfiguration.values

      • name (string) -- [REQUIRED]

        The name of the attribute field to filter the message templates by.

      • values (list) --

        The values of attribute field to filter the message template by.

        • (string) --

      • operator (string) -- [REQUIRED]

        The operator to use for filtering.

      • includeNoExistence (boolean) --

        Whether to treat null value as a match for the attribute field.

  • orderOnField (dict) --

    The message template attribute fields on which the query results are ordered.

    • name (string) -- [REQUIRED]

      The name of the message template.

    • order (string) --

      The order at which the message templates are sorted by.

type nextToken:

string

param nextToken:

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

type maxResults:

integer

param maxResults:

The maximum number of results to return per page.

rtype:

dict

returns:

Response Syntax

{
    'results': [
        {
            'messageTemplateArn': 'string',
            'messageTemplateId': 'string',
            'knowledgeBaseArn': 'string',
            'knowledgeBaseId': 'string',
            'name': 'string',
            'channel': 'string',
            'channelSubtype': 'EMAIL'|'SMS'|'WHATSAPP'|'PUSH',
            'createdTime': datetime(2015, 1, 1),
            'lastModifiedTime': datetime(2015, 1, 1),
            'lastModifiedBy': 'string',
            'isActive': True|False,
            'versionNumber': 123,
            'description': 'string',
            'sourceConfigurationSummary': {
                'whatsApp': {
                    'businessAccountId': 'string',
                    'templateId': 'string',
                    'name': 'string',
                    'language': 'string',
                    'components': [
                        'string',
                    ],
                    'status': 'VALID'|'INVALID'|'REJECTED',
                    'statusReason': 'string'
                }
            },
            'groupingConfiguration': {
                'criteria': 'string',
                'values': [
                    'string',
                ]
            },
            'language': 'string',
            'tags': {
                'string': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • results (list) --

      The results of the message template search.

      • (dict) --

        The result of message template search.

        • messageTemplateArn (string) --

          The Amazon Resource Name (ARN) of the message template.

        • messageTemplateId (string) --

          The identifier of the message template.

        • knowledgeBaseArn (string) --

          The Amazon Resource Name (ARN) of the knowledge base.

        • knowledgeBaseId (string) --

          The identifier of the knowledge base.

        • name (string) --

          The name of the message template.

        • channel (string) --

          The channel of the message template.

        • channelSubtype (string) --

          The channel subtype this message template applies to.

        • createdTime (datetime) --

          The timestamp when the message template was created.

        • lastModifiedTime (datetime) --

          The timestamp when the message template data was last modified.

        • lastModifiedBy (string) --

          The Amazon Resource Name (ARN) of the user who last updated the message template data.

        • isActive (boolean) --

          Whether the version of the message template is activated.

        • versionNumber (integer) --

          The version number of the message template version.

        • description (string) --

          The description of the message template.

        • sourceConfigurationSummary (dict) --

          The source configuration summary of the message template.

          • whatsApp (dict) --

            The sourceConfiguration summary of the message template that applies to the WHATSAPP channel subtype.

            • businessAccountId (string) --

              The ID of the End User Messaging WhatsApp Business Account to associate with this template.

            • templateId (string) --

              The ID of WhatsApp template.

            • name (string) --

              The name of the WhatsApp template.

            • language (string) --

              The language of the WhatsApp template.

            • components (list) --

              The list of component mapping from WhatsApp template parameters to Message Template attributes.

              • (string) --

                The component mapping from WhatsApp template parameters to Message Template attributes.

            • status (string) --

              The status of the message template.

            • statusReason (string) --

              The status reason of the message template.

        • groupingConfiguration (dict) --

          The configuration information of the grouping of Amazon Q in Connect users.

          • criteria (string) --

            The criteria used for grouping Amazon Q in Connect users.

            The following is the list of supported criteria values.

          • values (list) --

            The list of values that define different groups of Amazon Q in Connect users.

            • (string) --

        • language (string) --

          The language code value for the language in which the quick response is written. The supported language codes include de_DE, en_US, es_ES, fr_FR, id_ID, it_IT, ja_JP, ko_KR, pt_BR, zh_CN, zh_TW

        • tags (dict) --

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

          • (string) --

            • (string) --

    • nextToken (string) --

      If there are additional results, this is the token for the next set of results.

UpdateMessageTemplate (updated) Link ¶
Changes (request, response)
Request
{'content': {'push': {'adm': {'action': 'OPEN_APP | DEEP_LINK | URL',
                              'body': {'content': 'string'},
                              'imageIconUrl': 'string',
                              'imageUrl': 'string',
                              'rawContent': {'content': 'string'},
                              'smallImageIconUrl': 'string',
                              'sound': 'string',
                              'title': 'string',
                              'url': 'string'},
                      'apns': {'action': 'OPEN_APP | DEEP_LINK | URL',
                               'body': {'content': 'string'},
                               'mediaUrl': 'string',
                               'rawContent': {'content': 'string'},
                               'sound': 'string',
                               'title': 'string',
                               'url': 'string'},
                      'baidu': {'action': 'OPEN_APP | DEEP_LINK | URL',
                                'body': {'content': 'string'},
                                'imageIconUrl': 'string',
                                'imageUrl': 'string',
                                'rawContent': {'content': 'string'},
                                'smallImageIconUrl': 'string',
                                'sound': 'string',
                                'title': 'string',
                                'url': 'string'},
                      'fcm': {'action': 'OPEN_APP | DEEP_LINK | URL',
                              'body': {'content': 'string'},
                              'imageIconUrl': 'string',
                              'imageUrl': 'string',
                              'rawContent': {'content': 'string'},
                              'smallImageIconUrl': 'string',
                              'sound': 'string',
                              'title': 'string',
                              'url': 'string'}},
             'whatsApp': {'data': 'string'}},
 'sourceConfiguration': {'whatsApp': {'businessAccountId': 'string',
                                      'components': ['string'],
                                      'templateId': 'string'}}}
Response
{'messageTemplate': {'channel': 'string',
                     'channelSubtype': {'WHATSAPP', 'PUSH'},
                     'content': {'push': {'adm': {'action': 'OPEN_APP | '
                                                            'DEEP_LINK | URL',
                                                  'body': {'content': 'string'},
                                                  'imageIconUrl': 'string',
                                                  'imageUrl': 'string',
                                                  'rawContent': {'content': 'string'},
                                                  'smallImageIconUrl': 'string',
                                                  'sound': 'string',
                                                  'title': 'string',
                                                  'url': 'string'},
                                          'apns': {'action': 'OPEN_APP | '
                                                             'DEEP_LINK | URL',
                                                   'body': {'content': 'string'},
                                                   'mediaUrl': 'string',
                                                   'rawContent': {'content': 'string'},
                                                   'sound': 'string',
                                                   'title': 'string',
                                                   'url': 'string'},
                                          'baidu': {'action': 'OPEN_APP | '
                                                              'DEEP_LINK | URL',
                                                    'body': {'content': 'string'},
                                                    'imageIconUrl': 'string',
                                                    'imageUrl': 'string',
                                                    'rawContent': {'content': 'string'},
                                                    'smallImageIconUrl': 'string',
                                                    'sound': 'string',
                                                    'title': 'string',
                                                    'url': 'string'},
                                          'fcm': {'action': 'OPEN_APP | '
                                                            'DEEP_LINK | URL',
                                                  'body': {'content': 'string'},
                                                  'imageIconUrl': 'string',
                                                  'imageUrl': 'string',
                                                  'rawContent': {'content': 'string'},
                                                  'smallImageIconUrl': 'string',
                                                  'sound': 'string',
                                                  'title': 'string',
                                                  'url': 'string'}},
                                 'whatsApp': {'data': 'string'}},
                     'sourceConfigurationSummary': {'whatsApp': {'businessAccountId': 'string',
                                                                 'components': ['string'],
                                                                 'language': 'string',
                                                                 'name': 'string',
                                                                 'status': 'VALID '
                                                                           '| '
                                                                           'INVALID '
                                                                           '| '
                                                                           'REJECTED',
                                                                 'statusReason': 'string',
                                                                 'templateId': 'string'}}}}

Updates the Amazon Q in Connect message template. Partial update is supported. If any field is not supplied, it will remain unchanged for the message template that is referenced by the $LATEST qualifier. Any modification will only apply to the message template that is referenced by the $LATEST qualifier. The fields for all available versions will remain unchanged.

See also: AWS API Documentation

Request Syntax

client.update_message_template(
    knowledgeBaseId='string',
    messageTemplateId='string',
    content={
        'email': {
            'subject': 'string',
            'body': {
                'plainText': {
                    'content': 'string'
                },
                'html': {
                    'content': 'string'
                }
            },
            'headers': [
                {
                    'name': 'string',
                    'value': 'string'
                },
            ]
        },
        'sms': {
            'body': {
                'plainText': {
                    'content': 'string'
                }
            }
        },
        'whatsApp': {
            'data': 'string'
        },
        'push': {
            'adm': {
                'title': 'string',
                'body': {
                    'content': 'string'
                },
                'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'sound': 'string',
                'url': 'string',
                'imageUrl': 'string',
                'imageIconUrl': 'string',
                'smallImageIconUrl': 'string',
                'rawContent': {
                    'content': 'string'
                }
            },
            'apns': {
                'title': 'string',
                'body': {
                    'content': 'string'
                },
                'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'sound': 'string',
                'url': 'string',
                'mediaUrl': 'string',
                'rawContent': {
                    'content': 'string'
                }
            },
            'fcm': {
                'title': 'string',
                'body': {
                    'content': 'string'
                },
                'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'sound': 'string',
                'url': 'string',
                'imageUrl': 'string',
                'imageIconUrl': 'string',
                'smallImageIconUrl': 'string',
                'rawContent': {
                    'content': 'string'
                }
            },
            'baidu': {
                'title': 'string',
                'body': {
                    'content': 'string'
                },
                'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'sound': 'string',
                'url': 'string',
                'imageUrl': 'string',
                'imageIconUrl': 'string',
                'smallImageIconUrl': 'string',
                'rawContent': {
                    'content': 'string'
                }
            }
        }
    },
    language='string',
    sourceConfiguration={
        'whatsApp': {
            'businessAccountId': 'string',
            'templateId': 'string',
            'components': [
                'string',
            ]
        }
    },
    defaultAttributes={
        'systemAttributes': {
            'name': 'string',
            'customerEndpoint': {
                'address': 'string'
            },
            'systemEndpoint': {
                'address': 'string'
            }
        },
        'agentAttributes': {
            'firstName': 'string',
            'lastName': 'string'
        },
        'customerProfileAttributes': {
            'profileId': 'string',
            'profileARN': 'string',
            'firstName': 'string',
            'middleName': 'string',
            'lastName': 'string',
            'accountNumber': 'string',
            'emailAddress': 'string',
            'phoneNumber': 'string',
            'additionalInformation': 'string',
            'partyType': 'string',
            'businessName': 'string',
            'birthDate': 'string',
            'gender': 'string',
            'mobilePhoneNumber': 'string',
            'homePhoneNumber': 'string',
            'businessPhoneNumber': 'string',
            'businessEmailAddress': 'string',
            'address1': 'string',
            'address2': 'string',
            'address3': 'string',
            'address4': 'string',
            'city': 'string',
            'county': 'string',
            'country': 'string',
            'postalCode': 'string',
            'province': 'string',
            'state': 'string',
            'shippingAddress1': 'string',
            'shippingAddress2': 'string',
            'shippingAddress3': 'string',
            'shippingAddress4': 'string',
            'shippingCity': 'string',
            'shippingCounty': 'string',
            'shippingCountry': 'string',
            'shippingPostalCode': 'string',
            'shippingProvince': 'string',
            'shippingState': 'string',
            'mailingAddress1': 'string',
            'mailingAddress2': 'string',
            'mailingAddress3': 'string',
            'mailingAddress4': 'string',
            'mailingCity': 'string',
            'mailingCounty': 'string',
            'mailingCountry': 'string',
            'mailingPostalCode': 'string',
            'mailingProvince': 'string',
            'mailingState': 'string',
            'billingAddress1': 'string',
            'billingAddress2': 'string',
            'billingAddress3': 'string',
            'billingAddress4': 'string',
            'billingCity': 'string',
            'billingCounty': 'string',
            'billingCountry': 'string',
            'billingPostalCode': 'string',
            'billingProvince': 'string',
            'billingState': 'string',
            'custom': {
                'string': 'string'
            }
        },
        'customAttributes': {
            'string': 'string'
        }
    }
)
type knowledgeBaseId:

string

param knowledgeBaseId:

[REQUIRED]

The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

type messageTemplateId:

string

param messageTemplateId:

[REQUIRED]

The identifier of the message template. Can be either the ID or the ARN. It cannot contain any qualifier.

type content:

dict

param content:

The content of the message template.

  • email (dict) --

    The content of the message template that applies to the email channel subtype.

    • subject (string) --

      The subject line, or title, to use in email messages.

    • body (dict) --

      The body to use in email messages.

      • plainText (dict) --

        The message body, in plain text format, to use in email messages that are based on the message template. We recommend using plain text format for email clients that don't render HTML content and clients that are connected to high-latency networks, such as mobile devices.

        • content (string) --

          The content of the message template.

      • html (dict) --

        The message body, in HTML format, to use in email messages that are based on the message template. We recommend using HTML format for email clients that render HTML content. You can include links, formatted text, and more in an HTML message.

        • content (string) --

          The content of the message template.

    • headers (list) --

      The email headers to include in email messages.

      • (dict) --

        The email header to include in email messages.

        • name (string) --

          The name of the email header.

        • value (string) --

          The value of the email header.

  • sms (dict) --

    The content of the message template that applies to the SMS channel subtype.

    • body (dict) --

      The body to use in SMS messages.

      • plainText (dict) --

        The message body to use in SMS messages.

        • content (string) --

          The content of the message template.

  • whatsApp (dict) --

    The content of the message template that applies to the WHATSAPP channel subtype.

    • data (string) --

      The data.

  • push (dict) --

    The content of the message template that applies to the push channel subtype.

    • adm (dict) --

      The content of the message template that applies to ADM (Amazon Device Messaging) notification service.

      • title (string) --

        The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

      • body (dict) --

        The message body to use in a push notification that is based on the message template.

        • content (string) --

          The content of the message template.

      • action (string) --

        The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

        • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

        • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

        • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

      • sound (string) --

        The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

      • url (string) --

        The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

      • imageUrl (string) --

        The URL of an image to display in a push notification that's based on the message template.

      • imageIconUrl (string) --

        The URL of the large icon image to display in the content view of a push notification that's based on the message template.

      • smallImageIconUrl (string) --

        The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

      • rawContent (dict) --

        The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

        • content (string) --

          The content of the message template.

    • apns (dict) --

      The content of the message template that applies to APNS(Apple Push Notification service) notification service.

      • title (string) --

        The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

      • body (dict) --

        The message body to use in a push notification that is based on the message template.

        • content (string) --

          The content of the message template.

      • action (string) --

        The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

        • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

        • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the iOS platform.

        • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

      • sound (string) --

        The key for the sound to play when the recipient receives a push notification that's based on the message template. The value for this key is the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.

      • url (string) --

        The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

      • mediaUrl (string) --

        The URL of an image or video to display in push notifications that are based on the message template.

      • rawContent (dict) --

        The raw, JSON-formatted string to use as the payload for a push notification that's based on the message template. If specified, this value overrides all other content for the message template.

        • content (string) --

          The content of the message template.

    • fcm (dict) --

      The content of the message template that applies to FCM (Firebase Cloud Messaging) notification service.

      • title (string) --

        The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

      • body (dict) --

        The message body to use in a push notification that is based on the message template.

        • content (string) --

          The content of the message template.

      • action (string) --

        The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

        • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

        • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

        • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

      • sound (string) --

        The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

      • url (string) --

        The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

      • imageUrl (string) --

        The URL of an image to display in a push notification that's based on the message template.

      • imageIconUrl (string) --

        The URL of the large icon image to display in the content view of a push notification that's based on the message template.

      • smallImageIconUrl (string) --

        The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

      • rawContent (dict) --

        The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

        • content (string) --

          The content of the message template.

    • baidu (dict) --

      The content of the message template that applies to Baidu notification service.

      • title (string) --

        The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

      • body (dict) --

        The message body to use in a push notification that is based on the message template.

        • content (string) --

          The content of the message template.

      • action (string) --

        The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

        • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

        • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

        • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

      • sound (string) --

        The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

      • url (string) --

        The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

      • imageUrl (string) --

        The URL of an image to display in a push notification that's based on the message template.

      • imageIconUrl (string) --

        The URL of the large icon image to display in the content view of a push notification that's based on the message template.

      • smallImageIconUrl (string) --

        The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

      • rawContent (dict) --

        The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

        • content (string) --

          The content of the message template.

type language:

string

param language:

The language code value for the language in which the quick response is written. The supported language codes include de_DE, en_US, es_ES, fr_FR, id_ID, it_IT, ja_JP, ko_KR, pt_BR, zh_CN, zh_TW

type sourceConfiguration:

dict

param sourceConfiguration:

The source configuration of the message template. Only set this argument for WHATSAPP channel subtype.

  • whatsApp (dict) --

    The sourceConfiguration of the message template that applies to the WHATSAPP channel subtype.

    • businessAccountId (string) -- [REQUIRED]

      The ID of the End User Messaging WhatsApp Business Account to associate with this template.

    • templateId (string) -- [REQUIRED]

      The WhatsApp template ID.

    • components (list) --

      The list of component mapping from WhatsApp template parameters to Message Template attributes.

      • (string) --

        The component mapping from WhatsApp template parameters to Message Template attributes.

type defaultAttributes:

dict

param defaultAttributes:

An object that specifies the default values to use for variables in the message template. This object contains different categories of key-value pairs. Each key defines a variable or placeholder in the message template. The corresponding value defines the default value for that variable.

  • systemAttributes (dict) --

    The system attributes that are used with the message template.

    • name (string) --

      The name of the task.

    • customerEndpoint (dict) --

      The CustomerEndpoint attribute.

      • address (string) --

        The customer's phone number if used with customerEndpoint, or the number the customer dialed to call your contact center if used with systemEndpoint.

    • systemEndpoint (dict) --

      The SystemEndpoint attribute.

      • address (string) --

        The customer's phone number if used with customerEndpoint, or the number the customer dialed to call your contact center if used with systemEndpoint.

  • agentAttributes (dict) --

    The agent attributes that are used with the message template.

    • firstName (string) --

      The agent’s first name as entered in their Amazon Connect user account.

    • lastName (string) --

      The agent’s last name as entered in their Amazon Connect user account.

  • customerProfileAttributes (dict) --

    The customer profile attributes that are used with the message template.

    • profileId (string) --

      The unique identifier of a customer profile.

    • profileARN (string) --

      The ARN of a customer profile.

    • firstName (string) --

      The customer's first name.

    • middleName (string) --

      The customer's middle name.

    • lastName (string) --

      The customer's last name.

    • accountNumber (string) --

      A unique account number that you have given to the customer.

    • emailAddress (string) --

      The customer's email address, which has not been specified as a personal or business address.

    • phoneNumber (string) --

      The customer's phone number, which has not been specified as a mobile, home, or business number.

    • additionalInformation (string) --

      Any additional information relevant to the customer's profile.

    • partyType (string) --

      The customer's party type.

    • businessName (string) --

      The name of the customer's business.

    • birthDate (string) --

      The customer's birth date.

    • gender (string) --

      The customer's gender.

    • mobilePhoneNumber (string) --

      The customer's mobile phone number.

    • homePhoneNumber (string) --

      The customer's mobile phone number.

    • businessPhoneNumber (string) --

      The customer's business phone number.

    • businessEmailAddress (string) --

      The customer's business email address.

    • address1 (string) --

      The first line of a customer address.

    • address2 (string) --

      The second line of a customer address.

    • address3 (string) --

      The third line of a customer address.

    • address4 (string) --

      The fourth line of a customer address.

    • city (string) --

      The city in which a customer lives.

    • county (string) --

      The county in which a customer lives.

    • country (string) --

      The country in which a customer lives.

    • postalCode (string) --

      The postal code of a customer address.

    • province (string) --

      The province in which a customer lives.

    • state (string) --

      The state in which a customer lives.

    • shippingAddress1 (string) --

      The first line of a customer’s shipping address.

    • shippingAddress2 (string) --

      The second line of a customer’s shipping address.

    • shippingAddress3 (string) --

      The third line of a customer’s shipping address.

    • shippingAddress4 (string) --

      The fourth line of a customer’s shipping address.

    • shippingCity (string) --

      The city of a customer’s shipping address.

    • shippingCounty (string) --

      The county of a customer’s shipping address.

    • shippingCountry (string) --

      The country of a customer’s shipping address.

    • shippingPostalCode (string) --

      The postal code of a customer’s shipping address.

    • shippingProvince (string) --

      The province of a customer’s shipping address.

    • shippingState (string) --

      The state of a customer’s shipping address.

    • mailingAddress1 (string) --

      The first line of a customer’s mailing address.

    • mailingAddress2 (string) --

      The second line of a customer’s mailing address.

    • mailingAddress3 (string) --

      The third line of a customer’s mailing address.

    • mailingAddress4 (string) --

      The fourth line of a customer’s mailing address.

    • mailingCity (string) --

      The city of a customer’s mailing address.

    • mailingCounty (string) --

      The county of a customer’s mailing address.

    • mailingCountry (string) --

      The country of a customer’s mailing address.

    • mailingPostalCode (string) --

      The postal code of a customer’s mailing address.

    • mailingProvince (string) --

      The province of a customer’s mailing address.

    • mailingState (string) --

      The state of a customer’s mailing address.

    • billingAddress1 (string) --

      The first line of a customer’s billing address.

    • billingAddress2 (string) --

      The second line of a customer’s billing address.

    • billingAddress3 (string) --

      The third line of a customer’s billing address.

    • billingAddress4 (string) --

      The fourth line of a customer’s billing address.

    • billingCity (string) --

      The city of a customer’s billing address.

    • billingCounty (string) --

      The county of a customer’s billing address.

    • billingCountry (string) --

      The country of a customer’s billing address.

    • billingPostalCode (string) --

      The postal code of a customer’s billing address.

    • billingProvince (string) --

      The province of a customer’s billing address.

    • billingState (string) --

      The state of a customer’s billing address.

    • custom (dict) --

      The custom attributes in customer profile attributes.

      • (string) --

        • (string) --

  • customAttributes (dict) --

    The custom attributes that are used with the message template.

    • (string) --

      • (string) --

rtype:

dict

returns:

Response Syntax

{
    'messageTemplate': {
        'messageTemplateArn': 'string',
        'messageTemplateId': 'string',
        'knowledgeBaseArn': 'string',
        'knowledgeBaseId': 'string',
        'name': 'string',
        'channel': 'string',
        'channelSubtype': 'EMAIL'|'SMS'|'WHATSAPP'|'PUSH',
        'createdTime': datetime(2015, 1, 1),
        'lastModifiedTime': datetime(2015, 1, 1),
        'lastModifiedBy': 'string',
        'content': {
            'email': {
                'subject': 'string',
                'body': {
                    'plainText': {
                        'content': 'string'
                    },
                    'html': {
                        'content': 'string'
                    }
                },
                'headers': [
                    {
                        'name': 'string',
                        'value': 'string'
                    },
                ]
            },
            'sms': {
                'body': {
                    'plainText': {
                        'content': 'string'
                    }
                }
            },
            'whatsApp': {
                'data': 'string'
            },
            'push': {
                'adm': {
                    'title': 'string',
                    'body': {
                        'content': 'string'
                    },
                    'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                    'sound': 'string',
                    'url': 'string',
                    'imageUrl': 'string',
                    'imageIconUrl': 'string',
                    'smallImageIconUrl': 'string',
                    'rawContent': {
                        'content': 'string'
                    }
                },
                'apns': {
                    'title': 'string',
                    'body': {
                        'content': 'string'
                    },
                    'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                    'sound': 'string',
                    'url': 'string',
                    'mediaUrl': 'string',
                    'rawContent': {
                        'content': 'string'
                    }
                },
                'fcm': {
                    'title': 'string',
                    'body': {
                        'content': 'string'
                    },
                    'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                    'sound': 'string',
                    'url': 'string',
                    'imageUrl': 'string',
                    'imageIconUrl': 'string',
                    'smallImageIconUrl': 'string',
                    'rawContent': {
                        'content': 'string'
                    }
                },
                'baidu': {
                    'title': 'string',
                    'body': {
                        'content': 'string'
                    },
                    'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                    'sound': 'string',
                    'url': 'string',
                    'imageUrl': 'string',
                    'imageIconUrl': 'string',
                    'smallImageIconUrl': 'string',
                    'rawContent': {
                        'content': 'string'
                    }
                }
            }
        },
        'description': 'string',
        'language': 'string',
        'sourceConfigurationSummary': {
            'whatsApp': {
                'businessAccountId': 'string',
                'templateId': 'string',
                'name': 'string',
                'language': 'string',
                'components': [
                    'string',
                ],
                'status': 'VALID'|'INVALID'|'REJECTED',
                'statusReason': 'string'
            }
        },
        'groupingConfiguration': {
            'criteria': 'string',
            'values': [
                'string',
            ]
        },
        'defaultAttributes': {
            'systemAttributes': {
                'name': 'string',
                'customerEndpoint': {
                    'address': 'string'
                },
                'systemEndpoint': {
                    'address': 'string'
                }
            },
            'agentAttributes': {
                'firstName': 'string',
                'lastName': 'string'
            },
            'customerProfileAttributes': {
                'profileId': 'string',
                'profileARN': 'string',
                'firstName': 'string',
                'middleName': 'string',
                'lastName': 'string',
                'accountNumber': 'string',
                'emailAddress': 'string',
                'phoneNumber': 'string',
                'additionalInformation': 'string',
                'partyType': 'string',
                'businessName': 'string',
                'birthDate': 'string',
                'gender': 'string',
                'mobilePhoneNumber': 'string',
                'homePhoneNumber': 'string',
                'businessPhoneNumber': 'string',
                'businessEmailAddress': 'string',
                'address1': 'string',
                'address2': 'string',
                'address3': 'string',
                'address4': 'string',
                'city': 'string',
                'county': 'string',
                'country': 'string',
                'postalCode': 'string',
                'province': 'string',
                'state': 'string',
                'shippingAddress1': 'string',
                'shippingAddress2': 'string',
                'shippingAddress3': 'string',
                'shippingAddress4': 'string',
                'shippingCity': 'string',
                'shippingCounty': 'string',
                'shippingCountry': 'string',
                'shippingPostalCode': 'string',
                'shippingProvince': 'string',
                'shippingState': 'string',
                'mailingAddress1': 'string',
                'mailingAddress2': 'string',
                'mailingAddress3': 'string',
                'mailingAddress4': 'string',
                'mailingCity': 'string',
                'mailingCounty': 'string',
                'mailingCountry': 'string',
                'mailingPostalCode': 'string',
                'mailingProvince': 'string',
                'mailingState': 'string',
                'billingAddress1': 'string',
                'billingAddress2': 'string',
                'billingAddress3': 'string',
                'billingAddress4': 'string',
                'billingCity': 'string',
                'billingCounty': 'string',
                'billingCountry': 'string',
                'billingPostalCode': 'string',
                'billingProvince': 'string',
                'billingState': 'string',
                'custom': {
                    'string': 'string'
                }
            },
            'customAttributes': {
                'string': 'string'
            }
        },
        'attributeTypes': [
            'SYSTEM'|'AGENT'|'CUSTOMER_PROFILE'|'CUSTOM',
        ],
        'messageTemplateContentSha256': 'string',
        'tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • messageTemplate (dict) --

      The message template.

      • messageTemplateArn (string) --

        The Amazon Resource Name (ARN) of the message template.

      • messageTemplateId (string) --

        The identifier of the message template.

      • knowledgeBaseArn (string) --

        The Amazon Resource Name (ARN) of the knowledge base.

      • knowledgeBaseId (string) --

        The identifier of the knowledge base.

      • name (string) --

        The name of the message template.

      • channel (string) --

        The channel of the message template.

      • channelSubtype (string) --

        The channel subtype this message template applies to.

      • createdTime (datetime) --

        The timestamp when the message template was created.

      • lastModifiedTime (datetime) --

        The timestamp when the message template data was last modified.

      • lastModifiedBy (string) --

        The Amazon Resource Name (ARN) of the user who last updated the message template data.

      • content (dict) --

        The content of the message template.

        • email (dict) --

          The content of the message template that applies to the email channel subtype.

          • subject (string) --

            The subject line, or title, to use in email messages.

          • body (dict) --

            The body to use in email messages.

            • plainText (dict) --

              The message body, in plain text format, to use in email messages that are based on the message template. We recommend using plain text format for email clients that don't render HTML content and clients that are connected to high-latency networks, such as mobile devices.

              • content (string) --

                The content of the message template.

            • html (dict) --

              The message body, in HTML format, to use in email messages that are based on the message template. We recommend using HTML format for email clients that render HTML content. You can include links, formatted text, and more in an HTML message.

              • content (string) --

                The content of the message template.

          • headers (list) --

            The email headers to include in email messages.

            • (dict) --

              The email header to include in email messages.

              • name (string) --

                The name of the email header.

              • value (string) --

                The value of the email header.

        • sms (dict) --

          The content of the message template that applies to the SMS channel subtype.

          • body (dict) --

            The body to use in SMS messages.

            • plainText (dict) --

              The message body to use in SMS messages.

              • content (string) --

                The content of the message template.

        • whatsApp (dict) --

          The content of the message template that applies to the WHATSAPP channel subtype.

          • data (string) --

            The data.

        • push (dict) --

          The content of the message template that applies to the push channel subtype.

          • adm (dict) --

            The content of the message template that applies to ADM (Amazon Device Messaging) notification service.

            • title (string) --

              The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

            • body (dict) --

              The message body to use in a push notification that is based on the message template.

              • content (string) --

                The content of the message template.

            • action (string) --

              The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

              • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

              • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

              • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

            • sound (string) --

              The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

            • url (string) --

              The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

            • imageUrl (string) --

              The URL of an image to display in a push notification that's based on the message template.

            • imageIconUrl (string) --

              The URL of the large icon image to display in the content view of a push notification that's based on the message template.

            • smallImageIconUrl (string) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

            • rawContent (dict) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

              • content (string) --

                The content of the message template.

          • apns (dict) --

            The content of the message template that applies to APNS(Apple Push Notification service) notification service.

            • title (string) --

              The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

            • body (dict) --

              The message body to use in a push notification that is based on the message template.

              • content (string) --

                The content of the message template.

            • action (string) --

              The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

              • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

              • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the iOS platform.

              • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

            • sound (string) --

              The key for the sound to play when the recipient receives a push notification that's based on the message template. The value for this key is the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.

            • url (string) --

              The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

            • mediaUrl (string) --

              The URL of an image or video to display in push notifications that are based on the message template.

            • rawContent (dict) --

              The raw, JSON-formatted string to use as the payload for a push notification that's based on the message template. If specified, this value overrides all other content for the message template.

              • content (string) --

                The content of the message template.

          • fcm (dict) --

            The content of the message template that applies to FCM (Firebase Cloud Messaging) notification service.

            • title (string) --

              The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

            • body (dict) --

              The message body to use in a push notification that is based on the message template.

              • content (string) --

                The content of the message template.

            • action (string) --

              The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

              • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

              • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

              • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

            • sound (string) --

              The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

            • url (string) --

              The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

            • imageUrl (string) --

              The URL of an image to display in a push notification that's based on the message template.

            • imageIconUrl (string) --

              The URL of the large icon image to display in the content view of a push notification that's based on the message template.

            • smallImageIconUrl (string) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

            • rawContent (dict) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

              • content (string) --

                The content of the message template.

          • baidu (dict) --

            The content of the message template that applies to Baidu notification service.

            • title (string) --

              The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

            • body (dict) --

              The message body to use in a push notification that is based on the message template.

              • content (string) --

                The content of the message template.

            • action (string) --

              The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

              • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

              • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

              • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

            • sound (string) --

              The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

            • url (string) --

              The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

            • imageUrl (string) --

              The URL of an image to display in a push notification that's based on the message template.

            • imageIconUrl (string) --

              The URL of the large icon image to display in the content view of a push notification that's based on the message template.

            • smallImageIconUrl (string) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

            • rawContent (dict) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

              • content (string) --

                The content of the message template.

      • description (string) --

        The description of the message template.

      • language (string) --

        The language code value for the language in which the quick response is written. The supported language codes include de_DE, en_US, es_ES, fr_FR, id_ID, it_IT, ja_JP, ko_KR, pt_BR, zh_CN, zh_TW

      • sourceConfigurationSummary (dict) --

        The source configuration summary of the message template.

        • whatsApp (dict) --

          The sourceConfiguration summary of the message template that applies to the WHATSAPP channel subtype.

          • businessAccountId (string) --

            The ID of the End User Messaging WhatsApp Business Account to associate with this template.

          • templateId (string) --

            The ID of WhatsApp template.

          • name (string) --

            The name of the WhatsApp template.

          • language (string) --

            The language of the WhatsApp template.

          • components (list) --

            The list of component mapping from WhatsApp template parameters to Message Template attributes.

            • (string) --

              The component mapping from WhatsApp template parameters to Message Template attributes.

          • status (string) --

            The status of the message template.

          • statusReason (string) --

            The status reason of the message template.

      • groupingConfiguration (dict) --

        The configuration information of the grouping of Amazon Q in Connect users.

        • criteria (string) --

          The criteria used for grouping Amazon Q in Connect users.

          The following is the list of supported criteria values.

        • values (list) --

          The list of values that define different groups of Amazon Q in Connect users.

          • (string) --

      • defaultAttributes (dict) --

        An object that specifies the default values to use for variables in the message template. This object contains different categories of key-value pairs. Each key defines a variable or placeholder in the message template. The corresponding value defines the default value for that variable.

        • systemAttributes (dict) --

          The system attributes that are used with the message template.

          • name (string) --

            The name of the task.

          • customerEndpoint (dict) --

            The CustomerEndpoint attribute.

            • address (string) --

              The customer's phone number if used with customerEndpoint, or the number the customer dialed to call your contact center if used with systemEndpoint.

          • systemEndpoint (dict) --

            The SystemEndpoint attribute.

            • address (string) --

              The customer's phone number if used with customerEndpoint, or the number the customer dialed to call your contact center if used with systemEndpoint.

        • agentAttributes (dict) --

          The agent attributes that are used with the message template.

          • firstName (string) --

            The agent’s first name as entered in their Amazon Connect user account.

          • lastName (string) --

            The agent’s last name as entered in their Amazon Connect user account.

        • customerProfileAttributes (dict) --

          The customer profile attributes that are used with the message template.

          • profileId (string) --

            The unique identifier of a customer profile.

          • profileARN (string) --

            The ARN of a customer profile.

          • firstName (string) --

            The customer's first name.

          • middleName (string) --

            The customer's middle name.

          • lastName (string) --

            The customer's last name.

          • accountNumber (string) --

            A unique account number that you have given to the customer.

          • emailAddress (string) --

            The customer's email address, which has not been specified as a personal or business address.

          • phoneNumber (string) --

            The customer's phone number, which has not been specified as a mobile, home, or business number.

          • additionalInformation (string) --

            Any additional information relevant to the customer's profile.

          • partyType (string) --

            The customer's party type.

          • businessName (string) --

            The name of the customer's business.

          • birthDate (string) --

            The customer's birth date.

          • gender (string) --

            The customer's gender.

          • mobilePhoneNumber (string) --

            The customer's mobile phone number.

          • homePhoneNumber (string) --

            The customer's mobile phone number.

          • businessPhoneNumber (string) --

            The customer's business phone number.

          • businessEmailAddress (string) --

            The customer's business email address.

          • address1 (string) --

            The first line of a customer address.

          • address2 (string) --

            The second line of a customer address.

          • address3 (string) --

            The third line of a customer address.

          • address4 (string) --

            The fourth line of a customer address.

          • city (string) --

            The city in which a customer lives.

          • county (string) --

            The county in which a customer lives.

          • country (string) --

            The country in which a customer lives.

          • postalCode (string) --

            The postal code of a customer address.

          • province (string) --

            The province in which a customer lives.

          • state (string) --

            The state in which a customer lives.

          • shippingAddress1 (string) --

            The first line of a customer’s shipping address.

          • shippingAddress2 (string) --

            The second line of a customer’s shipping address.

          • shippingAddress3 (string) --

            The third line of a customer’s shipping address.

          • shippingAddress4 (string) --

            The fourth line of a customer’s shipping address.

          • shippingCity (string) --

            The city of a customer’s shipping address.

          • shippingCounty (string) --

            The county of a customer’s shipping address.

          • shippingCountry (string) --

            The country of a customer’s shipping address.

          • shippingPostalCode (string) --

            The postal code of a customer’s shipping address.

          • shippingProvince (string) --

            The province of a customer’s shipping address.

          • shippingState (string) --

            The state of a customer’s shipping address.

          • mailingAddress1 (string) --

            The first line of a customer’s mailing address.

          • mailingAddress2 (string) --

            The second line of a customer’s mailing address.

          • mailingAddress3 (string) --

            The third line of a customer’s mailing address.

          • mailingAddress4 (string) --

            The fourth line of a customer’s mailing address.

          • mailingCity (string) --

            The city of a customer’s mailing address.

          • mailingCounty (string) --

            The county of a customer’s mailing address.

          • mailingCountry (string) --

            The country of a customer’s mailing address.

          • mailingPostalCode (string) --

            The postal code of a customer’s mailing address.

          • mailingProvince (string) --

            The province of a customer’s mailing address.

          • mailingState (string) --

            The state of a customer’s mailing address.

          • billingAddress1 (string) --

            The first line of a customer’s billing address.

          • billingAddress2 (string) --

            The second line of a customer’s billing address.

          • billingAddress3 (string) --

            The third line of a customer’s billing address.

          • billingAddress4 (string) --

            The fourth line of a customer’s billing address.

          • billingCity (string) --

            The city of a customer’s billing address.

          • billingCounty (string) --

            The county of a customer’s billing address.

          • billingCountry (string) --

            The country of a customer’s billing address.

          • billingPostalCode (string) --

            The postal code of a customer’s billing address.

          • billingProvince (string) --

            The province of a customer’s billing address.

          • billingState (string) --

            The state of a customer’s billing address.

          • custom (dict) --

            The custom attributes in customer profile attributes.

            • (string) --

              • (string) --

        • customAttributes (dict) --

          The custom attributes that are used with the message template.

          • (string) --

            • (string) --

      • attributeTypes (list) --

        The types of attributes that the message template contains.

        • (string) --

      • messageTemplateContentSha256 (string) --

        The checksum value of the message template content that is referenced by the $LATEST qualifier. It can be returned in MessageTemplateData or ExtendedMessageTemplateData. It’s calculated by content, language, defaultAttributes and Attachments of the message template.

      • tags (dict) --

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

        • (string) --

          • (string) --

UpdateMessageTemplateMetadata (updated) Link ¶
Changes (response)
{'messageTemplate': {'channel': 'string',
                     'channelSubtype': {'WHATSAPP', 'PUSH'},
                     'content': {'push': {'adm': {'action': 'OPEN_APP | '
                                                            'DEEP_LINK | URL',
                                                  'body': {'content': 'string'},
                                                  'imageIconUrl': 'string',
                                                  'imageUrl': 'string',
                                                  'rawContent': {'content': 'string'},
                                                  'smallImageIconUrl': 'string',
                                                  'sound': 'string',
                                                  'title': 'string',
                                                  'url': 'string'},
                                          'apns': {'action': 'OPEN_APP | '
                                                             'DEEP_LINK | URL',
                                                   'body': {'content': 'string'},
                                                   'mediaUrl': 'string',
                                                   'rawContent': {'content': 'string'},
                                                   'sound': 'string',
                                                   'title': 'string',
                                                   'url': 'string'},
                                          'baidu': {'action': 'OPEN_APP | '
                                                              'DEEP_LINK | URL',
                                                    'body': {'content': 'string'},
                                                    'imageIconUrl': 'string',
                                                    'imageUrl': 'string',
                                                    'rawContent': {'content': 'string'},
                                                    'smallImageIconUrl': 'string',
                                                    'sound': 'string',
                                                    'title': 'string',
                                                    'url': 'string'},
                                          'fcm': {'action': 'OPEN_APP | '
                                                            'DEEP_LINK | URL',
                                                  'body': {'content': 'string'},
                                                  'imageIconUrl': 'string',
                                                  'imageUrl': 'string',
                                                  'rawContent': {'content': 'string'},
                                                  'smallImageIconUrl': 'string',
                                                  'sound': 'string',
                                                  'title': 'string',
                                                  'url': 'string'}},
                                 'whatsApp': {'data': 'string'}},
                     'sourceConfigurationSummary': {'whatsApp': {'businessAccountId': 'string',
                                                                 'components': ['string'],
                                                                 'language': 'string',
                                                                 'name': 'string',
                                                                 'status': 'VALID '
                                                                           '| '
                                                                           'INVALID '
                                                                           '| '
                                                                           'REJECTED',
                                                                 'statusReason': 'string',
                                                                 'templateId': 'string'}}}}

Updates the Amazon Q in Connect message template metadata. Note that any modification to the message template’s name, description and grouping configuration will applied to the message template pointed by the $LATEST qualifier and all available versions. Partial update is supported. If any field is not supplied, it will remain unchanged for the message template.

See also: AWS API Documentation

Request Syntax

client.update_message_template_metadata(
    knowledgeBaseId='string',
    messageTemplateId='string',
    name='string',
    description='string',
    groupingConfiguration={
        'criteria': 'string',
        'values': [
            'string',
        ]
    }
)
type knowledgeBaseId:

string

param knowledgeBaseId:

[REQUIRED]

The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

type messageTemplateId:

string

param messageTemplateId:

[REQUIRED]

The identifier of the message template. Can be either the ID or the ARN. It cannot contain any qualifier.

type name:

string

param name:

The name of the message template.

type description:

string

param description:

The description of the message template.

type groupingConfiguration:

dict

param groupingConfiguration:

The configuration information of the grouping of Amazon Q in Connect users.

  • criteria (string) --

    The criteria used for grouping Amazon Q in Connect users.

    The following is the list of supported criteria values.

  • values (list) --

    The list of values that define different groups of Amazon Q in Connect users.

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'messageTemplate': {
        'messageTemplateArn': 'string',
        'messageTemplateId': 'string',
        'knowledgeBaseArn': 'string',
        'knowledgeBaseId': 'string',
        'name': 'string',
        'channel': 'string',
        'channelSubtype': 'EMAIL'|'SMS'|'WHATSAPP'|'PUSH',
        'createdTime': datetime(2015, 1, 1),
        'lastModifiedTime': datetime(2015, 1, 1),
        'lastModifiedBy': 'string',
        'content': {
            'email': {
                'subject': 'string',
                'body': {
                    'plainText': {
                        'content': 'string'
                    },
                    'html': {
                        'content': 'string'
                    }
                },
                'headers': [
                    {
                        'name': 'string',
                        'value': 'string'
                    },
                ]
            },
            'sms': {
                'body': {
                    'plainText': {
                        'content': 'string'
                    }
                }
            },
            'whatsApp': {
                'data': 'string'
            },
            'push': {
                'adm': {
                    'title': 'string',
                    'body': {
                        'content': 'string'
                    },
                    'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                    'sound': 'string',
                    'url': 'string',
                    'imageUrl': 'string',
                    'imageIconUrl': 'string',
                    'smallImageIconUrl': 'string',
                    'rawContent': {
                        'content': 'string'
                    }
                },
                'apns': {
                    'title': 'string',
                    'body': {
                        'content': 'string'
                    },
                    'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                    'sound': 'string',
                    'url': 'string',
                    'mediaUrl': 'string',
                    'rawContent': {
                        'content': 'string'
                    }
                },
                'fcm': {
                    'title': 'string',
                    'body': {
                        'content': 'string'
                    },
                    'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                    'sound': 'string',
                    'url': 'string',
                    'imageUrl': 'string',
                    'imageIconUrl': 'string',
                    'smallImageIconUrl': 'string',
                    'rawContent': {
                        'content': 'string'
                    }
                },
                'baidu': {
                    'title': 'string',
                    'body': {
                        'content': 'string'
                    },
                    'action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                    'sound': 'string',
                    'url': 'string',
                    'imageUrl': 'string',
                    'imageIconUrl': 'string',
                    'smallImageIconUrl': 'string',
                    'rawContent': {
                        'content': 'string'
                    }
                }
            }
        },
        'description': 'string',
        'language': 'string',
        'sourceConfigurationSummary': {
            'whatsApp': {
                'businessAccountId': 'string',
                'templateId': 'string',
                'name': 'string',
                'language': 'string',
                'components': [
                    'string',
                ],
                'status': 'VALID'|'INVALID'|'REJECTED',
                'statusReason': 'string'
            }
        },
        'groupingConfiguration': {
            'criteria': 'string',
            'values': [
                'string',
            ]
        },
        'defaultAttributes': {
            'systemAttributes': {
                'name': 'string',
                'customerEndpoint': {
                    'address': 'string'
                },
                'systemEndpoint': {
                    'address': 'string'
                }
            },
            'agentAttributes': {
                'firstName': 'string',
                'lastName': 'string'
            },
            'customerProfileAttributes': {
                'profileId': 'string',
                'profileARN': 'string',
                'firstName': 'string',
                'middleName': 'string',
                'lastName': 'string',
                'accountNumber': 'string',
                'emailAddress': 'string',
                'phoneNumber': 'string',
                'additionalInformation': 'string',
                'partyType': 'string',
                'businessName': 'string',
                'birthDate': 'string',
                'gender': 'string',
                'mobilePhoneNumber': 'string',
                'homePhoneNumber': 'string',
                'businessPhoneNumber': 'string',
                'businessEmailAddress': 'string',
                'address1': 'string',
                'address2': 'string',
                'address3': 'string',
                'address4': 'string',
                'city': 'string',
                'county': 'string',
                'country': 'string',
                'postalCode': 'string',
                'province': 'string',
                'state': 'string',
                'shippingAddress1': 'string',
                'shippingAddress2': 'string',
                'shippingAddress3': 'string',
                'shippingAddress4': 'string',
                'shippingCity': 'string',
                'shippingCounty': 'string',
                'shippingCountry': 'string',
                'shippingPostalCode': 'string',
                'shippingProvince': 'string',
                'shippingState': 'string',
                'mailingAddress1': 'string',
                'mailingAddress2': 'string',
                'mailingAddress3': 'string',
                'mailingAddress4': 'string',
                'mailingCity': 'string',
                'mailingCounty': 'string',
                'mailingCountry': 'string',
                'mailingPostalCode': 'string',
                'mailingProvince': 'string',
                'mailingState': 'string',
                'billingAddress1': 'string',
                'billingAddress2': 'string',
                'billingAddress3': 'string',
                'billingAddress4': 'string',
                'billingCity': 'string',
                'billingCounty': 'string',
                'billingCountry': 'string',
                'billingPostalCode': 'string',
                'billingProvince': 'string',
                'billingState': 'string',
                'custom': {
                    'string': 'string'
                }
            },
            'customAttributes': {
                'string': 'string'
            }
        },
        'attributeTypes': [
            'SYSTEM'|'AGENT'|'CUSTOMER_PROFILE'|'CUSTOM',
        ],
        'messageTemplateContentSha256': 'string',
        'tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • messageTemplate (dict) --

      The message template.

      • messageTemplateArn (string) --

        The Amazon Resource Name (ARN) of the message template.

      • messageTemplateId (string) --

        The identifier of the message template.

      • knowledgeBaseArn (string) --

        The Amazon Resource Name (ARN) of the knowledge base.

      • knowledgeBaseId (string) --

        The identifier of the knowledge base.

      • name (string) --

        The name of the message template.

      • channel (string) --

        The channel of the message template.

      • channelSubtype (string) --

        The channel subtype this message template applies to.

      • createdTime (datetime) --

        The timestamp when the message template was created.

      • lastModifiedTime (datetime) --

        The timestamp when the message template data was last modified.

      • lastModifiedBy (string) --

        The Amazon Resource Name (ARN) of the user who last updated the message template data.

      • content (dict) --

        The content of the message template.

        • email (dict) --

          The content of the message template that applies to the email channel subtype.

          • subject (string) --

            The subject line, or title, to use in email messages.

          • body (dict) --

            The body to use in email messages.

            • plainText (dict) --

              The message body, in plain text format, to use in email messages that are based on the message template. We recommend using plain text format for email clients that don't render HTML content and clients that are connected to high-latency networks, such as mobile devices.

              • content (string) --

                The content of the message template.

            • html (dict) --

              The message body, in HTML format, to use in email messages that are based on the message template. We recommend using HTML format for email clients that render HTML content. You can include links, formatted text, and more in an HTML message.

              • content (string) --

                The content of the message template.

          • headers (list) --

            The email headers to include in email messages.

            • (dict) --

              The email header to include in email messages.

              • name (string) --

                The name of the email header.

              • value (string) --

                The value of the email header.

        • sms (dict) --

          The content of the message template that applies to the SMS channel subtype.

          • body (dict) --

            The body to use in SMS messages.

            • plainText (dict) --

              The message body to use in SMS messages.

              • content (string) --

                The content of the message template.

        • whatsApp (dict) --

          The content of the message template that applies to the WHATSAPP channel subtype.

          • data (string) --

            The data.

        • push (dict) --

          The content of the message template that applies to the push channel subtype.

          • adm (dict) --

            The content of the message template that applies to ADM (Amazon Device Messaging) notification service.

            • title (string) --

              The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

            • body (dict) --

              The message body to use in a push notification that is based on the message template.

              • content (string) --

                The content of the message template.

            • action (string) --

              The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

              • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

              • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

              • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

            • sound (string) --

              The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

            • url (string) --

              The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

            • imageUrl (string) --

              The URL of an image to display in a push notification that's based on the message template.

            • imageIconUrl (string) --

              The URL of the large icon image to display in the content view of a push notification that's based on the message template.

            • smallImageIconUrl (string) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

            • rawContent (dict) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

              • content (string) --

                The content of the message template.

          • apns (dict) --

            The content of the message template that applies to APNS(Apple Push Notification service) notification service.

            • title (string) --

              The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

            • body (dict) --

              The message body to use in a push notification that is based on the message template.

              • content (string) --

                The content of the message template.

            • action (string) --

              The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

              • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

              • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the iOS platform.

              • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

            • sound (string) --

              The key for the sound to play when the recipient receives a push notification that's based on the message template. The value for this key is the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.

            • url (string) --

              The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

            • mediaUrl (string) --

              The URL of an image or video to display in push notifications that are based on the message template.

            • rawContent (dict) --

              The raw, JSON-formatted string to use as the payload for a push notification that's based on the message template. If specified, this value overrides all other content for the message template.

              • content (string) --

                The content of the message template.

          • fcm (dict) --

            The content of the message template that applies to FCM (Firebase Cloud Messaging) notification service.

            • title (string) --

              The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

            • body (dict) --

              The message body to use in a push notification that is based on the message template.

              • content (string) --

                The content of the message template.

            • action (string) --

              The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

              • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

              • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

              • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

            • sound (string) --

              The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

            • url (string) --

              The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

            • imageUrl (string) --

              The URL of an image to display in a push notification that's based on the message template.

            • imageIconUrl (string) --

              The URL of the large icon image to display in the content view of a push notification that's based on the message template.

            • smallImageIconUrl (string) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

            • rawContent (dict) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

              • content (string) --

                The content of the message template.

          • baidu (dict) --

            The content of the message template that applies to Baidu notification service.

            • title (string) --

              The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

            • body (dict) --

              The message body to use in a push notification that is based on the message template.

              • content (string) --

                The content of the message template.

            • action (string) --

              The action to occur if a recipient taps a push notification that is based on the message template. Valid values are:

              • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

              • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

              • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

            • sound (string) --

              The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

            • url (string) --

              The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the action property is URL.

            • imageUrl (string) --

              The URL of an image to display in a push notification that's based on the message template.

            • imageIconUrl (string) --

              The URL of the large icon image to display in the content view of a push notification that's based on the message template.

            • smallImageIconUrl (string) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

            • rawContent (dict) --

              The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

              • content (string) --

                The content of the message template.

      • description (string) --

        The description of the message template.

      • language (string) --

        The language code value for the language in which the quick response is written. The supported language codes include de_DE, en_US, es_ES, fr_FR, id_ID, it_IT, ja_JP, ko_KR, pt_BR, zh_CN, zh_TW

      • sourceConfigurationSummary (dict) --

        The source configuration summary of the message template.

        • whatsApp (dict) --

          The sourceConfiguration summary of the message template that applies to the WHATSAPP channel subtype.

          • businessAccountId (string) --

            The ID of the End User Messaging WhatsApp Business Account to associate with this template.

          • templateId (string) --

            The ID of WhatsApp template.

          • name (string) --

            The name of the WhatsApp template.

          • language (string) --

            The language of the WhatsApp template.

          • components (list) --

            The list of component mapping from WhatsApp template parameters to Message Template attributes.

            • (string) --

              The component mapping from WhatsApp template parameters to Message Template attributes.

          • status (string) --

            The status of the message template.

          • statusReason (string) --

            The status reason of the message template.

      • groupingConfiguration (dict) --

        The configuration information of the grouping of Amazon Q in Connect users.

        • criteria (string) --

          The criteria used for grouping Amazon Q in Connect users.

          The following is the list of supported criteria values.

        • values (list) --

          The list of values that define different groups of Amazon Q in Connect users.

          • (string) --

      • defaultAttributes (dict) --

        An object that specifies the default values to use for variables in the message template. This object contains different categories of key-value pairs. Each key defines a variable or placeholder in the message template. The corresponding value defines the default value for that variable.

        • systemAttributes (dict) --

          The system attributes that are used with the message template.

          • name (string) --

            The name of the task.

          • customerEndpoint (dict) --

            The CustomerEndpoint attribute.

            • address (string) --

              The customer's phone number if used with customerEndpoint, or the number the customer dialed to call your contact center if used with systemEndpoint.

          • systemEndpoint (dict) --

            The SystemEndpoint attribute.

            • address (string) --

              The customer's phone number if used with customerEndpoint, or the number the customer dialed to call your contact center if used with systemEndpoint.

        • agentAttributes (dict) --

          The agent attributes that are used with the message template.

          • firstName (string) --

            The agent’s first name as entered in their Amazon Connect user account.

          • lastName (string) --

            The agent’s last name as entered in their Amazon Connect user account.

        • customerProfileAttributes (dict) --

          The customer profile attributes that are used with the message template.

          • profileId (string) --

            The unique identifier of a customer profile.

          • profileARN (string) --

            The ARN of a customer profile.

          • firstName (string) --

            The customer's first name.

          • middleName (string) --

            The customer's middle name.

          • lastName (string) --

            The customer's last name.

          • accountNumber (string) --

            A unique account number that you have given to the customer.

          • emailAddress (string) --

            The customer's email address, which has not been specified as a personal or business address.

          • phoneNumber (string) --

            The customer's phone number, which has not been specified as a mobile, home, or business number.

          • additionalInformation (string) --

            Any additional information relevant to the customer's profile.

          • partyType (string) --

            The customer's party type.

          • businessName (string) --

            The name of the customer's business.

          • birthDate (string) --

            The customer's birth date.

          • gender (string) --

            The customer's gender.

          • mobilePhoneNumber (string) --

            The customer's mobile phone number.

          • homePhoneNumber (string) --

            The customer's mobile phone number.

          • businessPhoneNumber (string) --

            The customer's business phone number.

          • businessEmailAddress (string) --

            The customer's business email address.

          • address1 (string) --

            The first line of a customer address.

          • address2 (string) --

            The second line of a customer address.

          • address3 (string) --

            The third line of a customer address.

          • address4 (string) --

            The fourth line of a customer address.

          • city (string) --

            The city in which a customer lives.

          • county (string) --

            The county in which a customer lives.

          • country (string) --

            The country in which a customer lives.

          • postalCode (string) --

            The postal code of a customer address.

          • province (string) --

            The province in which a customer lives.

          • state (string) --

            The state in which a customer lives.

          • shippingAddress1 (string) --

            The first line of a customer’s shipping address.

          • shippingAddress2 (string) --

            The second line of a customer’s shipping address.

          • shippingAddress3 (string) --

            The third line of a customer’s shipping address.

          • shippingAddress4 (string) --

            The fourth line of a customer’s shipping address.

          • shippingCity (string) --

            The city of a customer’s shipping address.

          • shippingCounty (string) --

            The county of a customer’s shipping address.

          • shippingCountry (string) --

            The country of a customer’s shipping address.

          • shippingPostalCode (string) --

            The postal code of a customer’s shipping address.

          • shippingProvince (string) --

            The province of a customer’s shipping address.

          • shippingState (string) --

            The state of a customer’s shipping address.

          • mailingAddress1 (string) --

            The first line of a customer’s mailing address.

          • mailingAddress2 (string) --

            The second line of a customer’s mailing address.

          • mailingAddress3 (string) --

            The third line of a customer’s mailing address.

          • mailingAddress4 (string) --

            The fourth line of a customer’s mailing address.

          • mailingCity (string) --

            The city of a customer’s mailing address.

          • mailingCounty (string) --

            The county of a customer’s mailing address.

          • mailingCountry (string) --

            The country of a customer’s mailing address.

          • mailingPostalCode (string) --

            The postal code of a customer’s mailing address.

          • mailingProvince (string) --

            The province of a customer’s mailing address.

          • mailingState (string) --

            The state of a customer’s mailing address.

          • billingAddress1 (string) --

            The first line of a customer’s billing address.

          • billingAddress2 (string) --

            The second line of a customer’s billing address.

          • billingAddress3 (string) --

            The third line of a customer’s billing address.

          • billingAddress4 (string) --

            The fourth line of a customer’s billing address.

          • billingCity (string) --

            The city of a customer’s billing address.

          • billingCounty (string) --

            The county of a customer’s billing address.

          • billingCountry (string) --

            The country of a customer’s billing address.

          • billingPostalCode (string) --

            The postal code of a customer’s billing address.

          • billingProvince (string) --

            The province of a customer’s billing address.

          • billingState (string) --

            The state of a customer’s billing address.

          • custom (dict) --

            The custom attributes in customer profile attributes.

            • (string) --

              • (string) --

        • customAttributes (dict) --

          The custom attributes that are used with the message template.

          • (string) --

            • (string) --

      • attributeTypes (list) --

        The types of attributes that the message template contains.

        • (string) --

      • messageTemplateContentSha256 (string) --

        The checksum value of the message template content that is referenced by the $LATEST qualifier. It can be returned in MessageTemplateData or ExtendedMessageTemplateData. It’s calculated by content, language, defaultAttributes and Attachments of the message template.

      • tags (dict) --

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

        • (string) --

          • (string) --