Salesforce Articles / Blogs / Perficient https://blogs.perficient.com/category/partners/salesforce/ Expert Digital Insights Wed, 19 Feb 2025 09:48:00 +0000 en-US hourly 1 https://blogs.perficient.com/files/favicon-194x194-1-150x150.png Salesforce Articles / Blogs / Perficient https://blogs.perficient.com/category/partners/salesforce/ 32 32 30508587 Deserializing JSON Responses in Apex https://blogs.perficient.com/2025/02/18/deserializing-json-responses-in-apex/ https://blogs.perficient.com/2025/02/18/deserializing-json-responses-in-apex/#respond Tue, 18 Feb 2025 17:23:38 +0000 https://blogs.perficient.com/?p=376858

As Salesforce developers, handling JSON responses is a common task when working with external APIs or manipulating data structures. Apex provides several powerful methods to deserialize JSON into native objects, making it easier to work with structured data. In this blog, we will explore different approaches to deserialize JSON in Apex, accompanied by examples for better understanding.

1.Using JSON.deserialize() Method

This method is straightforward and deserializes JSON content into an Object. The returned object can be cast to a specific type for further processing.

Example:

String jsonString = '{"name": "John Doe", "age": 30}';
Object obj = JSON.deserialize(jsonString, Object.class);
Map<String, Object> mapData = (Map<String, Object>) obj;

System.debug('Name: ' + mapData.get('name'));
System.debug('Age: ' + mapData.get('age'));

When to Use:

  • When the JSON structure is simple.
  • If the JSON structure can vary and type casting is manageable.

2.Using JSON.deserializeUntyped() Method

This method deserializes JSON into loosely typed objects such as Map<String, Object> or List<Object>. It is useful when you need flexibility without creating a custom class.

Example:

String jsonString = '{"name": "Jane Doe", "hobbies": ["reading", "traveling"]}';
Map<String, Object> data = (Map<String, Object>) JSON.deserializeUntyped(jsonString);

System.debug('Name: ' + data.get('name'));
List<Object> hobbies = (List<Object>) data.get('hobbies');
System.debug('Hobbies: ' + hobbies);

When to Use:

  • For dynamic or unpredictable JSON structures.
  • When a custom class is unnecessary.

3. Using JSON.deserializeStrict() Method

This method is similar to JSON.deserialize() but enforces strict type matching between the JSON string and the target Apex type. It throws an exception if the types do not match.

Example:

String jsonString = '{"name": "Mark", "age": 25}';
try {
    Map<String, Object> mapData = (Map<String, Object>) JSON.deserializeStrict(jsonString, Map<String, Object>.class);
    System.debug('Name: ' + mapData.get('name'));
    System.debug('Age: ' + mapData.get('age'));
} catch (Exception e) {
    System.debug('Error: ' + e.getMessage());
}

When to Use:

  • When you need to enforce data integrity during deserialization.
  • For scenarios where strict type validation is critical.

4. Using Custom Apex Classes

Defining a custom class that maps to the JSON structure is a robust approach. This method is ideal for complex and nested JSON objects.

Example:

public class Person {
    public String name;
    public Integer age;
}

String jsonString = '{"name": "Alice", "age": 28}';
Person person = (Person) JSON.deserialize(jsonString, Person.class);
System.debug('Name: ' + person.name);
System.debug('Age: ' + person.age);

 When to Use:

  • For well-defined and static JSON structures.
  • When reusability and readability are priorities.

5. Handling Nested JSON with Custom Classes

For nested JSON structures, create multiple classes to mirror the JSON hierarchy.

Example:

public class Order {
    public String orderId;
    public List<Item> items;
}

public class Item {
    public String itemName;
    public Double price;
}

String jsonString = '{"orderId": "ORD123", "items": [{"itemName": "Laptop", "price": 1200.50}, {"itemName": "Mouse", "price": 25.75}]}';
Order order = (Order) JSON.deserialize(jsonString, Order.class);

System.debug('Order ID: ' + order.orderId);
for (Item item : order.items) {
    System.debug('Item: ' + item.itemName + ', Price: ' + item.price);
}

When to Use:

  • For deeply nested or complex JSON structures.
  • When maintaining clear relationships between objects is essential.

6. Deserializing JSON Arrays

If the JSON is an array, you can deserialize it directly into a List of objects or a List of custom classes.

Example:

String jsonString = '[{"name": "John"}, {"name": "Jane"}]';
List<Person> people = (List<Person>) JSON.deserialize(jsonString, List<Person>.class);

for (Person person : people) {
    System.debug('Name: ' + person.name);
}

When to Use:

  • When the JSON represents an array.
  • For scenarios requiring bulk processing.

Conclusion

Choosing the correct method to deserialize JSON in Apex depends on the complexity of the JSON structure and your application’s requirements. Here’s a quick summary:

Jsondeserealizationmethods

 

Understanding these approaches enables you to efficiently handle JSON in your Salesforce applications and create robust, maintainable solutions. Happy coding!

]]>
https://blogs.perficient.com/2025/02/18/deserializing-json-responses-in-apex/feed/ 0 376858
Craig Isakson’s TDX 2025 Game Plan: AI, Agentforce & Innovation https://blogs.perficient.com/2025/02/18/craig-isaksons-tdx-2025-game-plan-ai-agentforce-innovation/ https://blogs.perficient.com/2025/02/18/craig-isaksons-tdx-2025-game-plan-ai-agentforce-innovation/#respond Tue, 18 Feb 2025 17:13:01 +0000 https://blogs.perficient.com/?p=377359

Director Craig Isakson is always looking to explore the latest tech and find new ways to improve client solutions. This year, he’s especially excited for TDX 2025—here’s why!

Diving Into What’s New in Agentforce

Craig is excited to dive into the latest tools in Agentforce and see how other developers are putting them to use. He’s focused on getting his team up to speed quickly and finding ways to integrate new efficiencies into client solutions.

Must-See Sessions and Speakers

With so many great sessions at TDX 2025, Craig has a tough time choosing just one. He’s especially excited for the AMAs, where he can get valuable insights and answers to key questions. The keynotes are always a highlight, but this year, he’s particularly eager to learn more about the Atlas reasoning engine, a hot topic among clients. Understanding its inner workings will help build their confidence in the tool. He’s also looking forward to sessions on Test AI and using RAG, both of which are high on his must-see list.

The Future of Development with Salesforce

Craig has noticed Salesforce’s shift away from hiring new developers, a clear sign that AI and Agentforce are playing a bigger role in making existing developers more efficient. This trend means teams can do more with less, accelerating feature development and implementation.

Advice for First-Time Attendees

Craig’s top tip? Plan ahead! Sessions fill up fast, so review the schedule early and sign up as soon as possible. He also recommends getting plenty of rest—TDX is packed with learning opportunities, and staying energized is key.

Craig’s Goals for TDX 2025

This year, Craig is focused on understanding Agentforce’s full potential and its future roadmap. His goal is to strengthen his team’s expertise and ensure they’re prepared to help clients build scalable, efficient solutions that improve customer experiences.

With TDX 2025 shaping up to be an exciting and insightful event, Craig is eager to bring back fresh knowledge and best practices to share with his team and clients!

Want to learn more about Agentforce before TDX? Check out the following resources: 

Perficient’s Agentforce Resource CenterAgentforce revolutionizes operations by enhancing workflows, boosting team productivity, and driving customer satisfaction.

Perficient at TDX 2025: Perficient is at the forefront of AI innovation at TDX 2025, showcasing cutting-edge solutions and insights that are shaping the future of the Salesforce ecosystem. Check out how we’re making an impact.

Perficient Joins Salesforce’s Agentforce Partner NetworkLearn about Perficient’s addition to the Agentforce Partner Network, a groundbreaking ecosystem introduced by Salesforce. This network is designed to revolutionize how businesses leverage AI agents to enhance customer success and operational efficiency.

Perficient + Salesforce 

Perficient is part of the Agentforce Partner Network and your go-to partner for a smooth and successful rollout of Agentforce solutions — backed by Data Cloud expert-level knowledge.

Can’t Make TDX?

Schedule some time with us and let our experts fill you in. And stay tuned to our Salesforce blog  for all our post-conference insights.

]]>
https://blogs.perficient.com/2025/02/18/craig-isaksons-tdx-2025-game-plan-ai-agentforce-innovation/feed/ 0 377359
TDX 2025 Through Anthony Turley’s Eyes: What He’s Most Excited About https://blogs.perficient.com/2025/02/18/tdx-2025-through-anthony-turleys-eyes-what-hes-most-excited-about/ https://blogs.perficient.com/2025/02/18/tdx-2025-through-anthony-turleys-eyes-what-hes-most-excited-about/#respond Tue, 18 Feb 2025 16:03:59 +0000 https://blogs.perficient.com/?p=377356

As a Technical Consultant, Anthony Turley is always on the lookout for innovative solutions that can transform the way his team serves clients. This year, he is particularly excited about attending TDX 2025, and here’s why:

Exploring Agentforce’s New Capabilities

Anthony can’t wait to dive into all the new features and capabilities Agentforce has to offer. He’s especially excited about the potential to integrate these advancements with clients’ systems, creating solutions that once seemed impossible. Fully leveraging Agentforce will open fresh opportunities for innovation and efficiency, and he’s eager to see where it can take things next.

Deep Dive into Agentforce for Developers

One session Anthony is especially excited about is Deep Dive into Agentforce for Developers.” It’s a chance to explore how Agentforce can be extended programmatically—despite already being incredibly powerful out of the box. Gaining these insights will help Anthony and his team fine-tune solutions to better meet their clients’ unique needs.

Attending in person or virtually? Check out the full TDX session catalog here and save your spot for exclusive, first-access hands-on learning.

Impactful Trends in the Salesforce Ecosystem

Anthony sees the integration of Agentforce with Data Cloud as a total game-changer this year. This powerful combo will unlock exciting automation possibilities and give deep insights into customer journeys. Tapping into this data effectively will be key to creating more personalized and meaningful client experiences.

Advice for First-Time Attendees

For those attending TDX for the first time, Anthony advises planning and creating an agenda to ensure they can attend all the sessions they are interested in. “Plan ahead and create an agenda to make sure you hit all the sessions you’re excited about. Don’t be afraid to ask questions and dive into hands-on learning whenever possible!” – Anthony Turley

Key Takeaways

Anthony’s main goal for this year’s TDX is to gain a deeper grasp of Agentforce and everything it can do. He wants to learn both the declarative and programmatic sides so he can better serve clients and help build solutions that make a real impact. With TDX 2025 shaping up to be an incredible learning experience, Anthony is excited to bring back fresh insights and ideas to share with his team and clients—helping drive innovation and success in their businesses.

Want to learn more about Agentforce before TDX? Check out the following resources: 

Perficient’s Agentforce Resource CenterAgentforce revolutionizes operations by enhancing workflows, boosting team productivity, and driving customer satisfaction.

Perficient at TDX 2025: Perficient is at the forefront of AI innovation at TDX 2025, showcasing cutting-edge solutions and insights that are shaping the future of the Salesforce ecosystem. Check out how we’re making an impact.

Perficient Joins Salesforce’s Agentforce Partner NetworkLearn about Perficient’s addition to the Agentforce Partner Network, a groundbreaking ecosystem introduced by Salesforce. This network is designed to revolutionize how businesses leverage AI agents to enhance customer success and operational efficiency.

Perficient + Salesforce 

Perficient is part of the Agentforce Partner Network and your go-to partner for a smooth and successful rollout of Agentforce solutions — backed by Data Cloud expert-level knowledge.

Can’t Make TDX?

Schedule some time with us and let our experts fill you in. And stay tuned to our Salesforce blog  for all our post-conference insights.

]]>
https://blogs.perficient.com/2025/02/18/tdx-2025-through-anthony-turleys-eyes-what-hes-most-excited-about/feed/ 0 377356
Driving Customer Loyalty with Experience Cloud https://blogs.perficient.com/2025/02/18/building-long-term-relationships-experience-cloud/ https://blogs.perficient.com/2025/02/18/building-long-term-relationships-experience-cloud/#respond Tue, 18 Feb 2025 06:14:12 +0000 https://blogs.perficient.com/?p=375937

In today’s competitive business environment, customer loyalty is a valuable asset. Retaining an existing customer is far easier and more cost-effective than acquiring a new one. Loyal customers continue to make purchases and act as advocates for your brand, helping to drive growth and improve your reputation. But how do you create and nurture long-term relationships with your customers?

Salesforce Experience Cloud offers a powerful platform that allows businesses to engage with their customers in meaningful, personalized ways. Through customized portals, communities, and digital experiences, businesses can connect with customers on a deeper level, providing the tools and support they need to stay loyal to your brand.

In this blog, we’ll explore key strategies for using Experience Cloud to build customer loyalty and strengthen long-term relationships.

Why Customer Loyalty Matters

Customer loyalty is the foundation of sustained business growth. Loyal customers tend to:

  • Repeat Purchases: They’re more likely to continue buying from you.
  • Higher Lifetime Value: Loyal customers often spend more over time.
  • Brand Advocacy: They recommend your business to others, expanding your customer base.
  • Feedback and Improvement: Loyal customers provide valuable insights and feedback, helping you improve your offerings.

In fact, studies show that acquiring a new customer can cost up to five times more than retaining an existing one. This makes loyalty a key focus for businesses looking to thrive long-term.

How Experience Cloud Can Drive Customer Loyalty

Here are some strategies for using Salesforce Experience Cloud to foster customer loyalty and build long-term relationships:

1. Personalize Customer Interactions

One of the best ways to build loyalty is to make your customers feel seen and valued. Experience Cloud allows businesses to create highly personalized experiences that cater to each customer’s individual needs and preferences.

  • Personalized Content: Use Salesforce data to show customers relevant content, product recommendations, and offers based on their past interactions, preferences, and behavior. This ensures that customers feel like their needs are being anticipated and met.
  • Custom Dashboards: For customers using your portal, provide personalized dashboards that give them quick access to the most relevant information—their order history, case status, or community discussions.

By offering these tailored experiences, customers feel a stronger connection to your brand and are likelier to stay loyal.

2. Foster Community Engagement

Building a sense of community is key to fostering long-term relationships. Experience Cloud enables businesses to create online communities where customers can interact with each other, ask questions, share experiences, and find solutions.

  • User-Generated Content: Encourage customers to contribute to discussions, share tips, or post product reviews. This builds engagement and helps customers feel more connected to your brand.
  • Peer Support: When customers can help each other by answering questions or solving problems in your community, it enhances their experience and creates a sense of belonging.

By building a thriving community, you turn customers into advocates and create a platform for continuous engagement that strengthens their loyalty.

3. Provide Exceptional Customer Support

A key driver of loyalty is how well you support your customers. Experience Cloud makes it easy to offer top-tier customer service through self-service options, live support, and automation.

  • Self-Service Portals: Give customers access to a knowledge base, FAQs, and troubleshooting guides through your Experience Cloud portal. The ability to find solutions to their problems quickly makes customers feel empowered and satisfied.
  • Live Chat and Case Management: Integrate live chat or case management features into your Experience Cloud portal so customers can easily reach out for help when they need it. Providing fast, efficient support builds trust and loyalty.
  • Proactive Support: Use Salesforce’s tools to track customer behavior and reach out with proactive solutions before issues arise. For example, if you notice a customer is having trouble with an order, you can offer help or updates before they even ask.

Customers’ loyalty deepens when they can rely on you for support.

4. Reward Loyalty with Exclusive Offers Customer Relationships

Another way to build customer loyalty is through rewards and recognition. Experience Cloud allows businesses to create programs and incentives that encourage repeat business and reward loyal customers.

  • Loyalty Programs: Create personalized loyalty programs where customers can earn points, discounts, or exclusive offers based on their purchases or engagement with your brand. This will not only encourage repeat business but also make customers feel valued.
  • Exclusive Content or Access: Offer loyal customers early access to new products, special discounts, or exclusive content through your Experience Cloud portal. This makes them feel part of an exclusive group and strengthens their emotional connection to your brand.

By recognizing and rewarding customer loyalty, you reinforce the idea that their continued support is vital to your business.

5. Collect and Act on Customer Feedback

Loyal customers want to feel like their opinions matter. You can build a stronger relationship with your customers by actively seeking feedback and acting on it.

  • Surveys and Polls: Use Experience Cloud to send surveys or polls to gather insights on customer satisfaction, product preferences, or suggestions for improvement. Act on the feedback to show customers that their opinions are valued.
  • Feedback Loops: Keep customers informed about how their feedback is being used to improve your products or services. This builds trust and shows them that you’re committed to improving their experience.

Customers who see that their input leads to real changes are more likely to feel loyal to your brand.

6. Enhance the Mobile Experience

With more customers using mobile devices to engage with businesses, ensuring that your Experience Cloud portal is optimized for mobile is crucial for building loyalty. A seamless mobile experience makes it easier for customers to interact with your brand, whether they’re browsing products, getting support, or accessing their accounts.

  • Responsive Design: Ensure that your portal is fully responsive so it works well on any device, such as smartphones, tablets, or desktops.
  • Mobile-Optimized Features: Enable features like mobile payments, push notifications, and easy navigation to ensure that customers can interact effortlessly with your brand, even on the go.

A smooth mobile experience makes customers more likely to return to your portal, increasing long-term engagement and loyalty.

Also, visit the articles below:

]]>
https://blogs.perficient.com/2025/02/18/building-long-term-relationships-experience-cloud/feed/ 0 375937
How to Subscribe to Salesforce Reports https://blogs.perficient.com/2025/02/12/how-to-subscribe-to-salesforce-reports/ https://blogs.perficient.com/2025/02/12/how-to-subscribe-to-salesforce-reports/#respond Wed, 12 Feb 2025 09:43:17 +0000 https://blogs.perficient.com/?p=376897

Hello Trailblazers!

Salesforce Reports are a cornerstone of effective data-driven decision-making. They allow you to analyze and visualize business data efficiently. Salesforce offers a subscription feature for reports to ensure you or your team stay updated on important metrics without manually checking them. Subscribing ensures that you receive reports regularly in your email inbox, making it easy to monitor performance and trends.

In this blog, we’ll learn a step-by-step guide to subscribing to Salesforce Reports.

So stay tuned!

Before You Begin:

In the earlier sections of this Salesforce Reports series, we explored What Salesforce Reports are and the various types of Salesforce Reports. I highly recommend revisiting those sections to gain a deeper understanding and maximize your knowledge.

Why Subscribe to Salesforce Reports?

Subscribing to Salesforce Reports provides numerous benefits, including:

  1. Timely Updates: Receive reports at a frequency that suits your business needs.
  2. Automation: Eliminate the need to manually run reports.
  3. Collaboration: Share critical data with stakeholders without additional effort.
  4. Customization: Tailor subscription settings to fit your specific reporting requirements.

 

Prerequisites for Report Subscription

Before subscribing to reports in Salesforce, ensure the following:

  1. Permission to Subscribe: So verify that your profile or role includes the permission to subscribe to reports. If not, contact your Salesforce Administrator.
  2. Access to Report: So you must have view access to the report you wish to subscribe to.
  3. Email Configuration: Ensure your organization’s email settings in Salesforce are correctly configured for outbound emails.

By the end of this blog, I will have shared some images and demonstrated how you can receive automated email updates for Salesforce Reports by subscribing to them. So keep reading for all the details!

Steps to Subscribe to a Salesforce Report

Step 1: Navigate to the Reports Tab

  1. Go to the Reports tab in your Org.
  2. Locate the report you want to subscribe.

Step 2: Open the Desired Report

  1. Click on the report name to open it.
  2. So, review the report to ensure it contains the data you need.

Img1

Step 3: Click on the Subscribe Button

  1. Once you open the report, click the down arrow menu button beside the ‘Edit’ button in the top right corner.
  2. When clicked, a menu will appear.
  3. So click the Subscribe button to initiate the subscription process, as shown below.

Img2

Step 4: Configure Subscription Settings

1. Set Frequency: Choose how often you want to receive the report. So options include:

    • Daily
    • Weekly
    • Monthly

2. Select Time: Here, specify when the report email should be sent.

Img3

3. Add Conditions (Optional):

    • Define conditions for sending the report.
    • For example, “Send only if revenue is less than $10,000.”

Img4

Step 5: Add Recipients

  1. Include Yourself: By default, you will be subscribed to the report.
  2. Add Others: Add additional users, roles, or groups who should receive the report and ensure they have access to it.

Img5

Note: If you would like to learn more about how to give access of the reports to the users, then please follow the provided link.

Step 6: Save the Subscription

  1. Review the settings to ensure accuracy.
  2. Click Save to activate the subscription.

Your subscription will be visible in the “Subscribed” column, as shown below.

Img6

So, you can subscribe to Salesforce Reports.

NoteTo learn how to subscribe to Salesforce Dashboards, please explore the detailed blog post by clicking on the provided link.

Managing Report Subscriptions

  1. View Current Subscriptions

    • Navigate to the Reports tab and open the report.
    • Click on Subscribe to view and manage your existing subscription settings.
  2. Edit Subscriptions

    • Modify the frequency, time, or recipients as required.
    • Save changes to update the subscription.
  3. Unsubscribe from Reports

    • If you no longer wish to receive updates, click Unsubscribe from the subscription settings below.

Img7

Best Practices for Report Subscriptions:

  1. Optimize Frequency: Avoid overloading your inbox by choosing a frequency that matches your reporting needs.
  2. Choose Relevant Recipients: Ensure only stakeholders who need the report are included in the subscription.
  3. Define Conditions: Use filters to trigger report emails only when specific criteria are met.
  4. Test Email Delivery: Confirm that reports are delivered correctly to all recipients.

Result – How do you Receive Emails for Salesforce Reports?

So here, I demonstrate the outcome of receiving Salesforce Dashboard updates via email after subscribing to them.

Click to view slideshow.

Troubleshooting Report Subscription Issues

  1. Emails Not Received

    • Check your spam folder.
    • Verify that your email address is correctly entered in Salesforce.
    • Ensure your organization’s email server is not blocking Salesforce emails.
  2. Permission Errors

    • Contact your Salesforce Administrator to ensure you have the required permissions.
  3. Access Issues

    • Confirm that all recipients have access to the report and its underlying data.

 

Conclusion

Subscribing to Salesforce Reports is an efficient way to stay informed about your business’s performance metrics. So, by automating the delivery of reports, you save time and ensure timely decision-making. So follow the steps in this guide to set up report subscriptions and optimize your reporting workflow.

Happy Reading!

“Positivity is not about ignoring challenges; it’s about facing them with hope, resilience, and the belief that every setback is a step toward something better.”

 

Related Posts:

You Can Also Read:

 

 

]]>
https://blogs.perficient.com/2025/02/12/how-to-subscribe-to-salesforce-reports/feed/ 0 376897
The Importance of Content Moderation in Salesforce Communities https://blogs.perficient.com/2025/02/12/the-importance-of-content-moderation-in-salesforce-communities/ https://blogs.perficient.com/2025/02/12/the-importance-of-content-moderation-in-salesforce-communities/#respond Wed, 12 Feb 2025 07:39:40 +0000 https://blogs.perficient.com/?p=376175

Content moderation is a key component of online communities, ensuring the platform remains safe, respectful, and professional for all users. While enforcing rules is essential, content moderation is more than just applying penalties or removing harmful posts. It’s about creating an environment that promotes positive interaction, cooperation, and trust among community members. This is especially vital in a Salesforce Experience Cloud environment, where many users collaborate, share ideas, and engage in discussions. Effective content moderation helps maintain the platform’s integrity, safety, and tone, making it an essential tool for fostering a thriving, positive community.

Managing a large and diverse user base can be challenging. With numerous individuals sharing content, ensuring that all posts align with community values and uphold a professional standard can often be challenging. Without a robust content moderation system in place, harmful or disruptive content—such as spam, offensive language, hate speech, or misinformation—may slip through the cracks and negatively impact the overall experience. Therefore, implementing clear and effective content moderation practices is not just essential but a critical component of maintaining the credibility and success of your community.

Salesforce Experience Cloud provides various powerful moderation tools to assist community administrators in managing user-generated content (UGC). These tools are intended for both automated and manual moderation processes, allowing admins to quickly identify and address inappropriate content while still considering the context through human oversight. This balanced approach ensures a clean and safe environment for all users.

Creating Content Moderation Rules in Salesforce Experience Cloud

One of the most important features of Salesforce Experience Cloud is the ability to set up customizable content moderation rules. These rules can be tailored to fit your community’s specific needs, helping you prevent harmful content from spreading while ensuring that your platform remains a welcoming place for everyone.

Defining Keywords and Phrases

A fundamental aspect of content moderation is identifying words or phrases that may indicate harmful or inappropriate content. Salesforce allows administrators to set up keyword-based rules that automatically flag content containing specific words or phrases. This is especially useful for maintaining a professional and safe space within the community.

For example, in a business-focused community, you may want to flag posts that contain discriminatory language, hate speech, or inappropriate references to politics or religion. The keyword rules in Salesforce are highly customizable, allowing admins to set the tone and standards of the community. These keywords can be fine-tuned based on the community’s goals, ensuring that content aligns with the values you want to promote. Additionally, administrators can adjust sensitivity levels depending on the community type—public forums may have stricter rules, while private groups might allow for more flexibility.

Image Moderation

Image moderation is another essential feature in keeping the community safe and respectful. With the growing popularity of sharing photos and videos online, it is crucial to ensure that multimedia content follows the same guidelines as text-based content. Salesforce Experience Cloud uses AI tools to scan images for inappropriate content, such as explicit material, hate symbols, or violence.

AI-based image recognition is especially valuable in detecting harmful visual content that text filters may miss. For example, a post might include a seemingly harmless caption but feature an offensive or inappropriate image. With AI tools, Salesforce helps catch these violations before they are visible to other users, protecting the platform’s integrity. This feature is handy for communities heavily relying on photo-sharing or visual media, such as art communities or photography-based networks.

User Reports

While automated moderation tools are practical, they are not perfect. Users may encounter content that violates community guidelines but isn’t flagged by the system. To address this, Salesforce Experience Cloud allows community members to directly report inappropriate or harmful content. This enables users to play an active role in maintaining the community’s standards.

When a user submits a report, it is sent to the admin team or moderators for further review. This approach balances automation and human oversight, allowing administrators to assess the content in context before making decisions. The ability to report content helps keep the platform more responsive and adaptable to emerging issues.

Escalation and Manual Review

Sometimes, automated tools may flag borderline or unclear content, and context is needed to make an informed decision. In these situations, Salesforce provides an escalation process. If content is flagged by the system but the admin team is unsure whether it violates community guidelines, it can be escalated for manual review.

Community managers or moderators can assess the content’s context, make a judgment call, and determine whether it should be removed, edited, or allowed to stay. This manual review ensures that moderation is accurate and nuanced, preventing hasty decisions based on incomplete information.

Managing User Visibility in Salesforce Communities

User visibility is another critical aspect of community management. Salesforce Experience Cloud offers various tools to control how user profiles, posts, and other content are displayed to different users based on their membership level or role within the community. By setting appropriate visibility settings, admins can protect sensitive information while creating a more personalized and secure experience for community members.

Key Aspects of User Visibility

  1. Role-Based Visibility: Admins can define specific user roles, such as admin, member, or guest, and set visibility permissions based on these roles. For example, only admins can access internal discussions or restricted resources, while members or guests can only view public-facing content. This ensures that users see only the content relevant to their level of participation.
  2. Audience-Specific Content: Salesforce also allows admins to make sure content is visible to specific user groups based on their interests or participation in the community. For example, a discussion about advanced programming techniques might only be visible to users with certain expertise, ensuring they are exposed to content relevant to their interests.
  3. Privacy Settings: Salesforce Experience Cloud offers robust privacy controls, allowing users to decide who can view their profiles, posts, and personal data. This level of control enhances security, making users feel more comfortable sharing information and engaging with the community. It also helps maintain a positive, respectful atmosphere within the community.

Implementing Rate Limit Rules for Better Control

Rate limits are a powerful tool for controlling the flow of content and user activity within the community. By limiting the number of posts, comments, or interactions a user can make within a specific timeframe, admins can prevent spamming and excessive activity that could overwhelm the platform.

Setting rate limits ensures that content remains high-quality and relevant without flooding the platform with unnecessary or disruptive posts. This is particularly important for larger communities, where the risk of spam or malicious behavior is higher.

Key Benefits of Rate Limit Rules

  1. Prevents Spam: Rate limits can prevent users or bots from flooding the community with spammy content by ensuring that posts and interactions are spaced out over time.
  2. Protects Community Members: By limiting excessive interaction, rate limits help prevent aggressive behavior or bombardment of users with irrelevant posts, protecting the overall user experience.
  3. Optimizes Platform Performance: High activity volumes can strain the platform’s performance, causing lags or disruptions. Rate limits help maintain stability, ensuring that the platform functions smoothly as the community grows.

How to Set Rate Limits

  1. Define Thresholds: Set clear limits on how many posts or interactions a user can make in a given time period (e.g., no more than 10 posts per hour). This will help prevent excessive activity and ensure that content remains meaningful.
  2. Apply Limits Based on User Behavior: New users or guests might be subject to stricter rate limits, while long-term members can be given more flexibility. This helps prevent spam without discouraging genuine participation.
  3. Monitor and Adjust: Regularly assess the effectiveness of your rate limits. Adjust the thresholds to strike the right balance between preventing spam and encouraging engagement if necessary.

Also, visit the articles below:

Salesforce Documentation: Experience Cloud

Optimizing Mobile Experiences with Experience Cloud

]]>
https://blogs.perficient.com/2025/02/12/the-importance-of-content-moderation-in-salesforce-communities/feed/ 0 376175
Perficient at TDX 2025: Leading the Way in AI Innovation https://blogs.perficient.com/2025/02/11/perficient-at-tdx-2025-leading-the-way-in-ai-innovation/ https://blogs.perficient.com/2025/02/11/perficient-at-tdx-2025-leading-the-way-in-ai-innovation/#respond Tue, 11 Feb 2025 21:04:22 +0000 https://blogs.perficient.com/?p=377124

We’re heading to San Francisco—the city of innovation—for TDX 2025 on March 5-6 (and streaming on Salesforce+)!

Event Details

  • Dates: March 5-6, 2025
  • Location: Moscone West Convention Center | San Francisco and streaming on Salesforce+
  • Registration: Register here – don’t miss this agent-first innovation.

This year’s event is all about pushing the boundaries of AI innovation and Agentforce, and we can’t wait to be part of the conversation. From new advancements in automation to game-changing Salesforce technologies, we’re looking forward to learning, connecting, and bringing back insights that will shape the future.

Why Attend TDX 2025?

Reg Bootcamp 1 1

  1. Unparalleled Learning Opportunities TDX 2025 offers two full days packed with over 400 deep technical sessions and hands-on workshops. This is your chance to dive into the latest advancements in AI, learn how to build AI agents, and transform your company and career. Whether you’re an admin, developer, or architect, there’s something for everyone.
  2. Insightful Keynote Presentations Get insights from industry leaders and experts during keynote presentations. Dive head-first the future of AI and how Perficient is pioneering new solutions to help businesses thrive in the digital age. Get inspired by real-world success stories and innovative approaches.
  3. Networking with Industry Leaders TDX 2025 is the perfect opportunity to connect with like-minded professionals, industry leaders, and the Perficient team, including Craig Isakson, Director, and Anthony Turley, Technical Consultant.
  4. Agentforce: The AI Agents Era The AI agents era is here, and Agentforce is leading the way. Be an Agentblazer and dive into Agentforce with two full days of immersive learning. Learn how to build agents and see firsthand how they can upgrade business operations.
  5. Exciting Celebrations and Networking Events TDX is not just about learning—it’s also about having fun! Don’t miss the celebrations, networking events, and an epic concert. It’s a great way to unwind and enjoy the vibrant atmosphere of the conference.

Meet Our Experts:

Our team of experts will be available for meetings throughout the event. Don’t miss the chance to connect with:

Want to learn more about Agentforce before TDX? Check out the following resources: 

Perficient’s Agentforce Resource Center: Agentforce revolutionizes operations by enhancing workflows, boosting team productivity, and driving customer satisfaction.

Revolutionizing Customer Engagement with Salesforce AIDiscover how Perficient is integrating AI with Salesforce to deliver cutting-edge solutions.

Perficient Joins Salesforce’s Agentforce Partner NetworkLearn about Perficient’s addition to the Agentforce Partner Network, a groundbreaking ecosystem introduced by Salesforce. This network is designed to revolutionize how businesses leverage AI agents to enhance customer success and operational efficiency.

Perficient + Salesforce 

Perficient is part of the Agentforce Partner Network and your go-to partner for a smooth and successful rollout of Agentforce solutions — backed by Data Cloud expert-level knowledge.

Can’t Make TDX?

Schedule some time with us and let our experts fill you in. And stay tuned to our Salesforce blog  for all our post-conference insights.

]]>
https://blogs.perficient.com/2025/02/11/perficient-at-tdx-2025-leading-the-way-in-ai-innovation/feed/ 0 377124
Cracking the Code: How Salesforce Handles Data, Files, and Big Objects https://blogs.perficient.com/2025/02/11/cracking-the-code-how-salesforce-handles-data-files-and-big-objects/ https://blogs.perficient.com/2025/02/11/cracking-the-code-how-salesforce-handles-data-files-and-big-objects/#respond Tue, 11 Feb 2025 07:23:10 +0000 https://blogs.perficient.com/?p=376725

Imagine you just started using Salesforce, and your manager asks you, “How much data can we store in Salesforce?” You open your laptop, search through Salesforce documentation, and suddenly feel overwhelmed by terms like data storage, file storage, and big objects. Don’t worry! In this blog, let’s break down the types of storage in Salesforce in a way that’s easy to understand.

Understanding Storage in Salesforce

Types Of Storage In Salesforce A Beginner’s Guide Visual Selection (1)

Salesforce is like a massive cloud-based warehouse storing all your business information. Just like a warehouse has different sections for different types of goods, Salesforce has various types of storage for various kinds of data. Broadly, Salesforce provides two main types of storage:

  • Data Storage – Stores records like Accounts, Contacts, Leads, and Opportunities.
  • File Storage – Stores files like attachments, documents, and images.

Salesforce also offers Big Objects to efficiently handle large volumes of historical or archival data. Let’s examine each one in detail.

1. Data Storage: Where Your Records Live

Think of Data Storage as a filing cabinet storing all your business records. Whenever you create a new Account, Contact, Lead, Case, or Custom Object Record, it occupies some space in Salesforce’s data storage.

How Much Space Does a Record Take?

Each record in Salesforce takes up a small amount of storage. Here’s an approximate breakdown:

  • A standard record (like Account, Contact, or Lead) takes around 2 KB.
  • A Campaign record can take up 8 KB because it holds more data.
  • Email messages and case-related records consume more space due to attachments.

How is Data Storage Allocated?

Salesforce provides storage based on the edition you are using:

  • Enterprise & Unlimited Editions: 10 GB + 20 MB per user.
  • Professional & Essentials Editions: 10 GB fixed.
  • Developer Edition: 5 MB (very limited, mainly for testing).

Pro Tip: If your organization runs out of data storage, you can purchase additional storage or optimize your existing records by archiving old data.

2. File Storage: Storing Attachments and Documents

Imagine you receive an email from a client with a contract document and upload it to Salesforce under an Opportunity record. Where does this file go? It’s stored in File Storage.

What is Stored in File Storage?

  • Attachments (old method, now replaced by Files).
  • Chatter Files (Feed Attachments).
  • Documents (inside Salesforce CRM Content, Libraries).
  • User Photos & Logos.

How is File Storage Allocated?

Similar to data storage, file storage also depends on the edition:

  • Enterprise & Unlimited Editions: 10 GB + 2 GB per user.
  • Professional & Essentials Editions: 10 GB fixed.
  • Developer Edition: 20 MB (very limited, just for testing).

Pro Tip: Instead of storing large files directly in Salesforce, use external storage options like Google Drive, SharePoint, or AWS S3 and link them to Salesforce using external services.

3. Big Objects: Handling Massive Amounts of Data

What if you need to store millions of records for compliance, analytics, or reporting? That’s where Big Objects come into play. Big Objects allow you to store billions of records without consuming standard data storage limits.

Key Features of Big Objects:

  • Used for historical data storage (e.g., old transactions, logs, audit records).
  • Provides high performance for querying large datasets.
  • Doesn’t count against normal data storage limits.

Pro Tip: Use Async SOQL to query Big Objects efficiently.

How to Manage and Optimize Storage in Salesforce?

Now that you understand the different types of storage, let’s talk about how to manage and optimize it:

  • Regularly Archive Old Data: Use Salesforce’s data export features to back up and remove outdated records.
  • Leverage External Storage: Store non-critical files on third-party cloud services.
  • Use Big Objects for Large Datasets: Instead of overloading standard data storage, move historical data to Big Objects.
  • Monitor Storage Usage: Go to Setup → Storage Usage to track how much space your organization consumes.
  • Enable Field History Retention Policies: To save space, define retention limits instead of permanently storing every field change.

Final Thoughts

Storage in Salesforce might initially seem complex, but it’s pretty simple once you understand the basics. Just remember:

  • Data Storage holds records like Accounts, Contacts, and Leads.
  • File Storage holds attachments, images, and documents.
  • Big Objects handle massive datasets efficiently.

By managing storage wisely, you can keep your Salesforce org running smoothly while avoiding unnecessary costs. Next time your manager asks about storage, you’ll have a confident answer ready!

Got any questions? Drop them in the comments below! 

]]>
https://blogs.perficient.com/2025/02/11/cracking-the-code-how-salesforce-handles-data-files-and-big-objects/feed/ 0 376725
Understanding Salesforce Push Topics: Real-Time Data Streaming Made Simple https://blogs.perficient.com/2025/02/09/understanding-salesforce-push-topics-real-time-data-streaming-made-simple/ https://blogs.perficient.com/2025/02/09/understanding-salesforce-push-topics-real-time-data-streaming-made-simple/#respond Sun, 09 Feb 2025 13:13:59 +0000 https://blogs.perficient.com/?p=376789

As a Salesforce developer with years of experience implementing real-time solutions, I’ve found Push Topics one of the Salesforce ecosystem’s most powerful yet underutilized features. Today, I’ll explore Push Topics, explaining what they are, how they work, and why they might be the solution you’ve been looking for.

What are Push Topics?

Push Topics in Salesforce are configurations that define which record changes you want to monitor in real time. Think of them as sophisticated listeners who watch for specific data changes in your Salesforce org and notify connected clients immediately when those changes occur.

What is the Streaming API?

The Streaming API facilitates real-time data flow from the Salesforce platform to clients. It operates on push-based communication, where the server initiates data delivery to the client. This approach, known as Push Technology or the publish/subscribe model, allows information to be sent as soon as it’s available. Tools like CometD and subscription APIs in Node.js or MuleSoft are commonly used. CometD ensures that the server pushes updates to the client while maintaining a persistent connection.

Streaminapi Push Topic

 

Key Terminology

  • Push Topic:  A custom object that defines what data you want to monitor through a SOQL query.
  • Streaming API: The underlying API that powers Push Topics
  • CometD: The protocol used for the publish-subscribe messaging pattern
  • Channel: A virtual communication path where messages are published
  • Subscriber: A client application that listens for Push Topic notifications

 

Notification Flow

 

How Push Topics Work

The workflow of Push Topics follows these steps:

  1. A Push Topic is created with a SOQL query defining what to monitor
  2. Client applications subscribe to the Push Topic’s channel
  3. When matching records are created/updated/deleted, Salesforce generates a notification
  4. Subscribers receive these notifications in real-time through the Streaming API

Building Your First Push Topic

Let’s create a Push Topic that monitors high-value opportunities:

PushTopic pushTopic = new PushTopic();
pushTopic.Name = 'HighValueOpportunities';
pushTopic.Query = 'SELECT Id, Name, Amount, StageName FROM Opportunity WHERE Amount > 100000';
pushTopic.ApiVersion = 62.0;
pushTopic.NotifyForOperationCreate = true;
pushTopic.NotifyForOperationUpdate = true;
pushTopic.NotifyForOperationDelete = true;
pushTopic.NotifyForOperationUndelete = true;
insert pushTopic;

Advantages Of Push Topics

  1. Real-Time Processing

      • Unlike scheduled batch jobs, Push Topics provide immediate notifications.
      • Reduces system load compared to polling-based solutions.
  2. Scalability

      • Handles large volumes of changes efficiently.
      • Supports multiple subscribers simultaneously.
  3. Flexibility

      • Customizable queries allow precise monitoring.
      • Supports multiple object types and complex conditions.
  4. Resource Efficiency

      • Uses server-side events instead of client-side polling.
      • Reduces API call consumption.

Limitations and Considerations

While powerful, Push Topics do have some limitations:

  1. Query Restrictions

      • Maximum of 20 fields in the SELECT clause.
      • No LIMIT clause allowed.
      • No aggregate functions are supported.
  2. Performance Boundaries

      • Maximum of 100 Push Topics per org.
      • Notifications might have slight delays during high load.
      • 2KB size limit for each notification payload.
  3. Monitoring Constraints

      • Cannot monitor all object types.
      • Some field types aren’t supported (like rich text areas).

Best Practices for Push Topics

  1. Query Optimization

      • Use selective filters to reduce unnecessary notifications
      • Include only essential fields in the query
      • Consider indexing fields used in WHERE clauses
  2. Error Handling

      • Implement robust reconnection logic in clients
      • Handle notification delivery failures gracefully
      • Log and monitor subscription status
  3. Security

      • Review field-level security settings
      • Implement proper authentication in client applications
      • Regularly audit Push Topic configurations

Conclusion 

Push Topics represent a powerful tool in the Salesforce developer’s arsenal for building real-time applications. While they have limitations, their benefits often outweigh the constraints for many use cases. Following best practices and understanding the limitations, you can leverage Push Topics to create robust, real-time solutions that enhance your Salesforce implementation.

Final Tips

  • Start with a proof of concept to validate your use case
  • Monitor performance impacts carefully
  • Document your Push Topic configurations
  • Plan for scalability from the beginning
  • Keep security considerations at the forefront

Remember, Push Topics is just one tool in the streaming architecture toolkit. Evaluate your specific needs and consider combining them with other technologies, such as Platform Events or Change Data Capture, for comprehensive real-time solutions.

Stay tuned for our next blog to explore Change Data Capture and discuss practical solutions for effectively implementing it.

]]>
https://blogs.perficient.com/2025/02/09/understanding-salesforce-push-topics-real-time-data-streaming-made-simple/feed/ 0 376789
Salesforce Connect: Bridging External Data with Salesforce https://blogs.perficient.com/2025/02/05/salesforce-connect-bridging-external-data-with-salesforce/ https://blogs.perficient.com/2025/02/05/salesforce-connect-bridging-external-data-with-salesforce/#respond Wed, 05 Feb 2025 06:26:27 +0000 https://blogs.perficient.com/?p=376742

In this blog, we delve into Salesforce Connect, an innovative solution for seamlessly integrating external data into the Salesforce ecosystem without the need for data duplication. By enabling real-time data access, you will explore how Salesforce Connect bridges the gap between Salesforce and external systems like legacy databases and ERP systems. This blog provides a detailed understanding of its workings, including the use of External Objects and protocols like OData, REST, and SOAP. Additionally, it highlights the advantages, such as real-time data availability, cost efficiency, and enhanced scalability, while shedding light on key limitations like performance overhead and query restrictions. Whether you’re considering Salesforce Connect for external integrations or evaluating its subset, Lightning Connect, this blog equips you with the insights needed to make informed decisions about unifying your data landscape.

Salesforceconnectarchite

Salesforce Connect is a powerful tool within the Salesforce ecosystem that allows businesses to seamlessly integrate external data sources into their Salesforce environment without the need for complex data replication. It is particularly beneficial for organizations that rely on multiple data systems and want real-time access to external data within their Salesforce applications.

What is Salesforce Connect?

Salesforce Connect enables organizations to directly integrate data stored in external systems, such as legacy databases, enterprise resource planning (ERP) systems, or third-party applications, into Salesforce. Instead of copying data into Salesforce, it establishes a live connection, allowing users to view and interact with external data as if native to Salesforce.

With Salesforce Connect, external data appears in Salesforce as External Objects, which function similarly to standard Salesforce objects. These objects allow users to create relationships, run reports, and build workflows without physically storing the external data in Salesforce.

How Does Salesforce Connect Work?

Salesforceconnectflow

Salesforce Connect operates through the Open Data Protocol (OData), an industry standard for integrating data. Here’s how it works:

  • Establish a Connection: Salesforce Connect connects to an external system using an external data source configuration. This is typically done using OData, REST, or SOAP protocols.
  • Define External Objects: Once connected, Salesforce retrieves metadata about external data and maps it into External Objects within Salesforce. These objects act as virtual representations of the external data.
  • Access External Data in Real Time: Salesforce lets users view, query, and interact directly with external data. Thus, operations like creating relationships, building custom user interfaces or incorporating external data into reports become possible without data duplication.
  • Authentication and Security: Salesforce Connect supports multiple authentication methods, such as OAuth, to ensure secure communication between Salesforce and the external system.

Benefits of Using Salesforce Connect

Salesforce Connect offers several advantages that make it a compelling choice for businesses:

  • Real-Time Access: Data is accessed in real-time, ensuring that users always work with the most up-to-date information.
  • No Data Duplication: Avoid the need to copy or synchronize external data into Salesforce, reducing storage costs and minimizing data management complexities.
  • Streamlined Processes: Integrate external data into Salesforce workflows, automation, and reporting to enhance productivity and operational efficiency.
  • Scalability: It can connect to various external systems, whether on-premises or cloud-based, without extensive development efforts.
  • Cost Efficiency: Salesforce Connect can lower operational costs by reducing data storage requirements and eliminating the need for custom integration development.

How Much Does Salesforce Connect Cost?

The cost of Salesforce Connect varies depending on your edition and specific integration requirements. Generally, it is available as an add-on feature, with pricing based on the number of external objects and the data source type. Businesses should consult Salesforce for a tailored pricing structure based on their use case.

 

Differences Between Salesforce Connect and Lightning Connect

Sfconnectvslightningconnect

While the terms “Salesforce Connect” and “Lightning Connect” are sometimes used interchangeably, they have distinct connotations:

  • Salesforce Connect: Refers to the broader integration framework that supports connecting Salesforce with various external systems using OData, REST, or SOAP protocols.
  • Lightning Connect: A specific feature within Salesforce Connect that focuses exclusively on OData-based integrations. Lightning Connect is ideal for real-time integration scenarios where external data needs to be accessed and displayed dynamically in Salesforce.
    • Lightning Connect is a subset of Salesforce Connect, tailored for high-performance, OData-based integrations.

 

Key Limitations of Salesforce Connect

Performance Overhead

  • Salesforce Connect creates real-time API callouts for external data access
  • Frequent data retrievals can lead to slower system performance and potential API call limits
  • Complex queries across multiple external systems may experience significant latency

Data Synchronization Challenges

  • Not a true real-time synchronization mechanism
  • External object data is fetched on-demand, which can create potential data inconsistency
  • Complex scenarios might require additional middleware or integration strategies

Authentication and Security Complexity

  • Requires careful configuration of external authentication mechanisms
  • Complex security models can complicate access controls between Salesforce and external systems
  • Potential exposure of sensitive data if integration points are not adequately secured

Limited Query Capabilities

  • Restricted support for advanced query operations on external objects
  • Some complex joins or filtering might not be fully supported
  • Performance can degrade with complex query requirements
  • Licensing and Cost Considerations
  • Additional Salesforce Connect licenses required
  • Potential extra costs for API calls and data retrieval
  • May incur higher expenses compared to traditional data integration method

Conclusion

Salesforce Connect is a game-changing solution for organizations looking to unify their data landscape without the complexity of replication. Providing real-time access to external systems empowers businesses to make informed decisions, streamline operations, and improve productivity. Whether leveraging Lightning Connect for OData integrations or exploring other protocols, Salesforce Connect ensures seamless connectivity and enhanced data accessibility for your organization.

Stay tuned for our next blog to explore real-world scenarios of Salesforce Connect in action and discuss practical solutions for effectively implementing it.

]]>
https://blogs.perficient.com/2025/02/05/salesforce-connect-bridging-external-data-with-salesforce/feed/ 0 376742
Leveraging Data Cloud Data in Your Agentforce Agent https://blogs.perficient.com/2025/02/03/leveraging-data-cloud-data-in-your-agentforce-agent/ https://blogs.perficient.com/2025/02/03/leveraging-data-cloud-data-in-your-agentforce-agent/#comments Mon, 03 Feb 2025 16:13:03 +0000 https://blogs.perficient.com/?p=376664

One of the powers of Data Cloud is the way that it can unlock ‘trapped’ data.  Let’s say that you had a large set of data like VIN (Vehicle Identification Number) numbers that you did not want to put in your Sales Cloud because of row storage limits, but you really wanted to use that data as part of a new Agent you were building in Agentforce.   This is an example of where Data Cloud will give you a place to store those VIN numbers and make it very easy to query and leverage that VIN data through an Action tied to your Agent.

The amazing part of this is that this can all be done now with ‘No Code’.  We will leverage Flows in Sales Cloud and the ability of an Action in Agentforce to use that Data Cloud data retrieved through a Flow.

First a couple of demo screens from my Agent…

  1. I want to ask my Agent for details about a specific VIN like Description, Make, Model and Year.  That data is stored in Data Cloud.  So I ‘prompt’ my Agent with this sentence:  ‘Can you get me the details for a VIN?’
    Af1
  2. My agent recognizes what I am asking for and gives me some properly formatted responses so I can ask for the details about my VIN number.
    Af2
  3. So now I type in my response with my VIN as it suggested.
    Af3
  4. Wow!  I got back the details about my VIN number that are stored in Data Cloud.  These details included a Description, Make, Model and Year.
    Af4

Now, how did Agentforce do that?

It is really pretty amazing how much of the above demo is simply Agentforce doing ‘what it does’.  My extra part is adding a new Action to extend my Agent from Data Cloud.

So let’s go through those pieces…

  1. We first need to get the data into Data Cloud into a ‘Data Model Object’.  It cannot just get to a ‘Data Lake Object’ (DLO), but has to also be mapped onto a ‘Data Model Object’ (DMO).   The ‘GetRecords’ in the Flow that we will use later cannot query a DLO, but only a DMO.  This will involve creating a Data Lake Object, a Data Model Object and the associated Data Stream for pulling the VIN data in.
    1. Here is one way to move data into Data Cloud from Sales Cloud using ‘No Code’, but with our use case above we would probably be using a noETL option to load such a large dataset into Data Cloud from something like Snowflake or Databricks.
    2. Here is my DMO and the associated VIN data being shown in the ‘Data Explorer’.
      Af5
    3. Now the data is loaded in Data Cloud and is ready to be used.
  2. We need to create a new Action with proper Instructions that is tied to our Flow that will get the data from Data Cloud.
  3. Create a new ‘Start from Scratch’, ‘Autolaunched Flow (No Trigger)’.
    Af6
  4. We can build a Flow as simple as this to make the data available for our Agent.
    Af7
  5. The GetRecords can query our Data Cloud DMO that we created above by configuring it like so…
    Af8
    Af8
  6. But where did that ‘VIN_Number’ variable come from?  We do need to create a variable in the Flow that is needed for ‘Input’ like this with the ‘Available for input’ being checked…
    Af9
  7. We will tie that Input variable to out Action later. 🙂
  8. Now we will do a ‘Decision’ to make sure our ‘GetRecords’ actual found something…
    Af10
  9. Now I need to create some ‘Output’ variables to return this data back to my Action.  Make sure the ‘Available for Output’ checkbox gets selected for each variable.
    Af11
    Af12
  10. Finally in an ‘Assignment’ set all of these Output variables…
    Af13
  11. I did try to work out some formatting issues as I was working through this.  My ‘Year’ kept coming back as 2,019 with a comma in it since it was a number.  So one solution I did was to create a formula in the flow to convert it to being text.   That seemed to work fine…
    Af14
  12. I also tried originally to have my Output variable be a custom object in Sales Cloud so that I did not have so many output variables.  That did not work well because when Agentforce was trying to show the output of an Object like that it needed a Salesforce ID to display it.  So I just went back to individual variables which worked well.
  13. Go ahead and Save and Activate your Flow.
  14. Now we need to tie this Flow to an Action in Agentforce.
  15. In Setup go to ‘Agent Actions’ and choose ‘New Agent Action’.
    1. Choose ‘Flow’ for the ‘Reference Action Type’
    2. Choose your ‘Reference Action’ which is the new Flow you just created.
    3. Give it an understandable ‘Agent Action Label’ and ‘Agent Action API Name’
    4. Click on ‘Next’
      Af15
    5. Now the ‘Input’ and ‘Output’ variables from our Flow come into play.  We need to configure our new ‘Agent Action’ with Instructions at the ‘Action’ level and also Instructions for each ‘Input’ and ‘Output’ item.   It can look like this…
      Af16
      Af17
      Af18
    6. Make sure you select ‘Require Input’ and ‘Collect data from user’ for the Input Variable.
    7. Make sure you select ‘Show in conversation’ for the Output variable.
    8. Click on Finish
  16. Now we need to add our new Action to the Agent.
    1. In Setup go to ‘Agents’
    2. In the drop-down at the end of the row for your ‘Agent Name’ click on ‘Open in Builder’
      Af19
    3. Deactivate your Agent with the button in the top right corner.
      Af20
    4. Then click on ‘New’, ‘New Topic’ under the Topic Details section because we have to add a new Topic.
    5. Fill out the ‘Create a Topic’ page…
      Af21
      Af22
    6. Click on Next
    7. Select your Flow and click on Finish
      Af23
    8. Now we need to add the new Topic to the Agent.  Again make sure your Agent is de-activated.
    9. On the ‘Topic Details’ tab click on the ‘New’ drop-down and select ‘Add from Asset Library’
    10. Select the Topic you just created and click on ‘Finish’
    11. Do some testing in ‘Agent Builder’ to make sure your Agent is doing what you want it to do.
    12. Activate your Agent.

All of that above was ‘No Code’!

While all of that above was a good number of steps, there really is not a ton of work and there was ‘No Code’.  Agent Builder and building Actions and Topics is new, but it really is pretty simple configuration.  I think the hardest part will be learning how to write really great ‘Instructions’ for these new Topics and Actions so they are leveraged appropriately when the Agent runs.  The skill set related to being a ‘Prompt Engineer’ is become more important every day.

Leveraging Data Cloud data is not required for your first Agentforce implementation.  Data Cloud has to exist but you would not have to be pulling data out of Data Cloud on day 1.  The above solution could be just as well implemented by making an API call through Apex exposing the same VIN data.

Hopefully the above shows you that Salesforce has put together the pieces to make this easy for you to do.

If you are brainstorming about use cases for Agentforce, please read on with this blog post from my colleague Darshan Kukde!

If you want a demo of this in action or want to go deeper please reach out and connect!

 

]]>
https://blogs.perficient.com/2025/02/03/leveraging-data-cloud-data-in-your-agentforce-agent/feed/ 8 376664
Apex Security Best Practices for Salesforce Applications https://blogs.perficient.com/2025/02/02/apex-security-practices-building-secure-salesforce-applications/ https://blogs.perficient.com/2025/02/02/apex-security-practices-building-secure-salesforce-applications/#respond Mon, 03 Feb 2025 05:51:18 +0000 https://blogs.perficient.com/?p=373874

As businesses increasingly rely on Salesforce to manage their critical data, ensuring data security has become more important than ever. Apex, Salesforce’s proprietary programming language, runs in system mode by default, bypassing object- and field-level security. To protect sensitive data, developers need to enforce strict security measures.

This blog will explore Apex security best practices, including enforcing sharing rules, field-level permissions, and user access enforcement to protect your Salesforce data.

Why Apex Security is Critical for Your Salesforce Applications

Apex’s ability to bypass security settings puts the onus on developers to implement proper Salesforce security practices. Without these protections, your Salesforce application might unintentionally expose sensitive data to unauthorized users.

By following best practices such as enforcing sharing rules, validating inputs, and using security-enforced SOQL queries, you can significantly reduce the risk of data breaches and ensure your app adheres to the platform’s security standards.

Enforcing Sharing Rules in Apex to Maintain Data Security

Sharing rules are central to controlling data access in Salesforce. Apex doesn’t automatically respect these sharing rules unless explicitly instructed to do so. Here’s how to enforce them in your Apex code:

Using with sharing in Apex Classes

  • with sharing: Ensures the current user’s sharing settings are enforced, preventing unauthorized access to records.
  • without sharing: Ignores sharing rules and is often used for administrative tasks or system-level operations where access should not be restricted.
  • inherited sharing: Inherits sharing settings from the calling class.

Best Practice: Always use with sharing unless you explicitly need to override sharing rules for specific use cases. This ensures your code complies with Salesforce security standards.

Example

public class AccountHandlerWithSharing {
    public void fetchAccounts() {
        // Ensures that sharing settings are respected
        List<Account> accounts = [SELECT Id, Name FROM Account];
    }
}
public class AccountHandlerWithoutSharing {
    public void fetchAccounts() {
        // Ignores sharing settings and returns all records
        List<Account> accounts = [SELECT Id, Name FROM Account];
    }
}

Enforcing Object and Field-Level Permissions in Apex

Apex operates in a system context by default, bypassing object- and field-level security. You must manually enforce these security measures to ensure your code respects user access rights.

Using WITH SECURITY_ENFORCED in SOQL Queries

The WITH SECURITY_ENFORCED keyword ensures that Salesforce performs a permission check on fields and objects in your SOQL query, ensuring that only accessible data is returned.

Example

List<Account> accounts = [
    SELECT Id, Name
    FROM Account
    WHERE Industry = 'Technology'
    WITH SECURITY_ENFORCED
];

This approach guarantees that only fields and objects the current user can access are returned in your query results.

Using the stripInaccessible Method to Filter Inaccessible Data

Salesforce provides the stripInaccessible method, which removes inaccessible fields or relationships from query results. It also helps prevent runtime errors by ensuring no inaccessible fields are used in DML operations.

Example

Account acc = [SELECT Id, Name FROM Account LIMIT 1];
Account sanitizedAcc = (Account) Security.stripInaccessible(AccessType.READABLE, acc);

Using stripInaccessible ensures that any fields or relationships the user cannot access are stripped out of the Account record before any further processing.

Apex Managed Sharing: Programmatically Share Records

Apex Managed Sharing can be a powerful tool when you need to manage record access dynamically. This feature allows developers to programmatically share records with specific users or groups.

Example

public void shareRecord(Id recordId, Id userId) {
    CustomObject__Share share = new CustomObject__Share();
    share.ParentId = recordId;
    share.UserOrGroupId = userId;
    share.AccessLevel = 'Edit'; // Options: 'Read', 'Edit', or 'All'
    insert share;
}

This code lets you share a custom object record with a specific user and grant them Edit access. Apex Managed Sharing allows more flexible, dynamic record-sharing controls.

Security Tips for Apex and Lightning Development

Here are some critical tips for improving security in your Apex and Lightning applications:

Avoid Hardcoding IDs

Hardcoding Salesforce IDs, such as record IDs or profile IDs, can introduce security vulnerabilities and reduce code flexibility. Use dynamic retrieval to retrieve IDs, and consider using Custom Settings or Custom Metadata for more flexible and secure configurations.

Validate User Inputs to Prevent Security Threats

It is essential to sanitize all user inputs to prevent threats like SOQL injection and Cross-Site Scripting (XSS). Always use parameterized queries and escape characters where necessary.

Use stripInaccessible in DML Operations

To prevent processing inaccessible fields, always use the stripInaccessible method when handling records containing fields restricted by user permissions.

Review Sharing Contexts to Ensure Data Security

Ensure you use the correct sharing context for each class or trigger. Avoid granting unnecessary access by using with sharing for most of your classes.

Write Test Methods to Simulate User Permissions

Writing tests that simulate various user roles using System.runAs() is crucial to ensure your code respects sharing rules, field-level permissions, and other security settings.

Conclusion: Enhancing Salesforce Security with Apex

Implementing Apex security best practices is essential to protect your Salesforce data. Whether you are enforcing sharing rules, respecting field-level permissions, or programmatically managing record sharing, these practices help ensure that only authorized users can access sensitive data.

When building your Salesforce applications, always prioritize security by:

  • Using with sharing where possible.
  • Implementing security-enforced queries.
  • Tools like stripInaccessible can be used to filter out inaccessible fields.

By adhering to these practices, you can build secure Salesforce applications that meet business requirements and ensure data integrity and compliance.

Further Reading on Salesforce Security

]]>
https://blogs.perficient.com/2025/02/02/apex-security-practices-building-secure-salesforce-applications/feed/ 0 373874