A Webhook allows you to send your recipients' data to an external system via a Flow. The first step is to create the Webhook itself. Once you've created a Webhook, you can configure which data fields the Webhook should send. You can send three different types of data:
- Person Data
- One-to-Many data
- Global Data
- Static data
Before making a Webhook, you should consider if you want to use a Webhook Transformation Service to use with the Webhook. If a Webhook Transformation Service is not using the Webhook, it will send the selected data in the default JSON data format for Agillic.
Here's an example of the default JSON format:
{ "personData": { "FIRSTNAME": "John", "LASTNAME": "Doe" }, "otmData": { "PRODUCTS": [ { "ID": "123", "NAME": "Fancy phone", "PRICE": "99.99", "IN_STOCK": "true" } ], "BOOKS": [ { "ISBN": "a", "TITLE": "Book of good examples", "AUTHOR": "John Doe", "PUBLISHED": "08.09.2017" }, { "ISBN": "b", "TITLE": "Book of good questions", "AUTHOR": "Jane Doe", "PUBLISHED": "06.09.2017" } ] } }
How to Create a Webhook without a Webhook Transformation Service
- Open the Data module.
- Select 'Webhook' from the left sidebar.
- Click the 'create' icon in the top toolbar. A new Webhook will appear in the work area.
- Fill in the name of the Webhook in the 'Name' field.
- Fill in the URL of your Webhook service in the 'URL' field.
- Fill in the username for your Webhook service in the 'Username' field.
- Fill in the password for your Webhook service in the 'Password' and 'Retype Password' field.
- Click the 'Save' button.
Now, you've created a Webhook and it's ready for you to configure.
A Webhook set up with no Webhook Transformation Service
How to Create a Webhook with a Webhook Transformation Service
Before making the Webhook, make sure you've created a Webhook Transformation Service.
- Open the Data module.
- Select 'Webhook' from the left sidebar.
- Click the 'create' icon in the top toolbar. A new Webhook will appear in the work area.
- Fill in the name of the Webhook in the 'Name' field.
- Check the 'Use Agillic Webhook transformation service' checkbox.
- A drop-down will appear below the checkbox. Select your Webhook Transformation Service from the drop-down.
- Click the 'Save' button.
Now, you've created a Webhook and it's ready for you to configure.
A Webhook set up with a Webhook Transformation Service
How to Configure a Webhook
- Open the 'Content' section under the Webhook.
- Drag a Person Data from the 'Available Data' list to the 'Selected Data' list, under the 'Person Data' subpanel.
- Repeat Step 2 for each Person Data you need to add.
- Drag a One-to-Many Table from the 'Available Data' list to the 'Selected Data' list, under the 'One-to-Many Table' section.
- Repeat Step 4 for each One-to-Many Table that you need to add.
- Under the 'Static data' section, fill out the key of a static data in the 'Key' field.
- Fill in the value of static data in the 'Value' field.
- Click the plus icon to add the static data.
- Repeat steps 6 - 8 for each static data you need to add.
- Click the 'Save' button
Now, you've configured the Webhook and it's ready for you to use in a Webhook Step.
A Webhook with configured content