Skip to content

feat(nextcrm): add NextCRM integration - #209

Open
RishadAlam wants to merge 3 commits into
mainfrom
feat/nextcrm
Open

feat(nextcrm): add NextCRM integration#209
RishadAlam wants to merge 3 commits into
mainfrom
feat/nextcrm

Conversation

@RishadAlam

Copy link
Copy Markdown
Member

Pull Request

Description

Adds the free side of the NextCRM integration: 16 write actions that fire bit_integrations_next_crm_* filters for Bit Integrations Pro, six dropdown endpoints, and the three-step React wizard. Registers NextCRM as a trigger source so its 24 Pro triggers appear in the flow builder.

Motivation & Context

NextCRM (Newsletters, Email Marketing, Automation, Revenue Tracking & CRM) had no Bit Integrations support, so its contacts, tags, lists and campaigns could not be driven from a flow.

Per the free/pro split, this plugin contains no NextCRM business logic — it validates the field map, then hands off through Hooks::apply(Config::withPrefix(...)). The handlers live in bit-integrations-pro.

Actions identify their target contact by email rather than by NextCRM's internal id, because an email is what trigger data actually carries; a hand-picked id would tie the action to a single record. Read-only operations are not extracted as actions — the data they returned is exposed through dropdowns instead.

Related Links: (if applicable)

Requires Bit-Apps-Pro/bit-integrations-pro PR (NextCRM actions and triggers) for the actions to do anything. This PR defines the filter names; Pro hooks into them.

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 📚 Documentation update
  • ⚡ Improvement
  • 🔄 Code refactor

Key Changes

Backend

  • Added backend/Actions/NextCrm/NextCrmController with six refresh* endpoints (tags, lists, campaigns, contact fields, contact types, contact statuses), RecordApiHelper with a 16-case switch dispatching one literal filter per action and logging every path through LogHandler::save, and Routes.php
  • Added NextCrm to Core/Util/AllTriggersName.php

Frontend

  • Added AllIntegrations/NextCrm/staticData.js (all 16 modules is_pro: true), NextCrmCommonFunc.js, plus Authorization, FieldMap, IntegLayout, Actions, NextCrm.jsx and EditNextCrm.jsx
  • Added required config selects in IntegLayout (status, contact field, tag, list, campaign) and optional ones in Utilities (contact type, status, lists, tags, activity status, skip-if-already-sent), each with a refetch button
  • Added the NextCRM logo at resource/img/integ/nextCrm.webp — without it GetLogo falls back to a placeholder and logs an error
  • Registered the integration in NewInteg.jsx, EditInteg.jsx, IntegInfo.jsx, SelectAction.jsx and customFormIntegrations in webhookIntegrations.js, the last of which routes the trigger to the custom-form-submission editor

Field map vs dropdown

  • Added the required target identifier (contact_email) and free text to the field map, so both are mappable from trigger data
  • Added fixed option sets and fetchable config values as selects instead, keeping magic strings out of the field map

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Tests added/updated
  • Documentation updated if needed
  • README updated if needed

Prettier, ESLint and php -l run clean. Wiring verified end to end: 16 modules ≡ 16 switch cases ≡ 16 free filter strings ≡ 16 Pro accepted_args; six routes ≡ six bitsFetch calls; controller response keys ≡ the keys NextCrmCommonFunc reads; and no field-map key is read by a handler without existing in staticData.

Known issue, pre-existing and not introduced here: a long custom value in the field map overlaps the adjacent select. It affects every integration using .integ-fld-wrpTagifyInput accepts a className prop but never applies it, and .tagify--mix is a fixed 330px inside a row hard-capped at 800px. A real fix belongs in TagifyInput or app.scss and would touch all integrations, so it is deliberately out of scope here.

Changelog

  • New Integration: NextCRM — send form and flow data straight into your CRM
  • New Actions: NextCRM — create, update or upsert a contact by email, delete a contact, change status, update a single field, set or delete contact meta, add an activity, create tags and lists, add or remove a tag or list, and send a campaign email to a contact

Add the free side of the NextCRM integration: 16 write actions that fire
bit_integrations_next_crm_* filters for Bit Integrations Pro, six dropdown
endpoints (tags, lists, campaigns, contact fields, contact types and contact
statuses) and the React wizard.

Actions identify their target contact by email rather than by NextCRM's
internal id, since an email is what trigger data actually carries. Read-only
operations are not extracted as actions; the data they returned is exposed
through the dropdowns instead.

Register the trigger in customFormIntegrations so editing a NextCRM flow
loads the custom-form-submission editor rather than falling through to the
form-type one.
Copilot AI lite review requested due to automatic review settings August 5, 2026 06:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

✅ WordPress Plugin Check Report

✅ Status: Passed

📊 Report

All checks passed! No errors or warnings found.


🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants