Quickstart
1. Set up the Entri Modal
The first step to getting up and running with Entri Connect is configuring Entri..2. Launch the Entri modal window
Call theshowEntri
method with your configuration object to trigger the Entri modal to appear.
3. Listen for the onEntriClose
callback event
When a user closes the Entri pop-up modal, Entri sends a callback event that you can listen for. It includes information from the session such as the domain added, whether or not the user completed the setup, and the type of DNS set up for that user (automatic, manual or shared login).
JavaScript
JavaScript
lastStatus
field. For a full description of all lastStatus
fields, see here: https://developers.entri.com/api-reference#onentriclose-callback-event-datalaststatus-fields
When you receive the callback event you can display a success message in your application or move the user to a next step—whatever works best in your flow.
Advanced Usage
Here are a few examples of extra features to get even more out of your Entri installation.Launch Entri with a prefilled domain
If you’d like to use a prefilled domain and bypass the domain input screen on the Entri modal, you can send a domain directly to Entri as part of the configuration object:JavaScript
Syntax Notes *
prefilledDomain
should not contain www.
It should
be a naked domain. * At this time, Entri does not handle domain validation
when you send a domain using the prefilledDomain variable. You’ll need to
handle validation in your application’s UI.Add a userId
to track events via Entri webhooks
Entri uses webhooks to notify you when a user has added a domain and when the new DNS records have been propagated. In order to correlate the webhook event with the user that triggered it, add a userId
to the configuration object. This should be the same ID that the backend of your application uses.
JavaScript
Check if Entri supports automatic setup for a domain
You can check if a domain is eligible for automatic setup directly using thecheckDomain
method. This will tell you in advance whether the process fully automatic for your users or if they’ll be asked to handle the DNS setup manually.
It takes two arguments:
- The domain (string) to be checked
- Your Entri configuration object (the same one used for launching the Entri modal window)
then()
or using the await
operator—whatever works best in your application.
JavaScript
JSON
NSSupport
object specifies whether Entri is able to execute Nameserver changes at the root
and/or subdomains
levels.
Dynamic configuration variables based on the user-inputted domain
You can insert dynamic variables into thednsRecords
section of your configuration object using {}
syntax.
For example, if the user sets up blog.example.com
, the following variables will be available:
Please note, all the variables are case-sensitive and must be inputted
in all upper-case.
{DOMAIN}
=example.com
{SUBDOMAIN}
=blog
{SLD}
=example
{TLD}
=com
JavaScript
If you need to use different records based on whether the flow is running for a domain or a subDomain, you can always use our Conditional Records feature.
Email Provider SPF
DNS configurations support the variable{emailProviderSPF}
for email provider SPF records. It outputs different values depending on the provider:
- If the provider is Google, it equals
include:_spf.google.com
- If the provider is Microsoft, it equals
include:spf.protection.outlook.com
- If the provider is Zoho Mail, it equals
include:zoho.com
- If the provider is unknown, it equals nothing (empty string)
Launch the Entri modal window with a CustomEvent
In addition to using the entri.showEntri()
method, you can launch the Entri modal using a CustomEvent: