Skip to content

Configuration

TRAML uses the application configuration and runtime configuration. The runtime configuration is done via Lime Admin and the application configuration is configured in application_config.yml for on-premise or CAFE for cloud. More info about configuration in Lime here.

Application Configuration Settings

These are all the settings that can be set via the application configuration. Only api_url and api_key are required. The other settings are for testing purposes.

Info

If the solution already has application config for the old TRAML package the new TRAML will default to that config. However, the new whitelist and override settings won't work if you don't have the new config in place as well.

Parameter Name Required Type Default Value Description
api_url Yes str None URL to Lime Marketing API aka Bedrock
api_key Yes str None The API-key
api_user No str None If the API key is not connected to a user in Lime Marketing a user email must be provided together with the API key
is_enabled No bool true Toggle TRAML on/off - will log an error 'Sending is disabled' if used when not enabled
dry_run.is_enabled No bool false Toggle dry run on/off. When enabled it only logs out what should have been sent unless the recipient is found in the whitelisted emails/mobile numbers
dry_run.whitelisted_emails No List[str] [] List of email addresses to send to even when dry run is enabled
dry_run.whitelisted_mobile_numbers No List[str] [] List of mobile numbers to send to even when dry run is enabled
override_recipient.override_email No str None Regardless of the recipient the recipient email address will always be set to this value
override_recipient.override_mobile_number No str None Regardless of the recipient the recipient mobile number will always be set to this value

On-premise

Add the config from the example below to the application config. If an application config doesn't exist or you don't know where to find it - check out the platform docs on how to find/create the config.

  • Change app-name to the Lime application identifier.
  • Change /customername/ in api_url to the customer Lime Marketing application. Make sure the api_url ends with /api/

Lime Marketing Bedrock API can be hosted on other domain and path which of course requires a different api_url but the example is the normal use case when the Lime Marketing App is hosted on app.bwz.se

Minimum Settings

This is the bare minimum required to run TRAML:

app-name:
  config:
    limepkg_transactional_message_library:
      api_url: https://app.bwz.se/customername/bedrock/api/
  secrets:
    limepkg_transactional_message_library:
      api_key: the-lime-marketing-api-key-in-uuid-format

All Settings

These are all settings for use when testing/developing:

app-name:
  config:
    limepkg_transactional_message_library:
      api_url: https://app.bwz.se/customername/bedrock/api/
      is_enabled: true
      dry_run:
          is_enabled: true
          whitelisted_emails:
            - "[email protected]"
            - "[email protected]" 
          whitelisted_mobile_numbers:
            - "+4600001337"
      override_recipient:
        override_email: "[email protected]"
        override_mobile_number: "+46700001337"
  secrets:
    limepkg_transactional_message_library:
      api_key: the-lime-marketing-api-key-in-uuid-format

Cloud

TRAML can be used in an isolated app in cloud or through an add-on that has a dependency to TRAML and is deployed to the shared cloud, e.g. Lime eSign. To configure TRAML in Cloud, go to CAFE and enter config as the following example YAMLs.

  • Change /customername/ in api_url to the customer Lime Marketing application. Make sure the api_url ends with /api/

Info

It's possible to use all the above settings in cloud as on-premise

Configuration

limepkg_transactional_message_library:
  api_url: https://app.bwz.se/customername/bedrock/api/

Secrets

limepkg_transactional_message_library:
  api_key: the-lime-marketing-api-key-in-uuid-format

Configuration for testing

Dry Run

The dry_run setting makes it possible to use TRAML without emails or SMS being sent to the recipients. TRAML is fully functional when dry_run is enabled but will not send any requests to the Lime Marketing Bedrock API. Instead of posting to the API, TRAML will log the following info to the standard logger:

'Dry run is active should have sent {message as json}'

Dry Run with Whitelisted Recipients

Email addresses or mobile phone numbers can be exempt from the dry_run setting by whitelisting them. Messages sent to whitelisted addresses or phone numbers will be sent as usual.

Override Recipients

The recipient's email or mobile phone number can be overridden by defining an alternative email or mobile phone number. When TRAML is run with values in override_recipient.override_email or override_recipient.override_mobile_number it substitutes the recipient before the message is sent. This is done before dry run white lists is evaluated - i.e. if you override with a recipient in a white list - messages will always be sent regardless if dry_run is enabled or not. In addition to using the overridden information the following information will be logged to the standard logger:

'Overriding recipient email [email protected] with [email protected]'

Configuration in Lime Admin

There are no configurable settings in lime-admin yet but it's possible to test the connection to Lime Marketing and get an overview of the current application configuration settings.

image
Example output of application config settings in Lime Admin
Back to top