---
schema_version: "1"
id: ab806be1c56e3d1203ef8c8afcc58f390736b4c939dbc79cd7363d3d6c9ec961
title: Testing an Object Trigger Before Sending
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/mc_co_test_object_triggers.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.mc_co_test_object_triggers.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: efbea82b2343154eb5ec73da13af64085ad03f0e855b7e63b79c418bf16e8eb7
description: Before sending a triggered email through Marketing Cloud Connect for Marketing Cloud Engagement, use a test script. Repeat the script for each object with a trigger setup. Ensure that the object’s defined properties account for all required properties on an object.
products:
  - Marketing
  - Cross Cloud
release: "264"
---
# Testing an Object Trigger Before Sending

Before sending a triggered email through Marketing Cloud Connect for Marketing Cloud Engagement, use a test script. Repeat the script for each object with a trigger setup. Ensure that the object’s defined properties account for all required properties on an object.

This example script checks the Contact object, where LastName='TestExample'.

```html
{

  private static testmethod void ContactTriggerTest()

  {     

           insert new et4ae5__Configuration__c(et4ae5__Support_Ticket_Recipient__c = 'example@example.com');

           Test.startTest();

           Contact c = new Contact(LastName='TestExample');

           // Insert contact

           insert c;

           // If no exceptions occurred, it was successful 

           System.assert(!String.isBlank(c.Id));

           Test.stopTest();

  }

}
```