Saltar al contenido principal
Datil is an electronic invoicing platform specialized in Ecuador’s tax cycle and in issuing valid documents for the SRI. Unlike general accounting platforms, Datil focuses on invoices, credit notes, withholdings, shipping guides, and purchase settlements. In Brain Studio, this integration lets your flows issue and query electronic documents, validate tax IDs, and diagnose SRI rejections directly from conversation.

What Datil enables

When you connect Datil, you can:
  • Issue all six SRI document types - invoices, credit notes, debit notes, withholdings, shipping guides, and purchase settlements - from the same conversational flow
  • Verify each document status to know whether it was authorized, is pending, or was rejected, without opening the Datil panel
  • Validate RUC or national ID before invoicing to reduce rejections due to incorrect data
  • Diagnose SRI errors by translating technical codes into concrete actions for your team
  • Query tax catalogs (VAT types, payment methods, withholdings) to build consistent documents

Installation

Prerequisites

  1. An active Datil account.
  2. A valid account API key.
  3. The electronic signature password Datil will use to issue documents.
  4. Issuer data for this integration:
    • RUC
    • Legal Name
    • Establishment
    • Emission Point

How to get credentials

To connect Datil in Brain Studio, you need these six values:
  • API Key
  • Signature password
  • RUC
  • Legal Name
  • Establishment
  • Emission Point
1

Get your API Key in Datil

Sign in to app.datil.co, go to Settings, and find the API Key section. There, copy the key you will use to connect the integration.
Datil settings with API Key section expanded, key visible, and Regenerate API Key button
2

Keep your signature password handy

You will need the electronic signature password Datil uses to issue documents. This is sensitive data, so validate it before starting installation.
3

Confirm issuer data

Gather the tax information you currently use in Datil:
  • RUC
  • Legal Name
  • Establishment
  • Emission Point
RUC and Legal Name identify the issuer. Establishment and Emission Point correspond to the authorized point from which documents are issued.
Establishment and Emission Point are usually 3-digit codes, for example 001.
Do not share your API Key or Signature password in open channels, public documentation, or repositories.

How to connect it

The most direct way is to use Jelou Agent: describe what you need and the agent connects Datil automatically inside the flow. If you prefer manual installation, open the Marketplace and follow these steps with the values from the previous section.
1

Open the Marketplace

In Brain Studio, open Marketplace from the side menu.
2

Find Datil

Find the integration and click Connect.
3

Complete the form

Enter the six values requested:
  • API Key
  • Signature password
  • RUC
  • Legal Name
  • Establishment
  • Emission Point
4

Confirm installation

The integration appears as connected.
You can use it in Canvas or add it as a tool in AI Agent.

Available tools

The integration exposes 16 tools in Brain Studio. Names match the node editor. Each tool panel contains parameter details; here they are grouped by business function in the SRI + Datil context.
Covers issuance and follow-up of electronic invoices and collateral operational documents (shipping guide), plus last sequence lookup when the API allows it.Included tools
  • Issue invoice
  • List Invoices
  • Get invoice status
  • Get last sequence
  • Issue Shipping Guide
When to use this category
  • When you need to invoice with tax calculation and numbering aligned with Datil/SRI
  • When you need to list issued invoices, verify SRI authorization/rejection, or locate identifiers for next steps
  • When the business requires a shipping guide for merchandise transport in Ecuador
Ideal for: Sales, conversational collections, and logistics tied to outbound documents.
Get last sequence only applies to invoice and credit note. For shipping guide, the API does not provide a list to infer sequence: you must provide the sequence number when issuing, with your internal control (the same applies to other emissions without API listing, described in the next groups).
Modifies tax balance of an already issued invoice: credits or charges linked to that document, and query of credit notes you issued.Included tools
  • Issue Credit Note
  • Issue Debit Note
  • List Credit Notes
When to use this category
  • Credit note: returns, amount corrections, or post-invoice discounts (requires original invoice and reason)
  • Debit note: late interest, extra charges, or other increases over original invoice
  • List Credit Notes: review issued notes, filter by customer or dates (date_range recommended when available in editor)
Ideal for: Post-sales, collections, and adjustments without reissuing invoice from scratch.
Issue Debit Note requires an explicit sequence: Datil API does not list issued debit notes; keep the sequence with your own control.
Concentrates withholdings you apply or receive, purchases from third parties, and purchase settlements for suppliers without their own invoice.Included tools
  • Incident withholding
  • Incident resolution
  • List received withholdings
  • List received invoices
  • List received credit notes
When to use this category
  • Incident withholding is the electronic withholding voucher: income tax or VAT withholding to suppliers, with tax type, percentage code, and base
  • Incident resolution is the purchase settlement: purchases from someone who cannot invoice you; you act as issuer and retain as needed
  • List received invoices and List received credit notes: traceability for purchases and supplier credits
  • List received withholdings: withholdings your customers applied to your sales (tax credit and follow-up)
Ideal for: Accounts payable, procurement, and two-way withholding compliance.
In Incident withholding and Incident resolution, you must provide sequence: the API does not list those issued documents to infer it automatically.
Reinforces data quality before and after issuance: tax identification, SRI catalogs, and rejection interpretation.Included tools
  • Diagnose rejection
  • Get Catalog
  • Validate Tax Identification
When to use this category
  • Validate Tax Identification: verify RUC, national ID, or other accepted types according to SRI rules before invoicing
  • Get Catalog: retrieve official codes (ID types, VAT, payment methods, document types, income/VAT withholdings); you can list available catalogs or one specific catalog according to editor parameters
  • Diagnose rejection: when SRI rejects a document, translates error code into actionable explanation
Ideal for: Reducing rejections, building guided capture screens, and speeding up tax support in the same flow.
Several tools return translated text only (without extra structure): use it exactly as shown in the node for user messages or debugging.

How to use in Brain

Once connected, you can use Datil in two surfaces:

In AI Agent

Ideal when a user wants to invoice with Issue invoice, follow a sale with Get invoice status or List Invoices, or validate data with Validate Tax Identification, all in natural language.
1

Open the AI Agent node

In Canvas, select or add the AI Agent node.
2

Open Tools

In the right panel, open the Tools tab.
3

Add Datil

Use Add tool, search for Datil, and enable it.
4

Configure tools

Choose full integration or enable only actions you need.
Datil appears in the agent tool list and you can open configuration from the settings icon.
The agent will automatically decide when to use Issue invoice, Get invoice status, List Invoices, or other tools according to conversation, including Validate Tax Identification when buyer data must be checked.

In Canvas

Ideal when you need full flow control (for example: Validate Tax Identification -> Issue invoice -> send document to customer).
1

Drag Datil onto Canvas

In the side panel, open Marketplace and drag Datil into the flow.
2

Select the tool

With the node selected, in Tools choose the action (for example Issue invoice).
3

Configure payload and memory

Complete request JSON and, if needed, Save response in a memory variable.
4

Connect the flow

Link Task completed and Error occurred outputs with following nodes.
The node is ready to run in the order defined by your flow.
Configuration example: The node editor shows a JSON body aligned with Issue invoice. Fields buyer_id, buyer_id_type, buyer_name, and items are required.
{
  "buyer_id": "{{$memory.ruc_cliente}}",
  "buyer_id_type": "{{$memory.tipo_id}}",
  "buyer_name": "{{$memory.razon_social}}",
  "buyer_email": "{{$memory.email_cliente}}",
  "items": [
    {
      "description": "{{$memory.descripcion_servicio}}",
      "quantity": "{{$memory.cantidad}}",
      "unit_price": "{{$memory.precio_unitario}}",
      "tax_code": "4"
    }
  ],
  "payment_method": "20"
}

Use cases

You close the sale in conversation and the flow leaves tax evidence in Datil without depending on someone opening a separate invoicing system.Typical flow:
  • Customer confirms operation and provides RUC or ID, legal name, and sale lines
  • You validate ID with Validate Tax Identification and, if needed, align codes with Get Catalog (VAT, payment method, document type)
  • You issue with Issue invoice and confirm result with Get invoice status or List Invoices, depending on your follow-up design
Impact:
  • Electronic invoice in the same thread where the sale happened
  • Fewer capture errors and less back-and-forth for missing data
Ideal for: B2B and B2C sales in Ecuador via WhatsApp or other channels, with conversational closing.
When an invoice is already issued but amount corrections or returns are needed, you use notes linked to original document instead of rebuilding everything from zero.Typical flow:
  • Locate invoice (full number or prior context) and review status with Get invoice status
  • To credit or reduce amount: Issue Credit Note with original invoice and reason
  • For later charges (interest, upward adjustments): Issue Debit Note; for audit of issued notes: List Credit Notes
Impact:
  • Returns and adjustments with SRI traceability
  • Post-sales and collection operations aligned with same sale flow
Ideal for: commerce with returns, delayed discounts, or interest charges on already authorized invoices.
Datil also works for querying real operation without opening panel: issued invoices, received documents, withholdings, authorization statuses, or SRI rejections, all from conversational channels like WhatsApp.Typical flow:
  • Owner, accountant, or finance asks about invoice, withholding, or tax status
  • Flow uses tools like List Invoices, Get invoice status, List received invoices, List received withholdings, or List received credit notes
  • If a problem appears, complement with Diagnose rejection to translate SRI error into concrete action
Impact:
  • Less dependency on panel for daily queries
  • Faster responses to customers and internal teams
  • Better visibility for business owners, accountants, and admin teams
Ideal for: accounting firms, admin teams, and business owners who want to review tax operation from WhatsApp or other conversational channels.
Reduce rejections before issuing and, when SRI returns errors, translate technical messages into clear steps for team or customer.Typical flow:
  • Before invoicing: Validate Tax Identification and Get Catalog to avoid invalid codes/data
  • After failed attempt or uncertain status: Diagnose rejection from SRI error code
  • To verify authorization: Get invoice status
Impact:
  • Fewer rejected documents and shorter support times
  • Operators resolve issues without opening SRI manuals in parallel
Ideal for: invoicing, support, or implementation teams handling live incidents.

Integrations that pair well with Datil

CRM centralizes commercial context; Datil executes tax step. When a deal closes in HubSpot, flow can take RUC and legal name from contact, validate tax identification, and issue invoice in Datil without data duplication.Combined flow: deal closed -> validate RUC with Datil -> issue invoice -> register tax reference in HubSpot.HubSpot documentation
After issuing invoice or completing a tax adjustment, flow can email PDF or formal notification to customer, closing tax + communication cycle in same process.Combined flow: issue invoice in Datil -> email customer with authorization number and amount.Gmail documentation
Every authorization, SRI rejection, or withholding milestone can trigger an alert for finance/operations, without someone watching Datil panel all day.Combined flow: invoice issued -> notify #accounting with authorization status and document data.Slack documentation
For reconciliation, reporting, or sharing with external accountants, flow can push document numbers, amounts, and statuses to control sheets without granting access to Datil or Brain.Combined flow: list monthly invoices in Datil -> update tax control sheet in Sheets.Google Sheets documentation

Integrations

Catalog of integrations available in the Marketplace.

How to use integrations in Brain

General flow to install and use integrations in Brain Studio.