Setting Up an Invoca Webhook Source
Part 1: Prepare Shuttle for the Invoca Webhook
- Set up a webhook Source in Shuttle.
- Select the API key for your Source in Shuttle to copy it, and keep it handy. You'll need this to finish setting up your webhook in Invoca.
Part 2: Create Your Invoca Webhook
- Sign in to Invoca.
- Decide if you want to create an Advertiser-specific of a Campaign-specific webhook.
- Advertiser Webhook: From the Network level, select "Custom Webhooks" under "Integrations."
- Campaign Webhook: From the Advertiser level, select "Custom Webhooks" under "Integrations.
- On the "Custom Webhooks" page you'll be able to view all current webhooks. To create a new webhook, click on the "New webhook" button on the right.
- Select one of the following webhook types:
- Pre-Transfer: Will send to Shuttle prior to the call being transferred to the destination phone number. This webhook type will only include some preliminary call information.
- Post-Call: Will send to Shuttle at the call's completion. This webhook type will include the most complete list of call data.
Part 3: Set Invoca Webhook Details
- In "Name," type a name for your webhook.
- Depending on your type of webhook (Advertiser or Campaign), you will either see "Advertiser" or "Campaign" after "Name." Choose the appropriate Advertiser/Campaign that you would like this webhook to be associated with.
- Depending on your type of webhook, do the following:
- Pre-Transfer webhooks: Skip this step.
- Post-Call webhooks: In "Fire Webhook On," select "All calls." With this, the webhook will fire with each incoming call.
- In "Webhook Formats," select "HTTP Form Post."
- In "Webhook URL," enter the following URL for Shuttle:
Part 4: Setting Invoca Webhook Post Parameters
In "Post Parameters," do the following:
- Confirm that "Omit post parameters with empty values" is unchecked.
- Get the API key for your Source from Shuttle that you kept handy (from Part 1, Step 2).
- In the text area under the "Omit post parameters with empty values" checkbox, type "api_key=" (do not include the quotes).
- Now, paste your API key after the equals sign. It should look something like this: "api_key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" (where xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx is your API key from Shuttle).
- Now you need to add Invoca data. You will do this by building more pool parameters. Each of these pool parameters will be on a separate line. The parameter name (like "api_key," above) is what Shuttle will recognize as the Source Field. The parameter value can be static (hard-coded) or you can use an Invoca data variable, called a "substitution parameter."
An example of Invoca's pool parameter text area. The term to the left of the equals sign will become a Source field in Shuttle. The term to the right of the equals sign is Invoca's pool parameter value.
To use a substitution parameter, click the "Add substitution parameter" button. On the following pop-up, choose the appropriate substitution parameter by clicking its link and it will be inserted into your Pool Parameters text area for you.
If you do not know what to name a pool parameter, we recommend just borrowing Invoca's syntax from the substitution parameter. For more information on parameters, check Invoca's Parameters documentation.
- When you are done, choose the "Save Changes" button at the bottom of Invoca's new webhook page.