💻 For Developers

New here? Not a customer yet?See everything ResultsAiX Pulse can do, and get it.Get ResultsAiX Pulse →

Pulse is built to be joined up with. Your own code can hear every lead, chat message and sale, report sales of its own, teach Pulse to recognise people from your own system, open the chat from your own button, and name a logged-in member on a site that is not WordPress.

Actions:

  • ravg_lead_captured ( $email, $first_name, $visitor_id, $site_key, $via ): a visitor left their email in the chat.
  • ravg_chat_message ( $visitor_id, $site_key, $direction, $body, $id, $kind ): every chat message, both ways. $kind is admin, ai, visitor or spam.
  • ravg_chat_needs_human ( $visitor_id, $site_key ): a visitor asked for a person.
  • ravg_sale_recorded ( $event_id, $event, $sale ): a sale reached the globe.
  • ravg_desk_ticket_created ( $ticket, $visitor_id ): a chat became a Support Desk ticket.

Report a sale from your own code:

do_action( 'ravg_family_sale', array( 'email' => ..., 'name' => ..., 'amount' => ..., 'currency' => ..., 'product' => ..., 'source' => ..., 'ref' => ... ) ) The same ref is counted once for two days. A sale is placed where the buyer was last seen on your sites. For sales from another server, use the signed Sales webhook. See Sales and Leads on the Globe.

Filters:

  • ravg_identity_by_email, ravg_identity_by_token, ravg_identity_by_ip: teach Pulse to recognise people from your own system. Return an array with first_name, ltv, tags and source.
  • ravg_family_identity_parts ( $parts, $email ): add your own system's part to the merged identity.
  • ravg_enrich_event ( $event, $ip, $visitor_id ): add to or change an event before it is stored.
  • ravg_beacon_config: the tracker's settings before they reach the page.
  • ravg_ai_context ( $context, $question, $where ): add private context for the assistant to one question.

JavaScript:

  • window.RAVG.openChat() opens the chat from your own button or link, for example a Talk to us link in your menu.
  • window.RAVG.identify( email, firstName ) names a logged-in member on a page that is not WordPress. The email is turned into a one-way fingerprint in the browser and only that is sent. See Ten Sites, HTML, PHP and Protected Member Areas.

REST:

Everything lives under /wp-json/pulse/v1/. On a site with plain permalinks Pulse switches to the ?rest_route= form by itself. The routes a visitor's browser uses (hit, heartbeat, identify, feed, chat) take the public site ID and work only from your own domains. The private routes (the chat inbox, the room tools) need a logged-in administrator. Sales arrive at /sale, signed with your webhook secret.

A real example:

Yoursite has a booking form of its own for Pro Coaching. Its developer adds one line after a paid booking: do_action( 'ravg_family_sale', array( 'email' => 'james.okafor@example.com', 'name' => 'James', 'amount' => 497, 'currency' => 'USD', 'product' => 'Pro Coaching', 'source' => 'booking-form', 'ref' => 'booking-1042' ) ). The sale bursts on the globe in Toronto, where James was reading the coaching page, and shows on his timeline.

Tips:

  • Keep identity filters fast: Pulse caches each merged identity for an hour.
  • Never put a secret in a page: the tracker line only ever needs the public site ID.
New here? Not a customer yet?See everything ResultsAiX Pulse can do, and get it.Get ResultsAiX Pulse →

Ready to stop reading and start using?

Every plugin documented here works alongside the others, managed from one ResultsAiX Hub.