# Spotler

You can configure your PeopleStage and Orbit channels to use the integration with the Spotler broadcaster.

## Prerequisites

Confirm you're using the latest Q4 2024 Apteco Suite. Upgrade your FastStats32Service and confirm the PeopleStage client matches this version by updating the Binaries. See [Installation and updates](<https://help.apteco.com/en/admin/installation/software-update-guides/index.md>).

## PeopleStage channel configuration

1. Go to the PeopleStage channel editor: **File** \> **Administration** \> **Channel Editor**.
2. Create a new channel with the following settings:

   - **Response Key File Type**: `Urn with Broadcast Id`
   - **Broadcaster**: Spotler
   - **Username**: you should enter a username, but it isn't used in this case
   - **Password**: This needs to be your `spotler_api_key`
   - **Message Content Type**: `Broadcaster Template`
   - **Retrieve existing message names**: tick this box

   **API Logger Path** (recommended, for tracking requests and responses for debugging):

   - **API Logger Path**: `c:\temp\Spotler\Spotler_{yyyyMMdd}@{HHmm}.txt`
   - **Use Dated List**: true
   - **URL**: `https://app.spotlerconnect.com`

## Orbit channel configuration

1. Go to the Orbit channel editor.
2. Select **\+ Item** to create a new channel.

   - **Response Key File Type**: `Urn with Broadcast Id`
   - **Broadcaster**: Spotler
   - **Username**: you should enter a username, but it isn't used in this case
   - **Password**: This needs to be your `spotler_api_key`
   - **Email Variable**: select the box and choose the variable containing the email addresses
   - **Email Variable Description Override**: Email
   - **Reply Email Address**: Add the required reply address
3. Configure the following in **Parameters**:

   - **Use Dated List**: tick the box
   - **URL**: `https://app.spotlerconnect.com`
   - **API Logger Path**: `c:\temp\Spotler\Spotler_{yyyyMMdd}@{HHmm}.txt`

   - **Response Key File Type**: `Urn with Broadcast Id`
   - **Message Content Type**: `Broadcaster Template`
   - **Retrieve existing message names**: tick this box

## Template and database field setup

You can design your email content in Spotler MailPro:

- **Database fields**: use fields like `Firstname`, `Lastname`, or `DateOfBirth` for static data held on the Contact record. Reference them in templates using `{{ contact.fieldname }}` (e.g. `{{ contact.Firstname }}`).

  > **Note**
  >
  > Apteco substitutes spaces for underscores in field names (e.g. `Phone number` → `Phone_number`).
- **Dynamic fields (DMD fields)**: use for values that change per send (e.g. discounts or transactional data). Reference format: `{{ contact.DMD_fieldname }}` (e.g. `{{ contact.DMD_discount }}`).

See [Spotler documentation](<https://spotler.com/en-gb/guides>) for template configuration.

## Spotler campaigns

To configure your deliveries:

1. Choose an **email template** from the drop-down list within your message step.
2. Enter a **group name** for the delivery.

   > **Note**
   >
   > Groups are automatically created with a unique datetime suffix for each send.
3. Define your content either in the channel or at the content step.
4. Use `DMD_` prefixed fields for transactional data (e.g. `DMD_discount`), sent during email trigger without updating Spotler's database.
5. Use non-`DMD_` fields such as `contact.Firstname` for persistent data across communications for the same recipient.

When you publish the campaign, Spotler creates a new group, adds the selected recipients to it, and triggers the email template for each recipient.

## Collecting responses

1. Download the **DigitalIntegrations.zip** file from the [Apteco Portal](<https://portal.apteco.com/>) and install the [FastStats Email Response Gatherer (FERG)](<https://help.apteco.com/en/peoplestage/responses/digital-channels/faststats-email-response-gatherer/index.md>).

   > **Note**
   >
   > If you are using an earlier Apteco software version than Q4 2024, Spotler won't appear as an option in the **Broadcaster** dropdown.
2. Run the FastStats Email Response Gatherer Configurator with the following settings:

   - **Connection String**: pointing at your response (RS\_) database
   - **Broadcaster**: Spotler
   - **Username**: you need to enter a username here, but it isn't used to connect
   - **Password**: the `spotler_api_key`
   - **SMTP Properties**: add your Simple Mail Transfer Protocol (SMTP) server details, and tick **Send Email on Error**
   - **RESPONSEPERIOD**: `3M` (rolling 3-month period)
   - **URL**: `https://app.spotlerconnect.com`

### Example response gatherer configuration

XML

```xml
<EmailResponseGathererConfiguration>
  <ConnectionString>Your connection string to the RS_ database</ConnectionString>
  <ConnectionTimeout>1200</ConnectionTimeout>
  <BulkInsertFolder>c:\Temp\BulkInsert</BulkInsertFolder>
  <Broadcaster>Spotler</Broadcaster>
  <Username>username</Username>
  <Password>spotler_api_key</Password>
  <SendEmailOnError>True</SendEmailOnError>
  <Parameters>
    <Parameter>
      <Key>URL</Key>
      <Value>https://app.spotlerconnect.com</Value>
    </Parameter>
    <Parameter>
      <Key>ResponsePeriod</Key>
      <Value>3M</Value>
    </Parameter>
  </Parameters>
  <Port>25</Port>
  <Server>exchange.apteco.com</Server>
  <SSL>False</SSL>
  <From>from email</From>
  <To>to email</To>
</EmailResponseGathererConfiguration>
```

## Notes

- Spotler updates response files once daily. Coordinate with Spotler to determine the update schedule.
- Responses include metrics such as email opens, clicks, and bounces.
- For any issues or advanced configurations, refer to [Spotler's documentation](<https://spotler.com/en-gb/guides>) or contact [Apteco Support](<https://portal.apteco.com/contact-support>).
