Guides
Let staff find a customer
Let staff in your app search your customers by name or email and put a record under one, without customers ever seeing each other.
Staff often need to start a job for a customer. lookupCustomers() searches your contacts by name or email, for the roles you allow in that app.
Allow it
It is off until you name the roles, per app:
Let staff in the Brightwater portal look up customers.
Claude uses awesomate_crm_apps (customer_lookup). You can also set it on the app's page, under Who can look up customers. The app's default role, the one customers sign in with, can never be allowed: customers would see each other.
Search, then link
const matches = await app.lookupCustomers({ q: 'jo', limit: 10 }); // two characters or more
// [{ id, name, email, phone }]
const jobId = await app.write('job', { title: 'Blocked gutters', status: 'open' }, {
links: { customer: matches[0].id },
});- Results are name, email and phone, at most 50. A field you marked sensitive comes back
null. - Look people up again by id with
{ ids: [...] }(up to 50), for example to show who a job is for. - For the roles you allow, a write may link to any of your contacts, still inside the role's write rule for the kind.
- Any other role gets a
forbiddenerror.