Samples

Samples are saved messages that you can reuse for testing your templates, updating your code, or reviewing your flow setup. They simplify troubleshooting and help you test template changes effectively.

In this article you will read more about:

What are samples

In SendPro, a sample is a message (commonly an email) that you have sent before. When you create a sample, you create a snapshot of that message as it was at that point in time. A sample contains the data, content and headers of the original message.

Saving a sample allows you to resend it as if it were a new message from the original source. This makes message extremely helpful to create test sets of commonly used messages. No need to trigger a new message in the source system – just save a message once, and you can use it to test your template changes repeatedly. Samples are also very useful for troubleshooting errors. You can save the message that triggered the error, fix your code, and try again – using the sample.

How are samples used

Samples can be created from archived messages or those currently in Error status. They capture the data and content of the message at that specific time, which is useful for resolving errors by analyzing the problematic data, or for testing additional flows without triggering the original message again. This ensures that errors can be addressed accurately and new processes can be validated safely.

Overview samples

You can find Samples under Design > Samples. You need at least a Designer level role to create, see or edit samples. Opening the Samples page shows you a list of your current samples, ordered by Created Date.

samples list.png

On this page you can:

  • Search samples. You can search by Created Date or Source.
  • Click on one of your samples to go to the Sample Detail page, where you can inspect, edit or send the sample.
  • Creating a sample.

Creating a sample

You can create a sample from the overview. You use this when you want to create your own sample – or when you want to copy the values of a sample from (for example) another account.

But it's easier to use a sample based on an archived message. Find a message that has been archived or is in an Error state. In the message preview, click the sample pin-icon to create a new sample.

samples-archived-sample.jpg

You will be prompted to provide a description, which should be recognizable, such as 'Webshop Order' or 'Webform – new Client.' This description can be changed later if needed.

samples create popup.png

When you create a sample, or when you open one from the list, you will see the message, and the message details.

samples send.png

The message details show:

  • The Created date
  • The Type of message (Email or SMS)
  • The Source of the message
  • The original Sender of the message
  • The Description you choose earlier

The message shows you the archived version of the message. There are three tabs:

  • Preview: showing the archived html version
  • Headers: showing the headers of the saved message
  • Data: showing the data saved for that message, if any

Best practices

When you save a sample, you’re capturing the message exactly as it is at that moment. Depending on when you do this, the sample can serve different purposes:

  • Before any flowsteps are applied: The sample reflects the message as it exits the source system, in its original state. This is useful for testing whether the source system sends the correct data and structure.
  • After flowsteps have modified the message, or from an error: This helps you troubleshoot errors, or test whether further flows pick it up.

Choosing the right moment to save a sample ensures you're testing the right part of your setup. In most cases, you want to make sure you have a clean sample, based on the original message triggered by the source system. This is best accomplished by placing the Archive flowstep at the beginning of the flow. Once you have a good sample, you can move the flowstep back towards the end of the flow. See the Archive flowstep for more details.

Sending a sample

To send a sample, click the Send Sample button on the sample details page.
samples send.png
You will be prompted with a popup asking you to confirm the address to send the sample to.

samples send popup.png

By default, the popup suggests sending the message to your own email address. Once you confirm by clicking Send Sample, the message will be triggered as if it were a new message from the original source. This means that the message will also be picked up by the corresponding flow and will be treated like a normal message – activating flowsteps, flowtypes, conditions etcetera normally.

Editing a sample

On the Sample detail page, you will find an Edit and a Delete button. Clicking delete permanently removes the sample from your account. Clicking edit opens the Sample editor, allowing you to change the contents, data and details of the sample.

Edit page.png

On the edit page, you can change the following information:

  • Description: your name for this sample
  • Sender address: the address the sample will be sent from if you click Send Sample
  • Source: the source the sample will simulate being sent from
  • Type: email or SMS

On the edit page, you can also change the data and the contents of the message.

Data

Under Data, you can edit the (Json) data sent with the message. This will commonly be data sent by your source system but may also be data you created with a data template in SendPro. Choose between Tree or Code mode, according to your preference.
Code.png
Both modes allow you to change the data. The editor shows syntax errors and will try to fix simple mistakes, but make sure you save properly formatted Json code.

MIME Data

Under MIME Data, you can edit the message's contents using a simple text editor. The MIME data contains the message's headers and HTML content, written in Quoted Printable encoding.

Mime data.png

FAQs

Can I create a sample from a non-archived message?

No. Without an archive, SendPro has no data to create the Sample from. You can, however, create an archive from an errored message.

Can I create a sample from a SMS
Yes. Keep in mind that SMS has restrictions on what a message can and cannot contain. You can test the SMS by entering the mobile number in place of your email address, when you click Send Sample.
How do I send a test message from a template?
Samples help you test templates by using real message data. In SendPro, a template alone is not the whole story. You need actual data to fill in details like client names or conditional logic. That’s why sending a test email directly from a template is not an option. Instead, you should create a sample from a real message and use that for testing.
My sample does not end up in the correct flow
It’s likely that you created a sample after the message was already changed by flowsteps. The conditions for your flow may no longer apply to your sample.