At Virtuous, we believe in playing well with others. That's why we have a robust API that allows for seamless integration with other systems.
While the API is an excellent way to access data in bulk, on a set schedule, webhooks provide access to real-time data updates in Virtuous, allowing you to seamlessly sync data with other platforms and maintain up-to-date records.
To configure webhooks, hover over the left side bar, then select Settings. Under Settings, select All Settings.
To create a new webhook, click the "Create a Webhook" button.
This will bring up the new webhook form.
In order to create webhook, you must provide a valid url where data will be posted. Be sure to include a complete url.
For additional security, you may opt to include a secret key that will be sent as a header with each post, to confirm that data is being sent from Virtuous. The secret key will be sent as a hash generated using the HMACSHA256 algorithm.
Next, you'll have a choice to subscribe to all webhook events or select specific events. Webhooks are currently available for:
- Contact Create - receive an update any time a new Contact is added to Virtuous
- Contact Update - receive an update when data for an existing Contact is changed (for example, a new phone number is added)
- Contact Note Create - receive an update any time a new Contact Note is added to Virtuous
- Contact Note Update - receive an update when data for an existing Contact Note is changed
- Contact Note Delete - receive an update any time an existing Contact Note is deleted
- Event Create - receive an update any time a new Event is added to Virtuous
- Event Update - receive an update when data for an existing Event is changed
- Event Delete - receive an update any time an existing Event is deleted
- Form Submission - receive an update when a Form is submitted
- Gift Create - receive an update any time a new Gift is added to Virtuous
- Gift Update - receive an update any time data for an existing Gift is changed
- Gift Delete - receive an update any time an existing Gift is deleted
- Project Create - receive an update any time a new Project is added to Virtuous
- Project Update - receive an update any time data for an existing Project is changed
- Project Delete - receive an update any time an existing Project is deleted
To receive webhooks for all events, select "Send me everything" (this is the default option). To receive only certain webhooks, select "Let me select specific events" and then click on the checkbox by each event you wish to receive.
In order to receive webhooks, make sure the "Active" box is checked. If a webhook is no longer needed, it can be deactivated at any time.
Working With Webhooks
When an event occurs for which there is an active webhook, a payload will be sent immediately to the specified url. This means that if you have an active Gift Create webhook, you may receive several webhooks any time a Gift import is processed. Make sure your system is able to handle the volume of webhooks for these events.
Webhook payloads are sent in JSON format. Here is a sample Contact Create payload:
"name": "Dr Stephen Strange",
"Board Term Start": null,
"Board Term End": null,
"Willing to be a Solicitor": null
"type": "Primary Email",
"type": "Mobile Phone",
"address1": "177 Bleecker St",
"city": "New York",
"name": "Virtuous Sample Organization"
All webhooks can be reviewed on the Manage Webhooks screen. Click on the Edit icon to the right of any webhook to make changes to the configuration, including updating the payload url or the selected events.
From the edit screen, you can also review the webhook history, including payloads and responses. Use the tabs in the upper left to toggle between successfully delivered webhooks or to review failed webhooks. Click on the event ID for any successful webhook to view the payload and response.
In the event that webhook delivery fails, Virtuous will automatically retry up to five times over a 24-hour period. When viewing failed webhooks, a counter to the right in red will display the number of attempts made. To retry any failed webhook, just click on the refresh icon to the right.
Now you are all set to start getting data updates from Virtuous!