If your museum, attraction or venue uses Loby for tickets and memberships, the Loby integration brings your customers, their memberships and their ticket purchases into Heyloyalty. You can then see who has just become a member, whose membership expires next month, and who bought a ticket for a specific event. And you can write to them when the membership starts, before it expires and after the event.
In this guide, you can read how the integration works, how to set it up and how to import earlier contacts and tickets from Loby.
What value does the Loby integration provide?
Welcome new members
When a membership starts, you can tell the new member how to use it, for example opening hours, benefits and the next exhibition. Start a flow with a date-based trigger on the field Loby Membership valid from. The field Loby Membership is renewal shows whether the member is new or has renewed, so the two groups can get different messages.
Get members to renew in time
You know when each membership expires, and you can write to the member before it happens. Send a reminder a number of days before the date in Loby Membership valid to. Leave out members where Loby Membership auto renew is Yes. Their membership renews automatically.
Win back former members
A former member has already chosen you once. Start a flow a number of days after the date in Loby Membership valid to, and invite them to become a member again.
Follow up after ticket purchases and events
Tickets and event tickets come into the tracking as purchases. You can then see who bought what and write to them afterwards, for example with a thank-you, an invitation to the next event or an offer of a membership. Event tickets carry the event’s start and end date (event_start and event_end), so you can find the people who bought a ticket for a specific event and follow up once the event is over.
Show upcoming events in your emails
The integration creates the product feed Loby events with your published events in Loby. Show your upcoming events with name, image, price and a link to buy tickets in your campaigns and automations, so the recipient can go straight to the ticket purchase.
Integration specifications
Here you can read how each part of the integration works.
Once set up, the integration runs continuously:
- The integration is one-way. Data only flows from Loby into Heyloyalty, and nothing is written back to Loby.
- The integration retrieves customers from Loby, adds them to the selected list and matches them on email or mobile number.
- Every 5 minutes, the integration retrieves new and changed customers and memberships as well as new tickets from Loby. New contacts are created, and existing contacts are updated.
- The integration only retrieves data from the moment you create it. You import earlier contacts and tickets with an initial import.
- Tickets and event tickets bought by known customers are created as purchases in the list’s tracking.
- Your published events in Loby become the product feed Loby events.
- Every night, the integration reconciles the list with Loby. Contacts deleted in Loby are deleted and anonymised in Heyloyalty, and refunded tickets are cancelled in the tracking.
The integration retrieves data from these endpoints in the Loby API:
- Customers:
/customers - Memberships and membership types:
/membershipsand/membership-types - Tickets and event tickets:
/ticketsand/event-tickets - Events:
/events
You can see every field that is mapped in the field mapping for Loby.
Contacts and permission
By default, the integration only imports customers who have subscribed to the newsletter in Loby. This is controlled by the setting Only import newsletter subscribers. If you set it to No, all customers are imported, including those who have not subscribed to the newsletter.
The field Loby Newsletter consent shows the customer’s consent in Loby:
- Yes: The customer has subscribed to the newsletter in Loby.
- No: The customer has not subscribed to the newsletter in Loby or has opted out.
Contacts who later opt out of the newsletter in Loby stay in Heyloyalty, but their Loby Newsletter consent is set to No. If a customer is already on the list, the contact is also updated with data from Loby, even if the customer has not subscribed to the newsletter in Loby. Here, too, Loby Newsletter consent is set to No.
Memberships
When Include memberships is set to Yes, the integration fills in the membership fields on the contact with the contact’s most recent membership in Loby, for example the membership type, the start and expiry date, and whether the membership renews automatically. When the setting is No, which is the default, the membership fields are not filled in.
The membership types in Loby become options in the field Loby Membership type, and new membership types are added as they appear.
The field Loby Membership status can have four values:
- active: The membership is active.
- expiring: The membership is active but expires within 30 days.
- lapsed: The membership is no longer active.
- never: The customer has never had a membership in Loby.
Tickets in the tracking
Tickets and event tickets bought in Loby by a known customer are imported as purchases in the list’s tracking. Each ticket becomes its own purchase, and the contact is found through the field you match on.
- For event tickets, the event is the product, and the ticket type is kept in
ticket_type. For other tickets, the ticket type is the product. - The price of the purchase is the ticket type’s price in kroner. The integration does not retrieve orders from Loby, so discounts, fees and the order’s total amount are not included.
- Tickets without a customer in Loby, for example tickets sold at the till without a customer, cannot be linked to a contact and are not imported. The same goes for tickets where the customer has no value in the field you match on.
- Refunded tickets are cancelled in the tracking during the nightly reconciliation.
If the list does not have a tracking integration, the Loby integration creates one when you save.
The Loby events product feed
When you save the integration, it creates the product feed Loby events with all published events in your Loby account. Each event includes the name, description, image, a link to buy tickets, the start and end date, and the lowest and highest ticket price. If the list’s tracking integration does not already have a product feed, Loby events is connected to it.
Use the feed in your campaigns the same way as other product feeds. Read more in Product feed in a campaign.
Nightly reconciliation
Every night at 2 a.m., the integration reconciles the list with Loby:
- Contacts with a Loby Customer id that have been deleted in Loby are deleted from the list and anonymised in Heyloyalty.
- Loby Newsletter consent is corrected so the field matches the customer’s newsletter subscription in Loby.
- Tickets from the last 90 days that no longer exist in Loby, for example because they were refunded, are cancelled in the tracking.
Field mapping
On the setup page, the fields are prefilled. A field mapping you leave empty is not transferred to Heyloyalty. You can see every field and what it contains in the field mapping for Loby.
Set up the Loby integration
Step 1: Create the integration
Go to Integrations → List integrations, find Loby, and click Setup integration. You get to the page Loby overview. Click Create Loby in the top right corner. You now get to the page Create Loby integration.
Step 2: Fill in the settings
Under Settings, you fill in the connection to Loby and select the list the contacts land on:
- List: Select the list in Heyloyalty that contacts and ticket purchases from Loby should be imported to. If you don’t have a list, you can read how to create one.
- Match contact by field: Choose whether contacts should be matched on email or mobile number. The field must exist on the list, and customers without a value in the field are not imported.
- Token: Paste the API token for your Loby account. Contact Loby if you don’t have a token.
- Only import newsletter subscribers: Set to Yes by default, so only customers who have subscribed to the newsletter in Loby are imported. Read more under Contacts and permission.
- Include memberships: Set to No by default. Select Yes if the membership fields on the contact should be filled in with the contact’s most recent membership in Loby.
Once you have pasted your token, Heyloyalty retrieves the membership types from Loby and shows them in the box Membership types in Loby below the settings.
Step 3: Check the import settings and fields
The sections Import settings, Customer field mapping, Loby field mapping and Ticket field mapping are prefilled, so you can usually leave them as they are. Read more about them under Advanced settings.
Step 4: Save the integration
Click Save integration. When the integration is saved, the following happens:
- The Loby fields and the membership fields are created on the list. The membership fields are only filled in when Include memberships is set to Yes.
- The membership types from Loby become options in the field Loby Membership type.
- The list gets a tracking integration if it doesn’t already have one, and the ticket fields are created in the tracking.
- The product feed Loby events is created.
You return to Loby overview, where the integration now appears. From then on, the integration retrieves data from Loby every 5 minutes.
Step 5: Import past contacts and tickets
The integration only retrieves data from the moment you create it. If you also want earlier contacts and tickets, you import them from Loby overview. Click the three dots (⋮) next to the integration and select Get contacts and tickets from Loby.
You find Loby overview again under Integrations → List integrations, where you click Edit integration next to Loby.
In the window Get contacts and tickets from Loby, you choose which period to import and how the contacts should be handled:
- Date range: Select the period. By default, the last 7 days are selected. Contacts created in Loby within the period are imported, together with the tickets and event tickets bought in the period by known customers. You can import up to one year at a time. For a longer period, import one year at a time.
- How to handle previously unsubscribed contacts: Select Ignore previously unsubscribed contacts if contacts who have unsubscribed in Heyloyalty should not be subscribed again. By default, the field is set to recreate them.
- Trigger opt-ins: Choose whether the import should send the list’s opt-in message. Set to No by default.
- Trigger automations: Choose whether the imported contacts should be able to start your active automations, for example a welcome flow. Set to No by default.
If Only import newsletter subscribers is set to Yes, only customers who have subscribed to the newsletter in Loby are imported. Contacts are always retrieved with their current details in Loby, so you can import the periods in any order.
Click Get contacts to start the import. The data is retrieved in the background, which may take a few minutes. Afterwards, check under Lists that the contacts have arrived on the list.
Advanced settings
The sections below are open when you create the integration. When you edit it later, they are closed. Click the heading to open a section.
Import settings
Under Import settings, you decide how contacts are handled when the integration imports data. The settings are set to the default values, and we recommend that you only change them if your setup requires it.
- Import type: Choose between Update or create, Create contacts and Update only. We recommend Update or create, so new customers are created and existing contacts are kept up to date. Create contacts does not update contacts that already exist, and Update only does not create new contacts.
- Date format: The format for dates in the import. Leave it at the default.
- Sign to distinguish choices: Set to a full stop (
.). Leave it as it is, as the integration uses the character to read membership fields such asmembership.validTofrom Loby. - Avoid subscribing currently unsubscribed contacts: Leave it at the default value. You choose how previously unsubscribed contacts are handled when you import earlier data in the import window (see Step 5).
- Send active automations: Set to No by default. Set it to Yes if ticket purchases from Loby should be able to start your active automations, for example a flow after a purchase.
- Send webhooks: Set to No by default. Select Yes if contacts imported from Loby should trigger your webhooks, for example to a CRM system.
- Send import error report to: Enter an internal email address that should be notified if contacts or tickets fail in the import.
Map fields between Loby and Heyloyalty
The field mapping determines where data from Loby is placed in Heyloyalty. It is split into three sections. In all three, the fields in Heyloyalty are on the left and the field in Loby is on the right.
- Customer field mapping: Links the customer’s details in Loby to the fields on your list, for example first name, email and postcode. Under Loby customer field, you write the name of the field in Loby. The field you match contacts on cannot be changed here.
- Loby field mapping: The fields the integration keeps up to date on your list, for example Loby Customer id, Loby Newsletter consent and the membership fields. Fields that are not on the list yet are shown with their technical name, for example
loby_id, and are marked will be created. They are added to the list when you save. Loby Customer id cannot be changed, as the integration uses it to recognise the contact. The membership fields are only filled in when Include memberships is set to Yes. - Ticket field mapping: Links the fields on the Loby ticket to the fields in the tracking. Heyloyalty tracking field is on the left and Loby ticket field on the right. The Loby fields are created in the tracking when you save.
If you are missing a field, click the info icon next to Customer field mapping or Ticket field mapping. The text has a link where you can add fields to the list or to the tracking.
Make active use of your Loby data
You have now connected Loby to Heyloyalty, chosen which data to transfer and imported earlier contacts and tickets. Your customers, memberships, ticket purchases and events are now in one place.
That lets you answer questions such as: Who should get a reminder to renew this month? Who bought a ticket for an event but is not a member? Which events should go in the next newsletter? Build the answers as segments and flows on the membership fields and the ticket purchases, and show your events from Loby events in your newsletters. Remember the segment on Loby Newsletter consent when you send them.