Triage website contact form leads API
Rates a website inquiry the moment you pass it in: it classifies a contact form submission as urgent, high, normal or planned, adds a short summary and a next
- Id:
widget_385 - Price: Ƀ 30 a run, plus the Call Price, Ƀ 0.1 an API run. Your first 100 API runs carry no Call Price.
- Widget page: Run it in your browser
- Docs: Call Abyss from your code
Input
Send these Fields as input. A Field not listed here is refused.
service
Service the customer chose (a key or label from Services below)
- Type: string
- Required: yes
- Length in characters: 1 to 200
answers
The form's answers: one 'Question: answer' per line, or a JSON object (the first 6 are read)
- Type: string
- Required: no
- Length in characters: at most 5000
message
Customer message (the first 500 characters are read)
- Type: string
- Required: no
- Length in characters: at most 5000
contactPreference
Preferred contact
- Type: string
- Required: no
- Length in characters: at most 200
business
What your business does
- Type: string
- Required: no
- Length in characters: at most 300
services
Services: one 'key: Label' per line
- Type: string
- Required: no
- Length in characters: at most 3000
Run it
One call presses the Widget and answers the run once its status is succeeded or failed, however long it takes. The key is read from ABYSS_API_KEY. Install the library with npm install abysshub or pip install abysshub; cURL sends the Fields as a form.
JavaScript
// index.mjs
import Abyss from "abysshub";
const abyss = new Abyss();
const run = await abyss.run("widget_385", {
service: "repair",
answers: "Since when: last night\nProperty: house, 2 floors\nBoiler: gas, about 12 years old",
message: "Our heating stopped working last night and the boiler display shows an error code. It is 14 degrees inside and we have a 6-month-old baby. Can someone come today?",
contactPreference: "phone",
business: "a heating and plumbing company",
services: "repair: Repair\ninstall: New installation\nmaintenance: Maintenance\nquote: Quote request",
});
console.log(run.result);Python
from abysshub import Abyss
abyss = Abyss()
run = abyss.run("widget_385", {
"service": "repair",
"answers": "Since when: last night\nProperty: house, 2 floors\nBoiler: gas, about 12 years old",
"message": "Our heating stopped working last night and the boiler display shows an error code. It is 14 degrees inside and we have a 6-month-old baby. Can someone come today?",
"contactPreference": "phone",
"business": "a heating and plumbing company",
"services": "repair: Repair\ninstall: New installation\nmaintenance: Maintenance\nquote: Quote request",
})
print(run.result)cURL
curl https://api.abysshub.com/v1/widgets/widget_385/runs \
-H "Authorization: Bearer $ABYSS_API_KEY" \
-F service=repair \
-F 'answers=Since when: last night
Property: house, 2 floors
Boiler: gas, about 12 years old' \
-F 'message=Our heating stopped working last night and the boiler display shows an error code. It is 14 degrees inside and we have a 6-month-old baby. Can someone come today?' \
-F contactPreference=phone \
-F 'business=a heating and plumbing company' \
-F 'services=repair: Repair
install: New installation
maintenance: Maintenance
quote: Quote request'A succeeded run carries its result and its output_files. Their URLs are signed for each read: re-read the run, never store a URL. A run still queued or running in the answer (after an hour, or when the API is busy) is read again at its Location with ?wait=true.
What it answers
The Example Run's result, the JSON the Widget wrote to output/output.json:
{
"ai": true,
"priority": "urgent",
"priorityText": "Urgent - call back today",
"summary": [
"Heating stopped last night; boiler shows an error code",
"Indoor temperature is 14 degrees",
"Household includes a 6-month-old baby",
"Gas boiler, about 12 years old, two-floor house"
],
"nextStep": "Call the customer by phone today to confirm a same-day visit and ask for the boiler error code."
}More
Keys, files, errors and limits: API access.