CrmService
Stentor API Reference / stentor-models/src / CrmService
Interface: CrmService
Defined in: packages/stentor-models/src/Services/CrmService.ts:154
Methodsβ
send()β
send(
externalLead,extras?):Promise\<CrmResponse>
Defined in: packages/stentor-models/src/Services/CrmService.ts:165
Send information about a lead to the CRM.
This can be used to either create a lead or append data to an existing lead.
The existing lead can be determined by the refId on the ExternalLead information or by attempting to match data such as email or phone number.
Parametersβ
externalLeadβ
Lead information
extras?β
Record\<string, unknown>
Optional additional metadata to pass to the CRM
Returnsβ
Promise\<CrmResponse>
update()?β
optionalupdate(externalLead,extras?):Promise\<CrmResponse>
Defined in: packages/stentor-models/src/Services/CrmService.ts:179
Updates a lead if the user provides more information after the lead has been sent.
It leverages the refId on the externalLead, which is originally provided in the CrmResponse to properly
Parametersβ
externalLeadβ
extras?β
Record\<string, unknown>
Returnsβ
Promise\<CrmResponse>
Deprecatedβ
Use send with a refId on the externalLead and call send() again. This will update.
getAvailability()β
getAvailability(
range,options?):Promise\<CrmServiceAvailability>
Defined in: packages/stentor-models/src/Services/CrmService.ts:189
Returns availability for scheduling an appointment with the business.
Parametersβ
rangeβ
options?β
Returnsβ
Promise\<CrmServiceAvailability>
getJobType()β
getJobType(
message,externalLead?):Promise\<CrmServiceJobType>
Defined in: packages/stentor-models/src/Services/CrmService.ts:198
Returns the job type (id) for the free text job description (AI call usually)
Parametersβ
messageβ
string
externalLead?β
Returnsβ
Promise\<CrmServiceJobType>