Workflow
How a lead moved through SalesCandy and into a CRM
A reconstruction of capture, repeat enquiries, assignment, follow-up, conversion, and CRM synchronization in SalesCandy v3.
SalesCandy v3 kept the source submission, the current lead in a project, and the history of what happened to that lead separately. A second submission could add to the history of an existing lead. The same contact could have a separate lead in another project. Graph API reads exposed these views separately, while CandySync sent changes to customer systems. Graph API reference
How leads entered
| Kind of enquiry | How it became a SalesCandy lead | What carried forward |
|---|---|---|
| Website or landing page | CandyPixel copied a web form submission into SalesCandy. | Web origin, source and project, mapped contact and custom fields, and campaign trackers when captured. An integration could read the original source data separately from the current lead. Website enquiry in the SalesCandy demo |
| Facebook Lead Ad | SalesCandy retrieved the submission from the connected Facebook page and form. The configured lead source mapped fields to a designated project. | Page and form identifiers, mapped answers, and any captured campaign data. From ingestion, it could follow the same routing path as a website lead. Facebook setup guide |
| Phone or email enquiry | CandyNumber turned an inbound call into a lead using the caller’s number. CandyMailbox processed inbound email leads. | The relevant phone or email origin metadata. A later call, SMS, or chat could appear as activity on the existing lead. |
| External form, portal, or CRM submission | A connected system could submit a new enquiry through a lead-source integration, such as the Lead Source API. | The configured source and project followed the submission into SalesCandy. The archived Graph API served reads and updates to existing leads. |
| Offline event, roadshow, or salesperson entry | A user could enter a lead in the app or Manager Portal, or a manager could upload a mapped CSV. | The lead could keep an offline origin such as the event name. An import could be scheduled for team routing or specify a salesperson for direct assignment. Lead Import guide |
Origin identified where the enquiry came from. Lead source identified the SalesCandy channel or configuration that received it. For example, an event might be the origin, while CSV import was the source. Submission time and ingestion time could differ. When the original submission time was unavailable, the lead record used ingestion time as its fallback. CandySync could also record actions taken offline in the app and synced later, so an activity’s event time could precede the time its log was written.
From SugarRush to CandyMuncher
Ele Elyiana owned SugarRush and focused on getting leads into SalesCandy. Reza guided the design and relied on Ele’s understanding of the integrations to put it into practice. The wider collaboration included Muhammad Shoaib and others across the system.
SugarRush covered the integrations at the edge of SalesCandy. The November 2020 technical deep dive follows one of them, CandyPixel, from a website submission to a confirmed ingestion. Reza Rosli framed the problem as absorbing unpredictable bursts from campaigns while a finite sales team handled enquiries.
- CandyPixel accepted the submission. API Gateway passed the website request to a receiver Lambda. The receiver wrote the submission to S3 and returned a response. That acknowledgement meant CandyPixel had captured the submission. Lead creation happened later. S3 let the receiver keep taking enquiries while downstream processing caught up.
- SugarRush processed the submission and handed it off. A separate Lambda read the stored submission, checked and cleaned it, and forwarded valid data to CandyMuncher through SQS. The queue let the receiving service process work at its own concurrency. The deck also describes ingestion error feedback to CandyPixel and dead-letter queues for investigating failed messages.
- CandyMuncher handled the project lead. CandyMuncher applied further checks using tenant data and stored lead records and logs in DynamoDB. This is where the distinction between a new lead and a repeat enquiry mattered. The archived implementation looks for a matching contact in the project and can record a resubmission against an existing lead.
- Downstream services acted on the result. CandyMuncher processed DynamoDB changes and distributed events through CandyStream, an SNS topic. CandySync used that event flow to notify external systems. Search and alerts could also react downstream. Eligible leads went to Carousel for routing, where salesperson availability determined who could receive the offer.
The team tested this path with OompaLoompas, a tool that sent batches of generated leads through CandyPixel. A CandySync callback closed each test record and confirmed ingestion beyond the initial HTTP acknowledgement. Reza reported 10,815 leads created per minute with no losses in the test series, with batches ramping from 1,000 to 20,000. The result measured capture and ingestion through webhook confirmation. Salesperson assignment and follow-up were outside the test.
How the workflow branched
- New lead routed to a team. Ingestion created the project lead and a creation log. An eligible lead could enter routing and be offered to an available salesperson. Unattended offers could move on, and routing could stop with the lead still unassigned. Routing logs showed attempts and reasons, while the lead record held the current routing and assignment state. In the archived implementation, accepting through routing set the lead to Follow-up and marked that salesperson’s first action as pending. A
rerouteactivity log meant an existing assignment had been cleared to send the lead back to routing. SalesCandy’s description of unattended offers · Graph API routing logs and lead details - Lead already assigned to someone. A named salesperson could receive the lead at creation, recorded as
preAssign. The creation handler moved a preassigned lead in New to Follow-up. A later manager assignment, claim, or transfer changed ownership on the same lead and could produce its own movement log. Status and assignment were separate fields. - Repeat enquiry in the same project. The documented import matched a phone number within the project. With Ignore Duplicates enabled, the row was skipped. Otherwise, the existing lead gained a resubmission. A Dropped lead could be recycled to Follow-up and reassigned or routed as applicable. A lead already in Follow-up or Won could gain a resubmission log on the same record. In the general repeat handler, a Won lead retained its assignment. Lead Import guide
- Same contact in another project. The creation lookup was scoped to the project. A matching contact in a different project could have a separate lead ID, owner, status, and outcome. The Graph API’s
getLeadSiblingsquery exposed related leads across projects. A CRM could link the opportunities to one person while keeping their histories distinct. Graph API reference - Follow-up, drop, or win. Calls, messages, meetings, notes, and follow-up changes built the activity history. Some actions also changed the current lead status or next follow-up date. A win added a second kind of form data, the Win Data Form, alongside the original Lead Data Form. The worked Graph API example fetched the action and win templates, submitted a valid action and win data against an existing lead ID, then fetched the lead again to confirm Won. The archived schema also exposes a separate operation to revise win data on an already-won lead. Graph API reference
What crossed the CRM boundary
| Direction | What the integration could see or do |
|---|---|
| SalesCandy → CRM via CandySync | Receive current Lead snapshots and LeadLog events for activity and movement. A snapshot could show the latest owner and status, while its logs explained the intermediate steps. A lead deletion had its own event, distinct from setting a lead to Dropped. The 2020 CRM Webhook guide described a log feed. The later CandySync schema documented both entities. |
| CRM → SalesCandy via Graph API | Apply status changes and record a win on a known SalesCandy lead. The archived schema also includes a separate win-data update. A new enquiry from an external system could enter through a capture channel such as the Lead Source API. |
| SalesCandy → CRM or BI via Graph API reads | Page through lead records and logs, then query current detail, original submission, routing history, related project leads, action counts, SMS data, or win data by the relevant IDs. This gave the integration a way to check current state and available history after a webhook delivery gap. |
CandySync’s 2021 guide allowed duplicate and out-of-order deliveries. It documented retries for up to an hour and no webhook replay at the time. An integration could match a snapshot by tenant and lead ID, match each history item by log ID within that context, and use the snapshot’s modification time to keep the latest copy. The archived sender filtered out MODIFY events for LeadLog, even though the newer envelope defines MODIFY as an event type. A Graph API read could check the available history for later changes.
Lead and win form answers carried a template version. The July 2021 guide identified the fields by ID, so a CRM mapping could follow a field through a label change. The win sample used the template to assemble the data SalesCandy expected for the status change.
Evidence and limits
- Public references. SalesCandy Graph API Postman reference and SalesCandy Graph API support guide.
- Capture design and load test. Reza Rosli, How SalesCandy Captures Leads With AWS Serverless Technologies (November 2020), slides 2–4 and 6–18. The deck describes the design and reports the test result. The archived
SugarRush/CandyPixelat3b4b494shows the S3 write inapp/controller/api/catcher.jsand the SQS-triggered processor inconfig/function_prod.yml.Dodol/CandyMuncherat515bebedefines the ingestion queue consumer and DynamoDB stream handler inserverless.yml. - Archived integration guides. SalesCandy CRM Webhook Integration Guide v0.4 (29 January 2020), pp. 5–8 and 38–39. SalesCandy CandySync Webhook Integration Guide v1.0 (10 May 2021) and v1.1 (1 July 2021), pp. 5–7, 12–25, and 27–28. Version 1.1 revised the form field names.
- Archived code.
Dodol/CandyMuncherat789f7b2for contact matching, creation, assignment, resubmission, and action handling.Dodol/crm-apiatb27adb7for the GraphQL schema.Dodol/candysync-webhookatceaf72ffor subscriber filtering and outgoing events.SalesCandy Public/salescandy-graph-apiatdf3295cfor the win sample. - Capture repositories. the anonymized CandyPixel customer integration at
cf763c1,SugarRush/CandyMailboxat8a68eac,SugarRush/CandyNumberat1ae4995,SugarRush/manualatcb0b835, andSugarRush/classicapiat905d5cb.
This is a reconstruction across documented versions and repository snapshots. Current service operation, tenant settings, and individual CRM field mappings remain unverified.