For AI agents: the complete documentation index is available at https://docs.clickmax.io/en/llms.txt, the full documentation bundle is available at https://docs.clickmax.io/en/llms-full.txt, and this page is available as Markdown at https://docs.clickmax.io/en/features/integrations/generic-webhook.md.
  • English
  • How do I tag contacts from events in my own system?

    Create a Webhook genérico (generic webhook) integration, set up tag rules and have your system send a POST with any JSON to the integration URL. Clickmax identifies the contact, applies the tags of every rule that matches and, with that, runs the automations with the Tag Applied to Contact trigger.

    Example: your app reports that a student has not logged in for 21 days → the rule applies the disengaged-3-weeks tag → a WhatsApp or email automation tries to bring them back.

    Before you start

    • Role: anyone who can manage integrations in the workspace. See roles and permissions.
    • Heads-up: anyone with the URL can send data to your contact base. Share it only with the system that will call it.

    Step 1 — Create the integration

    1. Open Integrations and look for Webhook genérico.
    2. Name the integration (e.g. Engagement journey) and create it.
    3. Clickmax opens the integration on the Rules tab. The receiving URL is at the top of the page, ready to copy.

    Step 2 — Set up the tag rules

    On the Rules tab, each rule says: if the JSON field meets the Condition with the Value, apply the tag.

    1. Click Add rule.
    2. In JSON field, write the path of the field in the JSON your system sends. Use a dot for fields inside objects (plan.type) and brackets for lists (items[0].name).
    3. Pick the Condition: equals, is different from, contains, is greater than, is greater than or equal to, is less than, is less than or equal to, is empty or is not empty.
    4. Fill in the Value (not used by is empty and is not empty).
    5. In Apply tag, search and pick a tag from the list. For a new tag, type the name and click Create tag "…" (requires permission to create tags).
    6. Optional: in Fixed tag (optional), pick (or create) a tag applied on every call that identifies a contact, whether a rule matches or not. The X next to it removes the fixed tag.
    7. Click Save rules.

    The rule stores the chosen tag, not the typed name: renaming the tag later keeps working. If the tag is deleted, the rule stops applying it and the field shows This tag was deleted. Choose another one.

    How rules compare values:

    • Each rule is checked on its own: every rule that matches applies its tag.
    • Text is compared ignoring case and surrounding spaces (" Inactive " equals inactive).
    • is greater than and the other number comparisons only match when both sides are numbers. "21" (text) counts as a number; a decimal comma does too (1.234,50).
    • contains on a field that is a list checks whether any item equals the value.
    • A field missing from the JSON only matches is empty and is different from.
    • At most 20 tags are applied per call, counting the fixed tag.

    Step 3 — Test before saving

    In Test before saving, paste a sample of the JSON your system will send and click Test. Nothing is saved: the page shows which contact would be used (or whether one would be created), the result of each rule with the value it read, and the tags that would be applied. The test uses the rules as they are on the page, even before saving.

    Step 4 — Send events from your system

    Send a POST with a JSON body to the integration URL. Identify the contact with one of these fields, in this order of priority:

    FieldUse
    leadIdId of a contact that already exists in the workspace.
    emailContact email. If nobody has this email (or phone), the contact is created.
    telephone (or phone)Phone with country code; masks like +55 (11) 9... are accepted.
    name (or fullName)Name used only when the contact is created.

    The other JSON fields are only used by the rules: they do not change the contact record.

    curl -X POST "YOUR_INTEGRATION_URL" \
      -H "Content-Type: application/json" \
      --data '{ "email": "[email protected]", "event": "inactive", "days_without_access": 21 }'

    With the rules event equals inactive → disengaged and days_without_access is greater than or equal to 21 → disengaged-3-weeks, this call applies both tags to the contact.

    Step 5 — Check the result

    On the integration's History tab, each call shows the tags applied and whether the contact was created or already existed. Click Details to see the JSON received.

    A tag the contact already had is not applied again, so resending the same event does not run the automation again.

    Limits

    • Request body up to 32 KB; above that the call is rejected with 413.
    • About 600 calls per minute per integration; above that the call is rejected with 429. Retry later.
    • Up to 50 rules per integration and 20 tags per call.

    If it did not work

    • History shows "No contact identified": the JSON had no valid leadId, email or telephone. The call is ignored and no contact is created.
    • History shows "leadId not found": the leadId sent does not exist in this workspace. Send the right leadId or use email/telephone.
    • No tag applied: use Test before saving with the same JSON to see the value each rule read. Check the field path and whether the number comparison got a number.
    • The automation did not run: check that it uses the Tag Applied to Contact trigger with the same tag and that it is active. If the contact already had the tag, it is not applied again.
    • The request returned an error: see the error codes.