Cloze
Cloze is a relationship management and CRM app. Protocol Launcher allows you to generate deep links for Cloze.
Usage
There are two ways to use this library:
- On-Demand import from subpaths enables tree-shaking and keeps bundles small.
- Full Import from the root package is convenient but includes all app modules.
Pick On-Demand for production builds; Full Import is fine for quick scripts or demos.
Select Installation Method
URL Methods
The helpers below mirror Cloze's official URL scheme documentation for opening a person or company profile by identifier. Cloze documents email addresses, phone numbers, company domains, social handles such as twitter:cloze, and third-party app IDs such as lead.salesforce.com:9425897598.
Open Contact
Open a contact profile with the simplified iOS URL form cloze://contact/<identifier>.
import { openContact } from 'protocol-launcher/cloze'
const emailUrl = openContact({
identifier: 'someone@company.com',
})
const socialUrl = openContact({
identifier: 'twitter:cloze',
})Open Contact Callback
Open a contact profile with Cloze's x-callback-url form cloze://x-callback-url/contact/<identifier>. Cloze documents x-success as the optional callback URL; this helper accepts it as xSuccess and serializes it to x-success.
import { openContactCallback } from 'protocol-launcher/cloze'
const url = openContactCallback({
identifier: 'someone@company.com',
xSuccess: 'myapp://back',
})Open Web Contact
Open a Cloze profile using the documented web URL forms. The hash form is the default. Cloze also documents /in/contact/<identifier> examples for email and phone lookups; use syntax: 'path' for that form. The full option maps to Cloze's full flag, and back maps to the documented back-button URL for a full-screen profile.
import { openWebContact } from 'protocol-launcher/cloze'
const webUrl = openWebContact({
identifier: 'someone@company.com',
})
const pathUrl = openWebContact({
identifier: 'someone@company.com',
syntax: 'path',
})
const fullScreenUrl = openWebContact({
identifier: 'someone@company.com',
full: true,
back: 'http://www.evernote.com',
})