Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.spn.wtf/llms.txt

Use this file to discover all available pages before exploring further.

Purpose

Talking Shops is the CRM destination. Once a call is successfully qualified, the pusher creates a follow-up task so a human sales team member can continue the lead.

When Records Are Pushed

talkingshops_pusher.py reads:
SELECT * FROM calls WHERE status = 'called' ORDER BY created_at ASC;
After a successful push, the call status becomes:
pushed

Scheduler Integration

scheduler.py runs the pusher loop every:
PUSH_INTERVAL_SECONDS=120
You can also run a one-off push:
python talkingshops_pusher.py

Authentication

Default auth header:
TALKINGSHOPS_AUTH_HEADER=x-tenant-api-key
TALKINGSHOPS_API_KEY=your_talkingshops_api_key
If the API expects a prefix:
TALKINGSHOPS_AUTH_PREFIX=Bearer

Customer Linking

Before creating a task, the pusher tries to find a customer by mobile number. Derived default customers endpoint:
{TALKINGSHOPS_API_URL with /tasks replaced by /customers}
Override:
TALKINGSHOPS_CUSTOMERS_API_URL=https://api.talkingshops.com/v1/customers
If the customer does not exist, the pusher tries to create one. If linking fails, the task gets an unlinked-customer tag.

Task Payload

The task includes:
  • title: Follow up with {lead_name}
  • titleType: followup
  • description: summary of lead, phone, source, product, budget, location, call ID, and lead ID
  • priority: derived from budget
  • dueDate: next day
  • tags: ai-caller, source platform, qualified-lead
  • metadata: call ID, lead ID, phone, product interest, budget, location, source, full qualification JSON
  • Optional owner fields
  • Optional related customer fields

Priority Mapping

Budget amountPriority
>= 1 croreurgent
>= 25 lakhshigh
Less or unknownnormal
Budget parsing understands common Indian terms such as lakh, lac, lk, crore, and cr.

Owner Assignment

Static owner:
TALKINGSHOPS_OWNER_ID=owner_1
TALKINGSHOPS_OWNER_NAME=Agent One
Round-robin owners:
TALKINGSHOPS_OWNERS=owner_1:Agent One,owner_2:Agent Two,owner_3:Agent Three
Round-robin selection uses the call ID.

Dry Run

TALKINGSHOPS_DRY_RUN=true
Dry run logs the redacted headers and payload and marks the operation successful without sending the HTTP request.

Push Failure Behavior

TALKINGSHOPS_MARK_FAILED_ON_PUSH_ERROR=true
When true, failed pushes mark the call failed. When false, the call remains called so it can be retried by the next pusher cycle.