To create a Zapier integration that grants guest access in KleverKey, the booking platform needs to provide a Zapier App with triggers or it has to support webhooks.
The booking platforms need to send at least the following data each time a booking happens:
- Receiver name (or first and last name separately)
- Receiver email or phone number
- Start date
- End date
The following property is optional:
The start and end date have to be in the ISO 8601 format without time zone information (e.g. 2022-05-03T10:00:00). If they are defined in a different format, the dates have to be converted first. If they are in UTC they have to be converted to the time zone of the lock (check the time zone information on the lock detail page in the KleverKey Portal).
Create the Zap in Zapier
You already should have basic knowledge about creating Zaps in Zapier. Start with signing into Zapier and creating a new Zap.
If the booking platform provides a Zapier App with triggers you can use that one, else create a "Webhooks by Zapier" trigger.
In this example we use the "Webhooks by Zapier" trigger.
Create a trigger "Webhooks by Zapier" and select the event "Catch Hook".
Configure the booking platform to send the booking events to the webhook URL provided by the Zapier trigger.
If your KleverKey organization has multiple locks that you want to grant guest access for, you need an additional action with which you can map the booking platform resources to KleverKey locks. Please read the article https://support.kleverkey.com/hc/en-us/articles/5294350226322 as it explains how to do that.
If you need to convert the start and end date, add a "Formatter by Zapier" action with the event "Date / Time". Please go to the Zapier documentation on https://zapier.com/help/create/format/modify-date-and-time-formats-in-zaps to see how to do that.
The last action will grant guest access in KleverKey.
Since the KleverKey Zapier app doesn't support guest access at the moment you have to use the KleverKey API directly.
Create the action "Webhooks by Zapier" and select the event "Custom Request".
Insert the following URL
and replace <ORGANIZATION-ID> with your organization ID that you find on https://portal.kleverkey.com/organization/settings.
Insert the following data
and replace <LOCK-ID>, <RECEIVER-NAME>, <RECEIVER-EMAIL-OR-PHONE-NUMBER>, <MESSAGE>, <START-DATE> and <END-DATE> with the data form the previous steps or with hard-coded information (e.g. for <LOCK-ID> or <MESSAGE>).
Go to https://portal.kleverkey.com/account/api-keys to create an API key and add the following request headers:
Your action should then look like the following example:
When you are testing this Zap, go to https://portal.kleverkey.com/organization/lock-activation-links to check if the guest access got granted successfully in KleverKey.