{% extends "base.html" %} {% block title %}Integrations{% endblock %} {% block content %} {% comment %} External-service inventory (core.integration_registry). Credentials appear by NAME with a set / not-set flag only; values never reach this template. {% endcomment %}

Integrations

{{ summary.total }} service{{ summary.total|pluralize }} in the inventory. {% for status, count in summary.by_status.items %}{% if count %}{{ status }}: {{ count }}{% endif %}{% endfor %}

{{ key_rotation }}. Credential presence is checked on this server ({{ local_app }}) only.

{% for row in rows %} {% empty %} {% endfor %}
Service Status Owner Credentials Connection test
{{ row.service }}
{{ row.category }} · {{ row.apps|join:", " }}
{% for c in row.consumers %}
{{ c.app }}: {{ c.purpose }} {{ c.source }}
{% endfor %} {% if row.notes %}
{{ row.notes }}
{% endif %}
{{ row.status }} {{ row.owner }} {% if row.owner_basis %}
{{ row.owner_basis }}
{% endif %}
{% for c in row.credentials %}
{{ c.name }} ({{ c.app }}, {{ c.role }}) {% if c.present is None %}other app {% elif c.present %}set {% else %}not set{% endif %} {% if c.note %}{{ c.note }}{% endif %}
{% empty %}No credential {% endfor %}
{% for t in row.tests %}
{{ t.label }}
{% if t.registered %}
{% csrf_token %}
{% else %} not registered {% endif %}
{% if t.last %} {% if t.last.ok %}Passed{% else %}Failed {{ t.last.error_class }}{% endif %}
{{ t.last.what }}
{{ t.last.created_at|date:"Y-m-d H:i" }}{% if t.last.tested_by %} by {{ t.last.tested_by.get_username }}{% endif %}{% if t.last.http_status %} · HTTP {{ t.last.http_status }}{% endif %}{% if t.last.latency_ms is not None %} · {{ t.last.latency_ms }} ms{% endif %}
{% else %} Not tested yet {% endif %}
{% empty %}None {% endfor %}
No services configured in ERP_INTEGRATIONS.

Connected accounts

{% comment %} This company's provider accounts (core.IntegrationAccount). Secrets are write-only: a credential shows its kind, subject and dates, never a value. {% endcomment %}

Provider accounts of {{ connected.company|default:"your company" }}. Credentials are stored encrypted and never shown again.

{% if not connected.company %}

Your user has no company, so there are no accounts to show.

{% else %} {% for row in connected.accounts %}

{{ row.account.provider }}

{% if row.account.enabled %}enabled{% else %}disabled{% endif %} {% if row.paused %}paused until {{ row.account.paused_until|date:"Y-m-d H:i" }}{% endif %} {% if not row.installed %}adapter not installed{% endif %} {% if row.account.last_error %}{{ row.account.last_error }}{% endif %}
{% if row.capabilities %}
Capabilities: {{ row.capabilities|join:", " }} · webhook URL {{ row.webhook_path }}
{% endif %}
{% for c in row.company_credentials %}
{{ c.kind }} set {{ c.updated_at|date:"Y-m-d H:i" }}{% if c.subject %} · {{ c.subject }}{% endif %}
{% empty %}No credentials yet. {% endfor %}
{% if row.oauth %}
{% for g in row.grants %}
{{ g.subject|default:"(no subject)" }} — {{ g.owner }}
{% empty %}No user has connected yet.{% endfor %} {% if row.my_grant %}
{% csrf_token %}
{% elif row.account.enabled %} Connect my account {% endif %}
{% endif %}
{% csrf_token %}
{% if connected.can_change %}
{% csrf_token %} {% if row.account.enabled %} {% else %}{% endif %}
{% if row.paused %}
{% csrf_token %}
{% endif %} {% endif %}
{% if row.last_check %} {% if row.last_check.ok %}Passed{% else %}Failed {{ row.last_check.error_class }}{% endif %} {{ row.last_check.what }} {{ row.last_check.created_at|date:"Y-m-d H:i" }} {% else %}Not tested yet{% endif %}
{% if connected.can_change %}
Settings and credentials
{% csrf_token %}
{% csrf_token %}
{% endif %}
{% empty %}

No connected accounts.

{% endfor %} {% if connected.can_change and connected.available %}
{% csrf_token %}
{% endif %} {% endif %}

Webhook subscriptions

Outbound: Fincas POSTs each subscribed event to the URL, signed with the subscription's secret (X-Golden-Signature) and numbered with X-Golden-Delivery-Id. A test delivery sends webhook.ping once.

{% if webhooks.company is None %}

Your account resolves to no company, so there are no subscriptions to show.

{% else %} {% for row in webhooks.subscriptions %}

{{ row.subscription.target_url }}

{{ row.subscription.description|default:"No description" }} · events: {{ row.subscription.subscribed_events|join:", "|default:"none" }}

{% if row.subscription.is_active %}Active{% else %}Disabled{% endif %} {% if row.last %}Last delivery: {{ row.last.event_type }} {% if row.last.success %}ok{% else %}failed{% endif %} ({{ row.last.response_status_code|default:"no answer" }}) {{ row.last.created_at|date:"M j, Y H:i" }}{% if row.last.delivery_id %} · id {{ row.last.delivery_id }}{% endif %}{% else %}No deliveries yet.{% endif %}

{% if webhooks.can_change %}
{% csrf_token %}
{% csrf_token %}
{% endif %}
{% empty %}

No webhook subscriptions.

{% endfor %} {% if webhooks.can_change %}
Add a webhook subscription
{% csrf_token %}
Events
{% for event in webhooks.events %}
{% endfor %}
{% endif %} {% endif %}
{% endblock %}