Real-time Journeys

Learn how to set up and launch real-time journeys to engage users instantly based on live event data

In this guide, weโ€™ll walk through how to set up a real-time journey. Real-time journeys enable dynamic, event-driven engagement based on live data.

Prerequisites

Before you begin, make sure you have:

  • Apache Kafka, AWS SQS, or Google Pub/Sub for event streaming.
  • SendGrid or Salesforce Marketing Cloud (SFMC) for email marketing (currently, these are the only real-time destinations supported).
  • Real-time events enabled in your org. If you donโ€™t see this, contact your GrowthLoop rep to enable it.

Step 1: Configure a Real-Time Source Connection

  1. Log into GrowthLoop and go to the Organization page.
  2. Open the Source Connections tab and click New Source Connection.
  3. In the modal, select Kafka.
  4. Fill out the required details for the event queue connection:
Field NameRequiredDescriptionExampleNotes
Nameโœ… YesA unique name to identify this Kafka connection.ProductionKafkaCluster, OrdersEventBrokerMust be unique across connections. Used for display and reference.
DescriptionโŒ NoAdd context about the connection.Kafka cluster for production eventsHelpful for documentation/debugging.
Bootstrap Serversโœ… YesComma-separated list of broker addresses.kafka-1.company.com:9092,kafka-2.company.com:9092At least one must be reachable.
Topic Nameโœ… YesKafka topic the consumer will subscribe to.user-signups, order.createdMust already exist in the cluster.
Group IDโŒ NoConsumer group ID.signup-event-workersAuto-generated if left blank.
Security Protocolโœ… YesDefines communication/security protocol.โ€”Common: PLAINTEXT, SSL, SASL_SSL.
Mechanismโš ๏ธ ConditionalRequired if using SASL.PLAIN, SCRAM-SHA-256Must match Kafka server config.
Usernameโš ๏ธ ConditionalSASL username.โ€”Provided by Kafka admin.
Passwordโš ๏ธ ConditionalSASL password.โ€”Keep secure.
  1. Click Create. A test connection will run, and if successful, your new source connection will be saved.
๐Ÿ‘

Success

Youโ€™ve successfully configured a real-time source connection!

Step 1a: Configure an AWS SQS Real-Time Source Connection

If your events are published to an AWS SQS queue, you can configure SQS as a real-time source.

  1. Go to the Organization page > Source Connections > New Source Connection.
  2. Select AWS SQS.
Field NameRequiredDescription
Nameโœ… YesDescriptive name for the SQS connection.
DescriptionโŒ NoOptional context about the queue.
Queue URLโœ… YesFull URL of the SQS queue.
AWS Regionโœ… YesRegion where the queue is hosted (e.g., us-east-1).
AWS Access Key IDโœ… YesIAM access key with permission to read from the queue.
AWS Secret Access Keyโœ… YesSecret key associated with the access key.
AWS Queue Typeโœ… Yesstandard or fifo (FIFO queues must end with .fifo).

AWS Permissions (Required)

The AWS credentials must include at least the following IAM permissions:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "sqs:ReceiveMessage",
        "sqs:DeleteMessage",
        "sqs:GetQueueAttributes"
      ],
      "Resource": "arn:aws:sqs:<REGION>:<ACCOUNT_ID>:<QUEUE_NAME>"
    }
  ]
}

You may optionally grant sqs:ChangeMessageVisibility if long processing times are expected.

Operational Notes

  • Ensure the queueโ€™s visibility timeout is long enough for message processing.
  • FIFO queues require exactly-once semantics and proper deduplication settings.
  • Use least-privilege IAM users or roles and rotate credentials regularly.
  1. Click Create to validate credentials and test the connection.

Step 1b: Configure a Google Pub/Sub Real-Time Source Connection

If your events are published to Google Pub/Sub, you can configure Pub/Sub as a real-time source.

  1. Go to the Organization page > Source Connections > New Source Connection.
  2. Select Google Pub/Sub.
Field NameRequiredDescription
Nameโœ… YesDescriptive name for the source connection.
DescriptionโŒ NoOptional context or notes.
Subscription Nameโœ… YesName of an existing Pub/Sub subscription.
Service Account Keyโœ… YesUpload a JSON key for a service account with subscriber access.

Service Account Requirements

  • Create a Google Service Account.
  • Grant roles/pubsub.subscriber.
  • Generate and upload a JSON key file.
  • The subscription must already exist before configuration.

Operational Notes

  • Messages are pulled continuously using Pub/Subโ€™s pull model.
  • Messages are acknowledged after successful processing.
  • The system can scale consumption through parallel pulls.
  1. Click Create to authenticate, validate access, and test message ingestion.

Step 2: Create a Real-Time Event

  1. In the side menu, go to Datasets and select the Realtime Events tab.
  2. Click New Realtime Event.
  3. Fill out the event registration form:
Field NameRequiredDescription
Event Sourceโœ… YesSelect the real-time source connection (e.g., ProductionKafkaCluster).
Event Nameโœ… YesA human-readable label for this event (e.g., UserSignup, OrderPlaced).
Path to Eventโœ… YesField path in the Kafka message to inspect (supports dot notation, e.g., user.status.type).
Event Valueโœ… YesValue in the field above that triggers the event (e.g., signup). Messages without this value are ignored.
Register Event Schemaโœ… YesJSON Schema describing the event payload for validation and field extraction.
  1. Click Save.
๐Ÿ‘

Success

Youโ€™ve successfully created a real-time event!

Step 3: Add the Real-Time Event to a Dataset Group

  1. Switch to the Dataset Group tab.
  2. Select your Dataset Group, then open the Realtime Events tab.
  3. Click Add Realtime Event.
  4. In the modal, select the event you created.
  5. Map the real-time field to your datasetโ€™s primary key.

Step 4: Create a Real-Time Journey

  1. In the side menu, go to Journeys and click New Journey.
  2. In setup, choose Realtime Journey as the type.
  3. Select the Dataset Group with your registered event.
  4. From Select Realtime Event, choose your event.
  5. Configure the rest of the journey and click Continue. Youโ€™ll see a real-time entry node appear on the canvas with a lightning icon.
  6. Next, drag a Criteria node onto the canvas and filter users by event fields (e.g., event type, attributes).
  7. Then, drag a Destination node and choose a real-time destination (SendGrid or SFMC).
๐Ÿ“˜

Note

The fields available in real-time destination node are sourced from the real-time event message schema and can be used for email recipient selection and template personalization.

  1. Click Publish to activate the journey.
๐Ÿ‘

Success

Youโ€™ve successfully created a real-time journey!


๐Ÿ“˜

Need help?

If you run into issues with Real-Time Journeys, reach out to us at [email protected].