Configuring Leadstaker as a Source
In the Sources tab, click on the “Add source” button located on the top right of your screen. Then, select the Leadstaker option from the list of connectors. Click Next and you’ll be prompted to add your access.1. Add account access
You’ll need a Leadstaker API key. In the Leadstaker dashboard, open the project settings and click generate token. Copy the key right away: Leadstaker shows it only once. The following configurations are available:- API Key: the Leadstaker project API key. A key reads exactly one project; if you have more than one project, create one source per project.
- Start Date: (Optional) On the first sync, and on any full sync, contacts, deals, chats, messages, calls, leads, tasks and notes are read from records updated on or after this date. Leave it empty to bring all history.
- Full walk interval (hours): (Advanced, default: 24) The Messages, Calls and Touchpoints streams are read chat by chat or contact by contact. Between full walks, a sync only visits the chats and contacts updated since the previous sync, which keeps it fast; every this many hours it visits all of them. A new message or call that does not update its chat or contact can take up to this long to appear. Set it to 0 to visit all of them on every sync (no delay, but much slower on large projects).
2. Select streams
Choose which data streams you want to sync. For faster extractions, select only the streams that are relevant to your analysis. You can select entire groups of streams or pick specific ones.Tip: The stream can be found more easily by typing its name.Select the streams and click Next.
3. Configure data streams
Customize how you want your data to appear in your catalog. Select the desired layer where the data will be placed, a folder to organize it inside the layer, a name for each table (which will effectively contain the fetched data) and the type of sync.- Layer: choose between the existing layers on your catalog. This is where you will find your new extracted tables as the extraction runs successfully.
- Folder: a folder can be created inside the selected layer to group all tables being created from this new data source.
- Table name: we suggest a name, but feel free to customize it. You have the option to add a prefix to all tables at once and make this process faster!
- Sync Type: you can choose between INCREMENTAL and FULL_TABLE.
- Incremental: every time the extraction happens, we’ll get only the new data, which is good if, for example, you want to keep every record ever fetched.
- Full table: every time the extraction happens, we’ll get the current state of the data, which is good if, for example, you don’t want to have deleted data in your catalog.
4. Configure data source
Describe your data source for easy identification within your organization, not exceeding 140 characters. To define your Trigger, consider how often you want data to be extracted from this source. This decision usually depends on how frequently you need the new table data updated (every day, once a week, or only at specific times). Optionally, you can define some additional settings:- Configure Delta Log Retention and determine for how long we should store old states of this table as it gets updated. Read more about this resource here.
- Determine when to execute an Additional Full Sync. This will complement the incremental data extractions, ensuring that your data is completely synchronized with your source every once in a while. Leadstaker does not report deleted records, so a periodic full sync is the way to remove them from incremental tables.
5. Check your new source
You can view your new source on the Sources page. If needed, manually trigger the source extraction by clicking on the arrow button. Once executed, your data will appear in your Catalog.Streams and Fields
Available streams
The table below lists every stream, its slug (the exact identifier to pass when creating the source via API) and a short description.The Messages, Calls and Touchpoints streams are read chat by chat or contact by contact, because Leadstaker has no single list of them. Most syncs only visit the chats and contacts that changed since the previous sync; every Full walk interval hours a sync visits all of them, which takes longer on projects with many chats or contacts.
Fields by stream
Contacts and deals do not have fixed columns for name, phone, e-mail or price: in Leadstaker those are fields configured per project. Their values come in thefields column as a JSON list of {fieldId, value}; join fieldId with the id of the Fields table to get each field’s label and type.
Contacts
Contacts
id- Unique identifier of the contactproject_id- Leadstaker project the contact belongs toresponsible_id- User responsible for the contactavatar- URL of the contact’s picturefields- Field values of the contact (JSON list of{fieldId, value})created_at- When the contact was createdupdated_at- When the contact was last updated (replication key)
Deals
Deals
id- Unique identifier of the dealproject_id- Leadstaker projectcontact_id- Contact the deal belongs topipeline_id- Pipeline the deal is instage_id- Current stage of the dealstage_entered_at- When the deal entered its current stageresponsible_id- User responsible for the dealagent_id- AI agent assigned to the dealtag_ids- Tags attached to the deal (list)loss_reason_id- Reason the deal was lostclosed_at- When the deal was closed (won or lost)last_lead_message_at- When the lead last sent a messageis_test- Whether this is a test dealfields- Field values of the deal, including the price (JSON list of{fieldId, value})created_at- When the deal was createdupdated_at- When the deal was last updated (replication key)
Chats
Chats
id- Unique identifier of the chatproject_id- Leadstaker projectchannel_id- Connected channel of the chatchannel_name- Name the channel gave the lead (such as the WhatsApp profile name)external_id- Identifier of the conversation on the channelcontact_id- Contact of the chat, when it has onepipeline_id- Pipeline the chat is linked tostatus- INBOX, OPEN or CLOSEDunread_messages_count- Number of unread messagesis_test- Whether this is a test chatidentifier_phone,identifier_email,identifier_whatsapp_lid,identifier_test_id,identifier_custom- How the lead is identified on the channelprofile_name,profile_avatar- Name and picture shown for the chatagent_id,agent_status- AI agent of the chat and whether it is ACTIVE or DISABLEDarchived_at- When the chat was archivedcreated_at- When the chat was createdupdated_at- When the chat was last updated (replication key)
Messages
Messages
id- Unique identifier of the messagechat_id- Chat the message belongs toproject_id- Leadstaker projecttype- Message type (TEXT, IMAGE, VIDEO, AUDIO, DOCUMENT…)text- Text of the message, or the caption of a media messagecontent- Full message content (JSON)sender_type,sender_id,sender_name- Who sent the messagesender- Full sender (JSON)timestamp- When the message was sent or receivedstatus- PENDING, SENT, RECEIVED, READ, PLAYED or FAILEDread_by- Who read the message and when (JSON)error,error_code,error_category- Why a FAILED message failededited_id,replied_id,forwarded_id- Message this one edits, replies to or forwardsdeleted_at- When the message was deletedarchived_at- When the message was archivedcreated_at- When the message was createdupdated_at- When the message was last updated (replication key)
Calls
Calls
id- Unique identifier of the callcontact_id- Contact the call was listed under (the calls of a contact include those of its deals)project_id- Leadstaker projectentity_type,entity_id- The deal the call is attached to, or the contact when it has no dealprovider- Telephony provider, or API for calls posted through the APIexternal_id- Call identifier on the telephony providerdirection- OUTBOUND or INBOUNDcall_from_type,call_from_number,call_from_user_id- Caller side (extension or phone)call_to_type,call_to_number,call_to_user_id- Called side (extension or phone)started_at,answered_at,ended_at- When the call started, was answered and endedduration_in_seconds- Talk time in secondsoutcome- ANSWERED, NO_ANSWER, BUSY, VOICEMAIL or FAILEDrecording_status,recording_mime_type- Recording status and media typetranscription_status- AVAILABLE, TOO_LONG, PENDING, DONE or FAILEDtranscription_text- Whole transcript, when the call was not split by speakertranscription- Full transcript, including the turns by speaker (JSON)analysis_status,analysis_summary- AI summary of the callcreated_at- When the call was storedupdated_at- When the call was last updated, for example by its transcription (replication key)
Touchpoints
Touchpoints
id- Unique identifier of the touchpointcontact_id,deal_id,chat_id,message_id- Records it belongs tooccurred_at- When the lead reached the businessentry- How the lead came in: FORM, MESSAGE, CALL, MANUAL, IMPORT or UNKNOWNtraffic- Kind of traffic (PAID_SEARCH, PAID_SOCIAL, ORGANIC_SEARCH, REFERRAL, DIRECT…)source- Normalized source (google, instagram, whatsapp, direct…)platform- Ad platform on paid traffic (META, GOOGLE, TIKTOK…)campaign_id,campaign_name,adset_id,adset_name,ad_id,ad_name- Ad that brought the leadvia_type,via_id,via_name,via_provider,via_phone_number- Where in Leadstaker it came inutm_source,utm_medium,utm_campaign,utm_term,utm_content,utm_id- UTMs from the URLclick_ids- Ad click ids such as gclid, fbclid, ctwaclid (JSON)url- Page the lead came fromrecord_type,record_id- Record the touchpoint was read fromeditable_origin,manual_origin- Whether a person may pick the origin, and the origin pickedis_first_touch,is_last_touch- Whether it is the deal’s first or latest touch
Leads
Leads
id- Unique identifier of the leadproject_id- Leadstaker projectsource_id- Chatbot that captured the leadsession_id- Chatbot session of the visitoris_complete- Whether the visitor finished the chatbot flowanswers- Answers given in the chatbot (JSON)origin_url- URL of the page the visitor came fromurl_params- Query parameters of that URL, such as UTMs and click ids (JSON)created_at- When the lead was createdupdated_at- When the lead was last updated (replication key)
Tasks
Tasks
id- Unique identifier of the taskproject_id- Leadstaker projectdeal_id- Deal the task belongs totitle- Title of the taskdue_at- When the task is dueresponsible_id- User the task is assigned toresult- Result written when the task was completedcompleted_at,completed_by- When and by whom the task was completedcreated_by- User who created the taskcreated_by_automation- Automation run that created the task (JSON)created_at- When the task was createdupdated_at- When the task was last updated (replication key)
Notes
Notes
id- Unique identifier of the noteproject_id- Leadstaker projectentity_type,entity_id- Contact or deal the note is attached tocontent- Text of the noteauthor_type,author_id,author_name- Who wrote the note (USER, AGENT or SYSTEM)author- Full author (JSON)edited_at,edited_by- When and by whom the note was last editedarchived_at- When the note was archivedcreated_at- When the note was createdupdated_at- When the note was last updated (replication key)
Pipelines and Pipeline Stages
Pipelines and Pipeline Stages
Pipelines:
id,project_id,name- Pipeline identifier, project and namesort- Order of the deals on the boardappearance_config- Board card appearance settings (JSON)stages- Stages as returned with the pipeline (JSON)archived_at,created_at,updated_at
id,pipeline_id,name- Stage identifier, pipeline and nameposition- Position of the stage in the pipelinetype- OPEN for working stages, CLOSED for the won/lost stagescolor- Display colorarchived_at,created_at,updated_at
Fields and Field Groups
Fields and Field Groups
Fields:
id- Field identifier (thefieldIdin thefieldscolumn of contacts and deals)label- Label of the fieldtype- TEXT, NUMBER, DATE, DATETIME, BOOLEAN, OPTIONS, MULTISELECT, PHONE, EMAIL, CPF, CNPJ, CPF_CNPJ, CEP, CURRENCY, TIME or LINKentity_type- Whether the field belongs to deals or contactsfield_group_id- Group of the fieldposition,level,code- Position, visibility (USER or API) and built-in code (NAME, PHONE, EMAIL, PRICE…)config- Type-specific settings, such as the options of an OPTIONS field (JSON)project_id,archived_at,created_at,updated_at
id,project_id,name- Identifier, project and nameentity_type- Whether the group holds deal or contact fieldsposition,code- Position and built-in codearchived_at,created_at,updated_at
Limitations
- Deleted records: Leadstaker does not report deletions, so a record deleted in Leadstaker (including touchpoints) stays in incremental tables until the next full sync.
- Touchpoints: Leadstaker returns at most the latest 100 touchpoints of each contact. When a contact has more, the sync warns you and the older ones are not in the table.
- Delay for quiet chats and contacts: a new message or call that does not update its chat or contact in Leadstaker appears at the next full walk, at most Full walk interval hours later.
- One project per source: each API key reads a single Leadstaker project.