> For the complete documentation index, see [llms.txt](https://docs.anedot.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.anedot.com/integrations/crm-donor-management/virtuous.md).

# Virtuous

Connect Anedot to Virtuous to send donation and contact data from your Action Pages, manage your connection, and review field mapping and payload data.

The **Virtuous** integration sends donation and contact data from your Action Pages to Virtuous, donor management software for nonprofits. It lives in **Settings > Integrations**, and this page covers how to connect Anedot to Virtuous, manage your connection, understand data relays, find your data in Virtuous, send a segment name, and review field mapping and payload data.

## Before You Begin

* You need **Integrations: Edit permissions** to add, edit, push or delete a connection. Integrations: Edit permissions also require **Action Pages: View permissions** and **Integrations: View permissions**. See [Permission Sets](https://docs.anedot.com/settings/access/permission-sets.md).
* You need a Virtuous API Key, created in Virtuous under **All Settings > Connectivity > API Keys**.

## Connect Anedot to Virtuous

Connecting takes two stages. First you create an API Key in Virtuous, then you add it to Anedot.

### Step 1: Get Your Virtuous API Key

Virtuous recommends API Keys for integrations and syncs.

To create an API Key in Virtuous:

1. In Virtuous, go to **All Settings > Connectivity > API Keys**.
2. Click **Create a Key** in the upper right.
3. Enter a descriptive name for the key.
4. Select the appropriate permission group.
5. Click **Save API Key**.
6. Copy the generated API Key.

You now have the API Key you'll enter in Anedot.

{% hint style="info" %}
Some Virtuous articles call this path **Settings > Connectivity > API Keys**. Both lead to the same API Keys page.
{% endhint %}

### Step 2: Create the Connection in Anedot

To create the connection:

1. Go to **Settings > Integrations**.
2. Click **New integration**.
3. Choose **Virtuous**. The card is in the CRM category and is described as "Send Action Page data to Virtuous."
4. Choose which Action Pages to include:
   * Leave **All Action Pages** checked to include every current and future Action Page. (Optional) In **Exclude Pages**, enter a comma separated list of Action Page IDs, with no spaces, to leave those pages out.
   * Uncheck **All Action Pages** and choose pages in **Selected pages** to include only the pages you pick.
5. Leave **Team** set to **All teams**.
6. Enter the API Key you copied from Virtuous in **Virtuous API key**.
7. Click **Create integration**.

You'll see "Integration created." and your connection appears in the list. Anedot doesn't send anything to Virtuous when the connection is created. New gifts are sent as donors give.

{% hint style="info" %}
Until you add a **Name** in **Edit**, the list shows **Integration** followed by the connection ID, for example **Integration 42**.
{% endhint %}

## Manage Your Connection

Each connection row has three buttons: **Edit**, **Push unsent**, and **Delete**.

### Edit Your Connection

To edit a connection:

1. Go to **Settings > Integrations**.
2. Click **Edit** on the Virtuous connection.
3. (Optional) Update your Action Page selection.
4. Leave **Team** set to **All teams**.
5. Enter a **Name** for the connection. **Name** is required to save.
6. Click **Save integration**.

You'll see "Integration updated." The **Provider** field shows the provider and can't be changed.

{% hint style="info" %}
The API key isn't shown or changed in **Edit**. To use a different API key, delete the connection and connect again.
{% endhint %}

### Push Unsent Gifts

Use **Push unsent** to send submissions and recurring charges in a date range that haven't already been successfully sent as a gift. Gifts that were already sent successfully aren't sent again.

When you click **Push unsent**, choose a **Start date** and **End date**:

* The range can be up to 31 days.
* The **Start date** must be within the last 12 months.
* Wait about five minutes between pushes.

You'll see "Push started." when the push begins. For the full steps, see [Push Unsent](https://docs.anedot.com/integrations/integration-automation-tools/webhooks.md#push-unsent) in Webhooks (API).

### Delete Your Connection

To stop sending data to Virtuous, delete the connection.

To delete a connection:

1. Go to **Settings > Integrations**.
2. Click **Delete** on the Virtuous connection.
3. Confirm "Delete this integration?"

You'll see "Integration deleted." Anedot stops sending to Virtuous, and records already in Virtuous aren't changed.

{% hint style="danger" %}
Deleting a connection can't be undone. To send data to Virtuous again, connect again.
{% endhint %}

## Data Relays

### What Anedot Sends

* **Donation Pages:** one gift after the payment is completed.
* **Paid Event Pages:** one gift after the payment is completed.
* **Recurring donations:** each successful recurring charge is sent as its own gift, with `recurring_gift_transaction_id` set to the original submission ID. Creating a commitment doesn't send a separate record.
* **Multi-fund gifts:** one gift, with one entry in `designations` for each fund. `amount` is the full total.

Before sending a gift, Anedot looks up an existing Virtuous contact by email. If a contact is found, its ID is sent in `contact.id`. If not, `contact.id` is null and Virtuous receives the contact data with the gift. These contact lookups don't appear in Integration Requests.

For each fund, Anedot looks up a Virtuous project by the fund identifier. If none is found, Anedot creates a project. Project creates can appear as separate rows in Integration Requests.

Amounts are sent in dollars as a number, for example `25.0` for $25.00. `transaction_source` is `Donation`.

A conduit fund is a fund that another Anedot account shares with your account through Connected Accounts, when your account collects gifts for that account as a conduit. Anedot records a gift to a conduit fund as a donation on the account that owns the fund, not on your account. A gift that uses only a conduit fund is not sent from your connection. On a multi-fund gift, conduit fund lines are left out of `designations`, and `amount` is still the full total.

### Reversals

Anedot sends a reversal to Virtuous when a donation is fully refunded, voided, or returned as an ACH return. Reversals are sent in a daily batch at 1:00 AM Central Time.

* Each reversal is a full reversal of the gift. On a multi-fund gift, a refund of one donation reverses the whole gift.
* Anedot looks up the gift in Virtuous first. If the gift isn't found, no reversal is sent and no Integration Requests row is created.
* The reversal request includes `giftDate`, `reversedGiftId`, and `notes`. It doesn't include an amount.

Partial refunds, chargebacks, and settled events aren't sent as reversals.

### Records Anedot Skips

Anedot doesn't send the following, and no Integration Requests row is created when the send is skipped:

* Lead Pages
* A submission missing a first name or last name
* Abandoned Actions
* Later edits to a submission already sent
* Commitment changes, such as a cancellation
* A donation whose payment isn't completed yet (it's sent when the payment completes)
* A record already sent successfully as a gift
* Any record after the connection is deleted
* Partial refunds, chargebacks, and settled events
* A reversal when the original gift isn't found in Virtuous
* A single-fund conduit gift

### Delivery And Retries

Anedot sends the gift to Virtuous when its send job runs. Each request appears in **Settings > Integration Requests**, with the request body, request headers, response body, and response status. Gift sends, project creates, and reversals can appear as separate rows. See [Integration Requests](https://docs.anedot.com/integrations/relay-data-troubleshooting/integration-requests.md).

* **Success:** Virtuous responded with any HTTP 2xx status.
* **Failure:** Virtuous responded with any other HTTP status. Fix the cause, then use **Push unsent** for gifts that weren't successfully sent.
* **Error:** Anedot couldn't complete the request. The row may show "No HTTP status." Use **Push unsent** for gifts that weren't successfully sent.

{% hint style="success" %}
Turn on the **Integration sync failed** notification in the Integrations section of your notification settings to get an email when a row ends in Failure. It's off by default. See [Notifications](https://docs.anedot.com/get-started/security/notifications.md).
{% endhint %}

## Find Your Data in Virtuous

To confirm a gift left Anedot, look for its Success row in **Settings > Integration Requests**. A Success row means Virtuous accepted the transaction. It doesn't by itself mean the Gift is already on the contact record.

Here's how Virtuous handles the gift after Anedot sends it:

1. Virtuous accepts the transaction and places it in a holding state.
2. Each night at midnight, Virtuous bundles pending transactions into an import in the **Gift and Contact Import Tool**, grouped by the source they were submitted with.
3. Virtuous matches contacts by email, phone, address, name, and external references.
4. Your team reviews the import and selects **Run**. Gifts and Contacts are created when the import runs.

If Virtuous can't confidently match a Gift to a Contact, it can place the Gift in a needs-update area for someone on your team to resolve.

To review pending transactions in Virtuous:

1. In Virtuous, go to **Settings > Data Management**.
2. Choose **View Gift Transactions** or **View Pending Contacts**.

To bundle transactions before the nightly run:

1. In Virtuous, go to **Settings > Data Management**.
2. Choose **View Gift Transactions**.
3. Select the records you want to bundle.
4. Click **Bundle** in the upper right.
5. Go to the **Gift and Contact Import Tool** to review and import as usual.

The bundled transactions are ready for review in the Import Tool.

In the **Gift and Contact Import Tool**, **Import History** shows each import's status. **Processed** means your team still needs to review and import the data. **Imported** shows a green cloud icon you can use to view the imported data.

## Using A Segment Name

Anedot can send a segment value in the `segment` field.

To send a segment name:

1. Add a hidden field to your Action Page with the **Label** set to exactly `segment_name`.
2. Set the value with a URL parameter that uses the field's internal name, or with the hidden field's default value.

The value is sent in `segment` with each gift from that page. No other hidden fields are sent to Virtuous. See [Hidden Fields](https://docs.anedot.com/action-pages/page-builder/hidden-fields.md) and [URL Parameters](https://docs.anedot.com/action-pages/advanced-features/url-parameter.md).

## Field Mapping

The tables below use the field names as stored in **Settings > Integration Requests**. On the wire, Virtuous receives camelCase keys, such as `transactionId` and `amountDesignated`.

### Gift And Contact Fields

| Anedot Value                                                             | Virtuous Field                                      |
| ------------------------------------------------------------------------ | --------------------------------------------------- |
| Submission or recurring-charge ID                                        | `transaction_id`                                    |
| `Donation`                                                               | `transaction_source`                                |
| Virtuous contact ID from the email lookup, or null                       | `contact.id`                                        |
| `Anedot`                                                                 | `contact.reference_source`                          |
| `Organization` if an organization name is present, otherwise `Household` | `contact.contact_type`                              |
| Title                                                                    | `contact.title`                                     |
| Organization name, or first and last name                                | `contact.name`                                      |
| First name                                                               | `contact.first_name`                                |
| Last name                                                                | `contact.last_name`                                 |
| Middle name                                                              | `contact.middle_name`                               |
| Suffix                                                                   | `contact.suffix`                                    |
| Email                                                                    | `contact.email`                                     |
| `Home Email`                                                             | `contact.email_type`                                |
| Phone, digits only, last 10                                              | `contact.phone`                                     |
| `Home Phone`                                                             | `contact.phone_type`                                |
| Address line 1                                                           | `contact.address.address1`                          |
| Address line 2                                                           | `contact.address.address2`                          |
| City                                                                     | `contact.address.city`                              |
| State / region                                                           | `contact.address.state`                             |
| Postal code                                                              | `contact.address.postal`                            |
| Country                                                                  | `contact.address.country`                           |
| Submission or charge date created, UTC                                   | `gift_date`                                         |
| `Credit`, `EFT`, or `Other`                                              | `gift_type`                                         |
| Hidden field labeled `segment_name`, or null                             | `segment`                                           |
| Total amount in dollars, for example `25.0`                              | `amount`                                            |
| Null on recurring charges                                                | `frequency`                                         |
| Original submission ID on recurring charges; otherwise null              | `recurring_gift_transaction_id`                     |
| `Visa`, `Mastercard`, `AMEX`, or `Discover`, or null                     | `credit_card_type`                                  |
| One entry per fund: name, fund identifier, and amount in dollars         | `designations` (`name`, `code`, `amountDesignated`) |
| True when the account is a nonprofit organization                        | `is_tax_deductible`                                 |

`gift_type` is `Credit` for cards, `EFT` for bank gifts, or `Other`. `is_tax_deductible` is true when your account's entity type is a nonprofit organization.

### Project Fields

If no Virtuous project is found for a fund identifier, Anedot creates a project with these values:

| Anedot Value     | Virtuous Field             |
| ---------------- | -------------------------- |
| Fund name        | `name`                     |
| Fund identifier  | `revenue_accounting_code`  |
| Fund description | `description`              |
| `Ongoing`        | `duration_type`            |
| `OngoingNeed`    | `financial_need_type`      |
| `annually`       | `financial_need_frequency` |
| `Unspecified`    | `location`                 |
| `Not Allocated`  | `inventory_status`         |
| `Default`        | `type`                     |
| true             | `is_active`                |
| false            | `enable_sync`              |

### Reversal Fields

| Anedot Value                | Virtuous Field   |
| --------------------------- | ---------------- |
| The gift date from Virtuous | `giftDate`       |
| The Virtuous gift ID        | `reversedGiftId` |
| An empty string             | `notes`          |

## Payload Data

These examples show the request body as stored in **Settings > Integration Requests**. Values in angle brackets are placeholders.

### Gift Request

A $25.00 one-time card donation from Annie Dot:

```json
{
  "transaction_id": "<submission uuid>",
  "transaction_source": "Donation",
  "contact": {
    "id": "<virtuous contact id or null>",
    "reference_source": "Anedot",
    "contact_type": "Household",
    "title": null,
    "name": "Annie Dot",
    "first_name": "Annie",
    "last_name": "Dot",
    "middle_name": null,
    "suffix": null,
    "email": "annie.dot@example.com",
    "email_type": "Home Email",
    "phone": "2255550123",
    "phone_type": "Home Phone",
    "address": {
      "address1": "123 Main St",
      "address2": null,
      "city": "Baton Rouge",
      "state": "LA",
      "postal": "70801",
      "country": "US"
    }
  },
  "gift_date": "<created_at, UTC timestamp>",
  "gift_type": "Credit",
  "segment": null,
  "amount": 25.0,
  "frequency": null,
  "recurring_gift_transaction_id": null,
  "credit_card_type": "Visa",
  "designations": [
    {
      "name": "<fund name>",
      "code": "<fund identifier>",
      "amountDesignated": 25.0
    }
  ],
  "is_tax_deductible": true
}
```

### Reversal Request

Reversal requests are stored in camelCase:

```json
{
  "giftDate": "<virtuous gift date>",
  "reversedGiftId": "<virtuous gift id>",
  "notes": ""
}
```

### Failure Responses

Authorization failure (HTTP 401):

```json
{
  "message": "Authorization has been denied for this request."
}
```

A gift that Virtuous already has can return HTTP 400 with `"Gift Transaction already exists."` in `modelState`. A reversal for a gift that isn't found can return HTTP 400 with `"Transaction not found."`

## Troubleshooting

### A Gift Isn't on the Contact in Virtuous

1. Go to **Settings > Integration Requests** and look for a Success row for the gift.
2. If the row shows Success, review the transaction in Virtuous under **Settings > Data Management > View Gift Transactions**, or in the **Gift and Contact Import Tool**. Confirm the import has been reviewed and **Run**.
3. If there's no row, confirm the submission has a first and last name, the Action Page is included in your connection, and the payment completed. Lead Pages aren't sent.

### A Row Shows Failure

Open the row in **Settings > Integration Requests** and review the response body and status. Fix the cause, such as an invalid API key, then use **Push unsent** for gifts that weren't successfully sent.

### A Row Shows Error

Anedot couldn't complete the request, and the row may show "No HTTP status." Use **Push unsent** for gifts that weren't successfully sent.

### A Reversal Didn't Send

Confirm the donation is a full refund, a void, or an ACH return, and that the original gift exists in Virtuous. Partial refunds and chargebacks aren't sent. Reversals are sent in the daily 1:00 AM Central Time batch.

### You Need to Use a Different API Key

The API key can't be changed in **Edit**. Delete the connection, then connect again with the new API key.

If the issue continues, contact our Support team at <help@anedot.com>.

## Related Articles

* [Integrations](https://docs.anedot.com/integrations.md)
* [Integration Requests](https://docs.anedot.com/integrations/relay-data-troubleshooting/integration-requests.md)
* [Webhooks (API)](https://docs.anedot.com/integrations/integration-automation-tools/webhooks.md)
* [Permission Sets](https://docs.anedot.com/settings/access/permission-sets.md)
* [Teams](https://docs.anedot.com/settings/access/teams.md)
* [Commitments](https://docs.anedot.com/finance/management-and-reporting/commitments.md)
* [Hidden Fields](https://docs.anedot.com/action-pages/page-builder/hidden-fields.md)
* [URL Parameters](https://docs.anedot.com/action-pages/advanced-features/url-parameter.md)
* [Notifications](https://docs.anedot.com/get-started/security/notifications.md)
* [CRM & Donor Management](https://docs.anedot.com/integrations/crm-donor-management.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.anedot.com/integrations/crm-donor-management/virtuous.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
