Latner Documentation

How to Set Up Webhooks

Webhooks let Latner push customer and account changes out to another system the moment they are saved, so your CRM, portal or data warehouse stays in step without anyone re-keying anything.

Overview

Not every system your business runs on lives inside Latner. A webhook integration is a standing instruction to tell one external system, at one URL, every time a record it cares about is created or changed.

  • Latner can push six record types: Account, Account Contact, Customer, Customer Contact, Customer Site and Payment Term.

  • Each integration is one destination URL with its own list of ticked record types. You can set up as many integrations as you need.

  • Latner sends an HTTP POST when a record is created and a PATCH when one is updated. Deletions are never sent.

  • The call goes out synchronously, as part of the save itself. If your endpoint does not accept it, the save fails and nothing is written in Latner.

  • There is no retry queue, no delivery report and no way to replay a call from Latner.

  • Authentication is optional. Latner can send the call anonymously or with a token you supply.

Before You Begin

You need one permission and one destination before you can set a webhook up.

Requirement

Where to Find It

Webhook Integration permission

Security › Configuration › Permission Groups, under the Configuration module

A destination URL that accepts JSON over HTTPS

The system you are pushing to

An authentication token, if your destination needs one

The system you are pushing to

08-permission.png
the Webhook Integration permission sits under the Configuration module, not under Security

There is no system setting to switch webhooks on or off. An integration starts sending the instant you save it with a record type ticked, so have your endpoint built and listening before you create it.

What Latner Can Push

Each ticked record type sends a fixed JSON payload. Every payload identifies the record by its uuid, and related records are referenced by their uuid too, so your system can match them up on later calls.

  • Customer and Account - uuid, code, name, registered name, type, status, credit status, ABN, entity type, the billing address, the billing contact, the main site and the payment terms uuid.

  • Customer Contact and Account Contact - uuid, first name, last name, status, email, phone, job title, and the uuid and name of the customer they belong to.

  • Customer Site - uuid, code, name, status, address, phone, delivery instructions, and the uuids of the customer, delivery contact and billing contact.

  • Payment Term - uuid, term, description, type and day configuration.

Accounts and Customers are the same underlying record seen through two screens, and the same is true of Account Contacts and Customer Contacts. The pairs exist so you can push CRM activity and customer-management activity to different places, or label them differently at your end. If you tick both halves of a pair for the same integration, a record saved on the CRM screen arrives as an Account and the same record saved on the Customer screen arrives as a Customer.

The call itself is a JSON request with a Content-Type of application/json. If you chose Token Authentication, Latner adds an Authorization: Token <your token> header. Latner also adds a Webhook-Origin header naming the systems the change has already passed through, which is what stops two systems pushing the same change back and forth at each other forever.

By default every call goes to exactly the URL you entered. Tick Use API Endpoint and Latner instead appends a path for the record type, matching its own API: accounts, account-contacts, customers, customer-contacts, sites or payment-terms, with the record's uuid on the end for updates. Use it when your destination is another Latner tenant or a service that copies Latner's URL scheme. Leave it off when you have built a single endpoint of your own.

Setting Up a Webhook

Step 1 - Open the Webhook Integrations screen

Go to Security › Configuration › Webhook Integrations. Every integration you have set up is listed here as a card.

01-nav-webhook-integrations.png
the Webhook Integrations screen before anything is set up

Step 2 - Start a new connection

Select Create to open the Connect to Webhook dialog, then fill in the destination.

  • Webhook Name - required, and it must be unique. It is only a label for your team, but you cannot reuse it later, so keep it descriptive.

  • Webhook Description - required. It shows on the card, so say what the destination is for.

  • Webhook URL - required. The full address Latner sends to.

02-connect-dialog-empty.png
the Connect to Webhook dialog, with the record types at the bottom all unticked

Step 3 - Choose how Latner authenticates

Authentication Type is required and offers two choices. Pick No Authentication if your endpoint is open or is secured some other way, or Token Authentication to have Latner send a token with every call.

03-auth-type-dropdown.png
the two authentication choices; anything beyond a token needs to be handled at your end

Step 4 - Enter the token and tick the records to push

Choosing Token Authentication reveals the Authentication Credentials field, which is then required. Paste in the token your destination expects. Latner stores it encrypted and never shows it again.

Then tick the record types you want pushed under Active Webhooks. Anything left unticked is simply not sent. If you need Latner's own URL paths appended, tick Use API Endpoint as well.

04-connect-dialog-filled.png
Authentication Credentials appears only once Token Authentication is chosen

Step 5 - Save

Select Save. The integration appears as a card on the list and is live immediately, so the very next matching save in Latner will call your endpoint.

05-integration-card.png
the saved integration; the description you entered is what identifies it on the card

After You Save

  • Latner calls your endpoint on every create and update of a ticked record type, whoever makes the change and wherever they make it, including the mobile app and the API.

  • Creating a customer sends one Customer call. The main site and billing contact that Latner creates alongside it are included in that payload rather than sent as separate calls.

  • A customer site that Latner creates for you while importing rental contracts does not send its own Customer Site call.

  • Deleting a record sends nothing at all. Your destination will not hear about it.

The call is part of the save, not a background job. If your endpoint answers with an error, or is unreachable, or is slow enough to time out, the user's change is rolled back and they see an error instead of a saved record. A destination that goes down will stop your team saving customers until you remove the integration, so only point a webhook at something you are confident stays up.

Changing or Removing a Webhook

Select Configure on a card to reopen the same dialog as Configure Webhook. Every field can be changed, including which record types are ticked. The Authentication Credentials field shows asterisks rather than the stored token; leave it alone to keep the existing token, or type a new one to replace it.

06-configure-dialog.png
the stored token is never shown again, only masked

To stop an integration, select Remove Webhook and confirm. It stops sending straight away and disappears from the list. This is the quickest way to unblock your team if a destination has gone down.

07-remove-confirmation.png
removing a webhook takes effect immediately, with no further confirmation

A removed webhook cannot be brought back from this screen, and its name stays reserved. If you want the same destination again you will have to create a new integration under a different name, so if you only need to pause it, use Configure to untick every record type instead of removing it.

FAQs

Saving a customer now fails with a "Sending Webhook failed" message. What has happened?

Your destination answered the call with an error, and because the webhook is part of the save, the save was abandoned with it. The message includes the status code and the start of the reply your endpoint gave, which is usually enough for whoever maintains it to identify the problem. Nothing was written in Latner, so once the endpoint is fixed the user can simply save again. If you need your team working before then, remove the integration.

The save failed with a general error instead, and no webhook message. Is that the same thing?

It usually is. When the destination replies with an error you get the webhook message; when it cannot be reached at all, because the address is wrong, the certificate is bad or the server is not answering, the failure surfaces as a general error instead. Either way the change was rolled back and nothing was saved.

Where can I see what Latner sent, or resend a call that failed?

There is no delivery log screen. Successful calls are recorded internally, but a failed call is rolled back along with the change that triggered it, so there is nothing left in Latner to inspect or replay. Diagnosing a failure means looking at the logs of the system receiving the call.

Can I push rental contracts, invoices or equipment?

Not through webhooks. The six record types on the Active Webhooks list are everything Latner pushes out this way. For anything else, use the external API, which lets your system pull the records it needs on its own schedule.

Why has my system not been told about a customer we deleted or deactivated?

Deletions are not sent. Deactivating rather than deleting is the way to have the change reach your system, because setting a customer's status to Inactive is an update, and the status is part of the payload.

Can Latner push the same records to two different systems?

Yes. Create one integration per destination and tick the record types on each. Bear in mind that every one of them is part of the save, so a customer ticked on three integrations has to be accepted by all three before the change is written, and any one of them failing blocks it.

Creating a customer failed with a message about a main site that could not be found. Why?

The Customer and Account payloads include the customer's main site, so a customer with no site at all cannot be described to your destination and the save is refused. Give the customer a site and save again.

The Webhook Integrations option is not in my menu. Why?

Your permission group does not have the Webhook Integration permission. It lives under the Configuration module in Security › Configuration › Permission Groups, and it is off by default for every group except the full administrator group.