Repositories and contributors

Repository

sugarrush-es-indexer

Lets SalesCandy find configured lead sources, such as website forms, by project, name, status, or type.

Browse the repository archive

What it does

A lead source is a configured way enquiries enter SalesCandy, such as a website form connected through CandyPixel. When a manager looks up which sources feed a project, this service supplies the searchable list through the customer API. Each entry describes the source and its project associations. The enquiries themselves go through the lead processing system.

  1. SugarRush announces changes. When a lead source is created, edited, or deleted, SugarRush sends an SNS notification. The indexer uses those events to keep a searchable copy in Elasticsearch. README.md at 15bf7f8

  2. The customer API looks up sources. Its AppSync data source calls the indexer’s query function. Searches support filters such as name, status, project, and source type. dataSources/leadSources.yml in Dodol/customer-api-appsync at d1778a0

  3. The query checks current project data. If a deleted project is still attached to a source in the index, a search for that project could return a stale match. The January 2022 change checks CandyBase, excludes the stale match from project-filtered results, and attempts to refresh the stored entry when it detects changed project associations. app/query.js at 01d1b64

How the stores worked together

CandyBase held the operational lead-source records. The archived CandyBase configuration defines a DynamoDB LeadSource table, and the SugarRush library prepares new source records for a DynamoDB table. dynamoDBLeadSource/serverless.yml in Dodol/CandyBase at 522b9f9 SugarRushFactory/DataProcessor/LeadSourceCreate.js in SugarRush/library at 8603148

ELK was the main source for lead search and analysis. We indexed lead-source information alongside lead records so the team could explore both in Kibana. The archived ingestion code shows the separate Elasticsearch copy being written. app/ingest.js at ea447e3

Archive location. SugarRush/sugarrush-es-indexer.

Development history

  1. 2019

    Set up a searchable index of lead sources

    1. Add ingestion and GraphQL queries

      Lim Shi Yek added the initial ingestion and query code, GraphQL schema, and request and response mappings.

      3f6d571 d02e1e6
  2. 2022

    Keep indexed project information current

    1. Refresh lead-source entries when project data changes

      Reza Rosli added a workflow that compares associated project data with the indexed entry and refreshes the entry when it detects a mismatch.

      01d1b64

Contributors

  • Lim Shi Yek

    Primary contributor · 36 authored commits

    Built the initial ingestion and query scaffold and separated lead-source indexing queues by deployment stage.

  • Reza Rosli

    34 authored commits

    Made the query check CandyBase for current project data and refresh stale lead-source index entries.

  • Ele Elyiana

    23 authored commits

    Adjusted the search query so source type and import status filters match exact values.

  • Muhammad Anwaar

    8 authored commits

    Added a query filter that uses the project IDs supplied with the manager’s permissions.

When contributors were active

Authored commits per quarter through Q1 2023, oldest first. Rows are ordered by the first quarter with activity. Brighter cells show more commits. Scroll across to see later quarters.

Contributor2019 Q22019 Q32019 Q42020 Q12020 Q22020 Q32020 Q42021 Q12021 Q22021 Q32021 Q42022 Q1
Lim Shi Yek 36 commits · 2019 Q2–2020 Q1 12 17 6 1 0 0 0 0 0 0 0 0
Reza Rosli 34 commits · 2019 Q2–2022 Q1 3 0 1 1 0 2 10 0 0 0 2 15
Ele Elyiana 23 commits · 2020 Q1–2021 Q3 0 0 0 4 4 0 1 10 0 4 0 0
Muhammad Anwaar 8 commits · 2020 Q1 0 0 0 8 0 0 0 0 0 0 0 0