Set up the Loby integration

With the Loby integration, you can connect Heyloyalty to Loby and automatically transfer customers, memberships and ticket purchases to Heyloyalty. If your museum, attraction or venue uses Loby for tickets and memberships, you can use the data to welcome new members, remind members to renew and follow up on ticket purchases.

In this guide, we walk you through 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

Welcome new members when their membership starts. Start a flow with a date-based trigger on the field Loby Membership valid from, and use the field Loby Membership is renewal to tell new members apart from members who have renewed.

Reminder before the membership expires

Send a reminder a number of days before the date in Loby Membership valid to, so the member has time to renew. Leave out members where Loby Membership auto renew is Yes, as their membership renews automatically.

Winback of former members

When a membership has expired, you can try to win the member back. Start a flow a number of days after the date in Loby Membership valid to with an invitation to become a member again.

Follow-up after ticket purchases and events

Tickets and event tickets come into the tracking as purchases. Use them to send a thank-you or a relevant offer after a purchase. 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 after the event.

Events in your emails

The integration creates the product feed Loby events with your published events in Loby. Show your events with name, image, price and a link to buy tickets in your campaigns and automations.

Integration specifications

In this section, you’ll get a better understanding of how the different parts of the integration work.

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: /memberships and /membership-types
  • Tickets and event tickets: /tickets and /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.

Note: When you send newsletters to the list, use a segment that leaves out contacts where Loby Newsletter consent is 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.

Note: Loby Membership status is calculated when the contact is retrieved from Loby, and it is only updated when the customer or the membership changes in Loby. Use the date field Loby Membership valid to when a flow should be sent relative to the expiry date.

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 → Loby, and click Create new Loby. You now get to the page New 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 contacts on 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: Select Yes if the membership fields on the contact should be filled in with the contact’s most recent membership in Loby. The section Membership fields is then shown as well.

Once you have pasted your token, Heyloyalty retrieves the membership types from Loby and shows them under Membership types in Loby in the section Membership fields.

Step 3: Check the import settings and fields

The sections Import settings, Customer fields, Loby fields, Ticket fields and Membership fields are prefilled, so you can usually leave them as they are. Read more about them under Advanced settings.

Step 4: Save the integration

Click Create 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.

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. That is why it can be useful to import earlier contacts and tickets from Loby. You do this from the overview of your Loby integrations, where you click the three dots (⋮) next to the integration and select Import past contacts and tickets.

In the import window, you choose which period to import and how the contacts should be handled:

  • From date and To date: Select the period. 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.
  • Handling of previously unsubscribed contacts: Select Ignore previously unsubscribed if contacts who have unsubscribed in Heyloyalty should not be subscribed again. By default, the field is set to Recreate unsubscribed.
  • Send opt-in message: Choose whether the import should send the list’s opt-in message.
  • Send automations: Choose whether the imported contacts should be able to start your active automations, for example a welcome flow.

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.

Note: Whether the ticket purchases in the import can start automations depends on Send active automations under Import settings, not on the field Send automations in the import window.

Click Import past contacts and tickets 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

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.
  • Character separating options: Set to a full stop (.). Leave it as it is, as the integration uses the character to read membership fields such as membership.validTo from Loby.
  • May previously unsubscribed be imported again: 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 any errors in the import file 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 mapping determines where data from Loby is placed in Heyloyalty. In every section, the fields in Heyloyalty are on the left and the field in Loby is on the right.

  • Customer fields: Links the customer’s details in Loby to the fields on your list, for example first name, email and postcode. On the right, you write the name of the field in Loby.
  • Loby fields: The fields the integration keeps up to date on your list, for example Loby Customer id and Loby Newsletter consent. Fields marked Created on save are added to the list when you save. Loby Customer id cannot be changed, as the integration uses it to recognise the contact.
  • Ticket fields: Links the fields on the Loby ticket to the fields in the tracking. The Loby fields are created in the tracking when you save.
  • Membership fields: Shown when Include memberships is set to Yes. The fields are filled in with the contact’s most recent membership in Loby, and under Membership types in Loby you can see the membership types retrieved from Loby.

If you are missing a field, you can add it via the link Add fields to the list under Customer fields or Add tracking fields under Ticket fields.

Note: Save the integration before you follow the links. Anything unsaved is lost when the page changes.

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. That gives you customers, memberships, ticket purchases and events in one place.

Use the membership fields and the ticket purchases to create segments and flows that reach your members and guests at the right moments: when the membership starts, before it expires, after a ticket purchase and after an event. Show your events from Loby events in your newsletters, and remember the segment on Loby Newsletter consent when you send them.

Note: Segmentation and flows based on tracking data, such as ticket purchases, require a Premium license. Read more in Tracking Segmentation.

Need Support?

If you have questions you can't find answers to here, you can always contact us at support@heyloyalty.com

Contact Support