PolyUtilities For PerfexCRM

Connect Slack Events API & AI Chat to Perfex CRM with PolyUtilities

Switching tabs between Slack channels and Perfex CRM fragments support context and leaves client updates buried in workspace threads. Connecting Slack Events API to PolyUtilities v3.7.0 brings two-way Slack channel and DM conversations directly into the Perfex CRM Unified Inbox alongside AI Chat copilots and CrossTag record linking.

Follow this deployment playbook to register your Slack App scopes, verify signed webhook requests automatically, and enable AI-assisted replies inside one workspace.

Slack ParameterConfiguration ValueVerification Method
Webhook URLpoly_utilities/omnichat/webhook/slackAuto-responds to url_verification
Signing HeaderSlack App Signing SecretX-Slack-Signature HMAC-SHA256
Bot OAuth Tokenxoxb-... Bot TokenAES-256-CBC encrypted (enc:v1:)
Bot Scopeschat:write, channels:history, im:history, files:readSubscribes to message.channels & message.im

Step 1: Create the Slack App and Gather Credentials

Confirm PolyUtilities is active using the PolyUtilities installation guide and enable the OmniChat subsystem under Poly Utilities > Settings > OmniChat & AI Hub. Then create a Slack App at api.slack.com/apps for your Workspace.

  • Open OAuth & Permissions and assign the four required Bot Scopes: chat:write, channels:history, im:history, and files:read.
  • Click Install to Workspace and copy the xoxb- Bot User OAuth Token.
  • Copy the Signing Secret under Basic Information > App Credentials plus your target Slack Channel ID (such as C0123456789).

Step 2: Save Gateway in Perfex and Verify Slack Events

OmniChat validates Slack challenges against your stored Signing Secret, so save the gateway in Perfex before activating Event Subscriptions. Pair Slack sync with IMAP and SMTP email unified inbox sync and custom CRM widgets to centralize staff workflows.

  • Open OmniChat & AI Hub > Settings > Omnichannel Gateways, enter Channel ID, xoxb- Bot Token, and Signing Secret, and click Save first.
  • Copy the HTTPS Request URL ending in poly_utilities/omnichat/webhook/slack from the contextual guide modal.
  • In Slack Event Subscriptions, paste the Request URL (auto-verifies green Verified) and subscribe to message.channels and message.im.
  • Run /invite @YourBotName inside your Slack channel and configure AI Hub keys to unlock AI Draft Reply, Smart Chips, and CrossTag $ record linking.

Common Pitfalls and Quick Fixes

  • Request URL fails url_verification: Save the Signing Secret in Perfex OmniChat first, then click Retry in Slack Event Subscriptions.
  • Channel messages do not arrive: Run /invite @YourBotName inside the target Slack channel and confirm message.channels is subscribed.
  • HTTP 403 signature mismatch: Server clock drift exceeds Slack’s 5-minute replay window or a proxy mutates the payload. Sync server NTP and pass raw POST bodies untouched.

Frequently Asked Questions

How does PolyUtilities secure incoming Slack Events API webhooks?

OmniChat automatically handles Slack’s initial challenge payload and verifies every subsequent webhook request using X-Slack-Signature HMAC-SHA256 validation paired with your stored Signing Secret. Requests older than five minutes are rejected to block replay attacks, while Bot Tokens remain AES-256-CBC encrypted in database storage.

Do I need Node.js or an external socket server for Slack sync?

No. PolyUtilities processes Slack Events API webhooks, bot replies, AI Copilot calls, and file security scanning entirely in pure PHP inside Perfex CRM. Standard 3-second polling works on shared hosting out of the box, or you can optionally enable Pusher Channels for instant updates.

Are Internal Notes ever posted back to the Slack channel?

Never. Messages created while the composer is set to Internal Note stay strictly inside the Perfex CRM thread and are never transmitted to Slack’s chat.postMessage API or visible on the Client Portal. Only Public Replies dispatch outbound to external Slack channels or DMs.

Can I test AI Chat and Slack routing before deploying live?

Yes. You can inspect the 3-panel Unified Inbox, AES-256-CBC AI Hub key rotation pool, CrossTag smart pills, and omnichannel Slack setup modal inside the PolyUtilities live Perfex CRM demo, or connect a private test Slack channel in staging first.


Comments

Leave a Reply

Your email address will not be published.Required fields are marked *