How to use Webhooks

30 Nov 1999

Recently we rolled out a new feature to the platform known as Webhooks. In simple terms, a webhook is the ability for you to have certain data from your site sent to the location of your choosing, in as close to real-time as possible. Funraisin already supports many integrations such as Salesforce, MailChimp, Campaign Monitor, AutoPilot and for non-supported platforms you can also tap into your site's API, however sometimes you might want to get access to data as it becomes available, and this is where Webhooks can work well.  

Setting up your Webhooks

Webhooks are part of the developers module which is available in all Funraisin sites, so to create a webhook simply navigate to Funraisin > Developer > Webhooks.

Screen Shot 2018-11-11 at 2.39.23 pm

Click on the "new webook" button and you will be shown a screen like below.  Create your new webhook using the following options: Name Just a name for your own reference Data Source Each webhook is linked to a data source so we know exactly what data to send you. Options are Donation, Fundraiser, Team, Event, Shop, Raffle Action Once you have chosen your data source you will be able to choose from a selection of actions that are specific to your data source. Available options are

Donation Donated Updated donation

Fundraiser Created account Started event Updated event Registered Updated account

Team Created team Updated team

Event Created event (DIY) Updated event

Shop Purchased product

Raffle Purchased raffle

Screen Shot 2018-11-11 at 2.42.15 pm

Method Currently only POST is available Destination Url This is the URL of the endpoint where you want us to deliver the payload to.  

Payload Format

Once a webhook has been setup it will be live and will start sending data to the destination url as soon as the right criteria are met on your site. The format of the data sent will be in JSON format and the field structure will relate to the data source being requested, so a data source of "donation" will provide you with a complete donation object in the exact same format as what you can access via the API. {"donation_id":"1234","event_id":"1","team_id":"10","member_id":"1234",etc}

Multi-step Payloads

Note that you will only receive a single record based on the data source that you choose, e.g. team, donation, fundraiser etc. If you are wanting to get access to data throughout a multi-step process such as registering for an event then you would need to setup multiple webhooks with different actions that relate to each step. An example for setting up a webhook for fundraisers to get access to all the data through the registration process you would setup the following webhooks. Fundraiser > Account Created - this would send the participant object Fundraiser > Started Event - this would send the participant's event object Team > Created (optional) - this would send the team object Fundraiser > Registered - this would send the participant's event object This would then result in up to 4 payloads being sent to your destination url.