Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Using Middle to automate rewards

Middle can automatically fulfill a reward when a customer redeems it in Perkville. Perkville sends a synchronous webhook request to the reward’s selected Middle workflow, waits for its response, and uses the result to determine the voucher status and whether an ordinary points redemption is completed. Work with a Perkville representative to complete the steps below.

What is Middle?

Middle is an integration platform owned by Perkville that powers Perkville integrations and custom workflows with connected systems. See Middle integration capabilities for currently documented connectors and common use cases.

Webhook reference

For workflow builders and troubleshooting:

Set up Middle redemption

1

Create a Middle API key for your account

Likely a Perkville representative will help you with this step

  1. Open the account in Middle.

  2. Select API keys in the account navigation.

  3. Select Add API key.

  4. Enter a descriptive name for the calling system, such as Perkville Redemptions.

  5. Leave Active on and select Save.

  6. Copy the secret immediately (you will enter it in Perkville)

The secret is shown only once. Middle cannot display it again after you leave or refresh the page. If it is lost, rotate the key or create a new key.

2

Enter the Middle API key in Perkville

  1. Go to the reward program's advanced settings

  2. Scroll down to Middle

  3. Toggle Use Middle on

  4. Paste the Middle API key you just created

  5. Scroll to the bottom and click Save

3

Create a real-time workflow API endpoint

  1. Go back to the business's Middle account and click on Workflow Triggers in the left-hand menu

  2. Scroll to Real-time workflow API endpoints from modules

  3. Click Connect real-time workflow API endpoint from module

  4. Select the relevant module connection, workflow, and API key(s)

  5. Click Create

The API key, endpoint, and workflow’s real-time API trigger must be active, and the workflow must have a live version eligible for the API. Its Return step must define boolean success and string success_message and error_message fields. See the response contract for examples.

4

Map the reward(s) to Middle

Go to the relevant reward perks you want to automatically credit through Middle.

  1. Toggle Use Middle to automate redemption to Yes

  2. Select the workflow this perk should map to

  3. Click Save

Repeat these steps for each reward you want to set up.

Perkville loads the workflow choices from Middle using the business’s API key and filters them for the required output schema. If a workflow is missing, check that its endpoint is active, linked to the key, and configured with the required output fields.

Last updated

Was this helpful?