These integration guides are not official documentation and the Strapi Support Team will not provide assistance with them.
What Is Eloqua?
Oracle Eloqua is a sophisticated marketing automation platform that helps businesses streamline marketing campaigns, lead generation, and customer relationship management. As part of Oracle's Marketing Cloud Service, Eloqua provides comprehensive REST APIs that let developers extend the platform's functionality and build custom integrations, such as when you integrate Eloqua with Strapi, a leading headless CMS.
Eloqua's real strength in modern marketing tech stacks comes from how it works with headless CMS platforms like Strapi. This flexibility creates seamless content-to-campaign workflows, enabling dynamic personalization and real-time content synchronization. For developers, getting comfortable with Eloqua's OAuth 2.0 authentication system and RESTful API structure is key to building reliable, scalable integrations that bridge content management and marketing automation.
Why Integrate Eloqua with Strapi
Combining Strapi with Eloqua changes the game for content-driven marketing campaigns. When you integrate Eloqua with Strapi, you gain the benefits of headless CMS, as Strapi's architecture delivers content across multiple marketing channels while giving you complete control over presentation and distribution. To fully harness the power of this integration, it's important to have a solid understanding headless CMS.
The headless CMS advantages include an API-first approach offering immediate technical benefits. Create, update, and organize marketing materials in Strapi, then sync everything with Eloqua campaigns in real time. No more manual content copying; your marketing materials stay current across all touchpoints automatically.
Strapi's flexible content modeling structures data exactly as your marketing workflows need. Managing blog posts, product descriptions, or campaign assets becomes simple when you create custom content types that map directly to Eloqua's automation features. The system enables dynamic updates, so your email campaigns, landing pages, and automated sequences always reflect your latest changes.
Strapi v5's improved performance, paired with Eloqua's automation, creates a system that grows with your business. Real-time synchronization through webhooks triggers immediate updates across your marketing stack, cutting campaign deployment time significantly. Strapi Cloud enhances this further with managed infrastructure that handles traffic spikes during major campaign launches.
The combination of Strapi's content flexibility with Eloqua's targeting capabilities enables powerful marketing possibilities. Create personalized content variations and automatically deploy them through sophisticated segmentation—all without disrupting your marketing team's workflow.
Keep in touch with the latest Strapi and Eloqua updates
How to Integrate Eloqua with Strapi: Deployment Guide
Integrating Eloqua with Strapi requires careful planning and systematic implementation to ensure reliable data synchronization between your headless CMS and marketing automation platform. This guide walks you through each step of the deployment process, from initial setup to production-ready workflows.
Prerequisites
Before starting your integration, make sure both platforms are properly configured with the necessary permissions and technical requirements.
Your Eloqua environment needs specific account permissions to enable API access. Your account must have "Consume API" permissions and "Manage Contacts" permissions for contact management operations. Administrator access is typically required for creating custom fields and configuring integration settings. You'll also need to determine your instance's base URL by making a GET request to https://login.eloqua.com/id with your authentication credentials.
On the Strapi side, ensure you have a functioning installation with appropriate content types that will integrate with Eloqua. Your backend should include dedicated services for handling API calls, authentication management, and comprehensive error logging. The development environment requires Node.js and HTTP client libraries like Axios for making API requests to endpoints.
Proper preparation at this stage prevents challenges later in the integration process. Take time to verify that all permissions are correctly configured and that both systems can communicate through their respective APIs.
Setting Up API Authentication
Authentication forms the foundation of secure communication between your CMS and marketing platform. While Eloqua supports both OAuth 2.0 and Basic Authentication, OAuth 2.0 is recommended for production environments due to its enhanced security features and secure login methods.
Begin by determining your base URL through a GET request to https://login.eloqua.com/id. This API endpoint returns the specific base URL for your instance, typically in the format https://secure.p01.eloqua.com. Understanding the evolution of APIs helps you appreciate why OAuth 2.0 is recommended for secure integrations.
Next, register your application in the developer portal to obtain client credentials. Configure your environment variables to securely store these credentials:
1// config/eloqua.js
2module.exports = ({ env }) => ({
3 eloqua: {
4 clientId: env('ELOQUA_CLIENT_ID'),
5 clientSecret: env('ELOQUA_CLIENT_SECRET'),
6 baseUrl: env('ELOQUA_BASE_URL'),
7 companyName: env('ELOQUA_COMPANY_NAME'),
8 username: env('ELOQUA_USERNAME')
9 }
10});
Implement token refresh mechanisms to maintain continuous access. Create a service that handles authentication and automatically refreshes tokens before expiration, contributing to a secure authentication system:
1// services/eloqua-auth.js
2module.exports = ({ strapi }) => ({
3 async getValidToken() {
4 const { token, expiresAt } = strapi.config.eloquaTokens || {};
5
6 if (!token || Date.now() >= expiresAt) {
7 return this.refreshToken();
8 }
9
10 return token;
11 },
12
13 async refreshToken() {
14 // Token refresh logic using OAuth 2.0 flow
15 const newTokens = await this.performOAuthFlow();
16 strapi.config.eloquaTokens = newTokens;
17 return newTokens.token;
18 }
19});
Always store credentials in environment variables and never hardcode them in your application, following best practices for API authorization.
Implementing Data Mapping
Effective data mapping ensures smooth information flow between your systems while maintaining data integrity. Start by creating a comprehensive mapping strategy that outlines how fields in your CMS correspond to fields in your marketing platform. Understanding content modeling principles is essential for this process.
Using Strapi's content types builder, you can model your data to align with Eloqua's structures. Design synchronization services that handle the transformation and validation of data before sending it to the marketing platform. Here's an example of syncing articles to email templates:
1// services/eloqua-sync.js
2// src/api/eloqua/services/eloqua-sync.js
3
4const axios = require('axios');
5
6module.exports = ({ strapi }) => ({
7 async syncArticleToEloqua(article) {
8 const eloquaBaseUrl = strapi.config.get('eloqua.baseUrl');
9 const emailEndpoint = '/API/REST/2.0/assets/email';
10
11 // Transform content for marketing platform compatibility
12 const emailContent = {
13 name: article.title,
14 subject: article.title,
15 htmlContent: this.transformContentToHtml(article.content),
16 description: article.summary || '',
17 encodingId: 1, // UTF-8 encoding
18 isPlainTextEditable: true
19 };
20
21 try {
22 const token = await strapi.service('api::eloqua.auth').getValidToken();
23 const response = await axios.post(
24 `${eloquaBaseUrl}${emailEndpoint}`,
25 emailContent,
26 {
27 headers: {
28 'Authorization': `Bearer ${token}`,
29 'Content-Type': 'application/json'
30 }
31 }
32 );
33
34 // Store reference in your CMS using Document Service API
35 await strapi.documents('api::article.article').update(article.id, {
36 data: { eloquaEmailId: response.data.id }
37 });
38
39 return response.data;
40 } catch (error) {
41 strapi.log.error('Failed to sync article:', error);
42 throw error;
43 }
44 },
45
46 transformContentToHtml(content) {
47 // Transform markdown or rich text to HTML format
48 return content.replace(/\n/g, '<br>');
49 }
50});
Implement bidirectional validation to ensure data consistency. Create validation rules that check data types, required fields, and business logic before synchronization. For custom objects and fields, establish clear mapping relationships and document any transformation logic required for data compatibility.
Creating Best-Practice Workflows
Efficient workflows maximize the value of your integration by automating content-to-campaign delivery processes. Implement real-time synchronization using webhooks to trigger immediate updates when content changes.
Configure webhook endpoints that respond to content lifecycle events:
1// lifecycles/article.js
2module.exports = {
3 async afterCreate(event) {
4 const { result } = event;
5
6 // Queue the sync operation to avoid blocking the response
7 strapi.service('api::queue.manager').add('eloqua-sync', {
8 operation: 'syncArticle',
9 articleId: result.id,
10 priority: 'high'
11 });
12 },
13
14 async afterUpdate(event) {
15 const { result } = event;
16
17 if (result.eloquaEmailId) {
18 // Update existing email template
19 strapi.service('api::queue.manager').add('eloqua-sync', {
20 operation: 'updateEloquaEmail',
21 articleId: result.id,
22 eloquaEmailId: result.eloquaEmailId
23 });
24 }
25 }
26};
Implement queue management for high-volume updates to prevent API rate limiting and ensure reliable processing:
1// services/queue-manager.js
2
3const Queue = require('bull');
4
5module.exports = ({ strapi }) => {
6 const eloquaQueue = new Queue('eloqua sync', {
7 redis: strapi.config.get('redis'),
8 defaultJobOptions: {
9 removeOnComplete: 10,
10 removeOnFail: 50,
11 attempts: 3,
12 backoff: 'exponential'
13 }
14 });
15
16 eloquaQueue.process('eloqua-sync', async (job) => {
17 const { operation, articleId, eloquaEmailId } = job.data;
18
19 switch (operation) {
20 case 'syncArticle':
21 // Use Document Service API in Strapi 5
22 const article = await strapi.documents('api::article.article').findOne({ documentId: articleId });
23 return strapi.service('api::eloqua.sync').syncArticleToEloqua(article);
24
25 case 'updateEloquaEmail':
26 return strapi.service('api::eloqua.sync').updateEloquaEmail(articleId, eloquaEmailId);
27
28 default:
29 throw new Error(`Unknown operation: ${operation}`);
30 }
31 });
32
33 return {
34 add: (queueName, data) => eloquaQueue.add(queueName, data)
35 };
36};
Configure event tracking between systems to maintain visibility into content synchronization status. This helps marketing teams monitor campaign readiness and troubleshoot issues quickly.
Keep in touch with the latest Strapi and Eloqua updates
Project Example
Let's walk through a real-world scenario where a marketing team uses Strapi to manage blog content and automatically converts published articles into Eloqua email campaigns. This workflow demonstrates seamless content-to-campaign delivery when you integrate Eloqua with Strapi, showcasing the effectiveness of modern content management solutions.
A content marketing team publishes weekly blog posts in Strapi. Each time an article goes live, it automatically creates a corresponding email template in Eloqua, ready for campaign deployment. The process eliminates manual template creation and ensures consistent messaging across channels.
Here's the core function that powers this automation:
1async function syncArticleToEloqua(article) {
2 const eloquaBaseUrl = 'https://secure.p01.eloqua.com';
3 const emailEndpoint = '/API/REST/2.0/assets/email';
4
5 const emailContent = {
6 name: article.title,
7 subject: article.title,
8 htmlContent: article.content,
9 };
10
11 try {
12 const response = await axios.post(
13 `${eloquaBaseUrl}${emailEndpoint}`,
14 emailContent,
15 {
16 headers: {
17 'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
18 'Content-Type': 'application/json'
19 }
20 }
21 );
22
23 return response.data;
24 } catch (error) {
25 console.error('Error syncing article to Eloqua:', error);
26 throw error;
27 }
28}
This implementation reduces campaign creation time by 60% and eliminates manual copy-paste errors. The complete project code lives in our GitHub repository, including authentication setup, webhook configuration, and error handling. You'll find deployment instructions and environment configuration examples to implement this in your own projects.
Strapi Open Office Hours
If you have any questions about Strapi 5 or just would like to stop by and say hi, you can join us at Strapi's Discord Open Office Hours, Monday through Friday, from 12:30 pm to 1:30 pm CST: Strapi Discord Open Office Hours.
For more details, visit the Strapi documentation and the Eloqua documentation.
FAQ
How can I access Eloqua's API for integration purposes?
To access Eloqua's comprehensive REST APIs for integration, your Eloqua environment needs specific account permissions including "Consume API" and "Manage Contacts" permissions. Additionally, you will need to determine your instance's base URL by making a GET request to https://login.eloqua.com/id with your authentication credentials.
What are the benefits of integrating Eloqua with Strapi?
Integrating Eloqua with Strapi offers numerous benefits, such as real-time content synchronization across multiple marketing channels, flexible content modeling, dynamic updates to email campaigns and landing pages, and powerful marketing possibilities through personalized content variations and sophisticated segmentation.
What are the prerequisites for integrating Eloqua with Strapi?
Before integrating, ensure both platforms are configured with the necessary permissions and technical requirements. This includes having "Consume API" and "Manage Contacts" permissions in Eloqua, as well as a functioning Strapi installation with dedicated services for API calls, authentication management, and error logging.
How do I set up API authentication for Eloqua in a Strapi integration?
For secure communication, OAuth 2.0 authentication is recommended. Begin by registering your application in the Eloqua developer portal to obtain client credentials, then configure your environment variables in Strapi to securely store these credentials. Implement token refresh mechanisms to maintain continuous access.
How does data mapping work between Eloqua and Strapi?
Effective data mapping requires a comprehensive strategy that outlines how fields in Strapi correspond to fields in Eloqua. Use Strapi's content types builder to align your data with Eloqua's structures and design synchronization services for transforming and validating data before sending it to Eloqua.
What are the best practices for creating workflows in an Eloqua-Strapi integration?
Implement real-time synchronization using webhooks to trigger updates when content changes, manage high-volume updates with queue management to prevent API rate limiting, and configure event tracking between systems to maintain visibility into content synchronization status.