Entity Actions
Entity Actions add custom action buttons to the right-hand sidebar of any entity edit page in the DonorPoint admin. They are the primary tool for extending the admin UI with account-specific operations without modifying any generated code.
What Entity Actions Do
An Entity Action places a button in the sidebar of a record’s edit page. When a staff member clicks the button, one of three things happens depending on the action type:
| Type | Behavior |
|---|---|
| ScriptModule execution | Runs a Script Module against the current entity record |
| Custom dialog | Opens a Bootstrap modal dialog with custom HTML and actions |
| Custom link fragment | Renders a custom XHTML UI fragment in the sidebar (suppresses default button behavior) |
Entity Actions are defined per account and appear on every record of the configured entity type.
Creating an Entity Action
Entity Actions are found on the Integration sidebar.
- Go to Integration > Entity Actions.
- Click Create New Entity Action.
- Enter a Name — displayed as the button label (can be an EL expression for dynamic labels).
- Select the Entity Type the action applies to (Contact, Campaign, Organization, PurchaseOrder, etc.).
- Set the Action Type (ScriptModule, Dialog, or Link Fragment).
- Configure type-specific settings (see below).
- Set optional Rendered Rule, Disabled Rule, and Confirmation Prompt.
- Choose an Icon (Font Awesome class).
- Ensure Active is checked.
- Save.
Common Properties
| Property | Description |
|---|---|
| Name / Label | Button text; can be an EL expression: #{contact.firstName.concat(' Actions')} |
| Icon | Font Awesome icon class, e.g., fa-envelope, fa-download, fa-cog |
| Rendered Rule | EL expression — button is hidden when false. Example: contact.get('GivingTier').value eq 'MAJOR' |
| Disabled Rule | EL expression — button is shown but greyed out when true. Example: purchaseOrder.status ne 'ACTIVE' |
| Confirmation Prompt | EL expression for a “Are you sure?” dialog message shown before executing. Example: 'Send acknowledgment to ' + contact.email + '?' |
ScriptModule Action
The most common type. Runs a Script Module when the button is clicked. The current entity is available as this in the script.
Example: Send Custom Acknowledgment
Entity Type: Contact
Script Module: SendMajorGiftAcknowledgment
import "mailer";
import "queryService";
// Get the most recent major gift for this contact
var gifts = queryService.createQuery(
"select po from PurchaseOrder po where po.contact = :contact " +
"and po.status = 'ACTIVE' and po.amount >= 1000 " +
"order by po.orderReceived desc"
).setParameter('contact', this)
.setMaxResults(1)
.getResultList();
if (gifts.size() > 0) {
var gift = gifts.get(0);
mailer.sendEmail(
this.email,
'Thank you for your generous gift',
'Dear ' + this.firstName + ', thank you for your gift of $' + gift.amount + '.'
);
log.info('Sent acknowledgment to ' + this.email);
} else {
log.warn('No major gift found for contact ' + this.id);
}
Example: Export Contact to External CRM
Entity Type: Contact
Rendered Rule: contact.get('ExternalCrmId') == null or contact.get('ExternalCrmId').value == ''
Confirmation Prompt: 'Export ' + contact.firstName + ' ' + contact.lastName + ' to external CRM?'
Dialog Action
Opens a Bootstrap modal dialog with custom HTML content. The dialog can contain forms, buttons that trigger server-side actions, and EL expressions evaluated at render time.
The dialog content is specified as XHTML stored in the action configuration. The current entity is available as this in EL expressions within the dialog content.
Example dialog content:
<h:panelGroup>
<h3>Custom Action for #{entityAction.name}</h3>
<p>Contact: #{contact.firstName} #{contact.lastName}</p>
<h:commandButton value="Perform Action"
action="#{myCustomBean.performAction(contact)}"
update="dialogContent" />
</h:panelGroup>
Link Fragment Action
Renders a custom XHTML fragment directly in the sidebar area instead of a button. Use this for displaying read-only information alongside the standard sidebar links, or for complex custom UI that needs more than a simple button.
Entity Actions vs. Campaign Template Actions
Entity Actions are configured per account and apply to specific entity types globally — every Contact, every Campaign, etc.
Campaign Template Actions are configured per Campaign Template and appear in the sidebar of campaigns created from that template. Use Campaign Template Actions for campaign-specific operations; use Entity Actions for operations that apply across all records of a type.
See Campaign Templates for Template Actions.
Common Use Cases
| Use Case | Entity Type | Action Type |
|---|---|---|
| Send custom acknowledgment email | Contact | ScriptModule |
| Export record to external CRM | Contact, Organization | ScriptModule |
| Generate a custom PDF report | Campaign, PurchaseOrder | ScriptModule |
| Trigger a matching gift check | PurchaseOrder | ScriptModule |
| Mark a contact as a major gift prospect | Contact | ScriptModule |
| Show giving summary panel | Contact | Link Fragment |
| Launch a data entry dialog | Contact, Organization | Dialog |
| Create follow-up task | Contact | ScriptModule |