Sample Salesforce Marketing Cloud Content Builder Block
git clone https://github.com/barcellos-pedro/custom-block-widget-sample.gitSample Salesforce Marketing Cloud Content Builder Block
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/barcellos-pedro/custom-block-widget-sampleCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Create a custom block widget for Salesforce Marketing Cloud Content Builder. The widget should be named '[WIDGET_NAME]' and be designed for the [INDUSTRY] industry. The widget should include [FEATURE_1], [FEATURE_2], and [FEATURE_3]. Provide the HTML, CSS, and JavaScript code for the widget, along with a brief description of how it can be used.
## Custom Block Widget: Product Recommendation Engine
### Description
The Product Recommendation Engine is a custom block widget designed for the e-commerce industry. This widget dynamically displays product recommendations based on the user's browsing history and purchase behavior. It includes the following features:
- **Personalized Recommendations**: Displays products tailored to the user's interests.
- **Real-time Updates**: Updates the recommendations in real-time as the user interacts with the site.
- **Responsive Design**: Adapts to different screen sizes and devices.
### HTML Code
```html
<div class="product-recommendation-engine">
<!-- Recommendation content will be dynamically inserted here -->
</div>
```
### CSS Code
```css
.product-recommendation-engine {
border: 1px solid #ddd;
padding: 20px;
border-radius: 5px;
background-color: #f9f9f9;
}
.product-recommendation-engine h2 {
color: #333;
font-size: 18px;
margin-bottom: 15px;
}
```
### JavaScript Code
```javascript
document.addEventListener('DOMContentLoaded', function() {
// Fetch user data and product recommendations
fetch('/api/recommendations')
.then(response => response.json())
.then(data => {
const recommendationContainer = document.querySelector('.product-recommendation-engine');
data.recommendations.forEach(product => {
const productElement = document.createElement('div');
productElement.innerHTML = `
<h3>${product.name}</h3>
<p>${product.description}</p>
<p>Price: $${product.price}</p>
`;
recommendationContainer.appendChild(productElement);
});
});
});
```Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan