Saturday, 31 May 2025

Agents vs Prompt Templates

 Here's a quick breakdown to help you make the right call 💡

 🔹 𝐀𝐠𝐞𝐧𝐭𝐬: Autonomous, Context Aware, Action Oriented

 🔹 𝐏𝐫𝐨𝐦𝐩𝐭 𝐓𝐞𝐦𝐩𝐥𝐚𝐭𝐞𝐬: Fast, Focused, Stateless


🔹 𝐀𝐠𝐞𝐧𝐭𝐬: 

Agents are like AI project managers they think, reason and act based on evolving context.


𝐁𝐞𝐬𝐭 𝐮𝐬𝐞𝐝 𝐰𝐡𝐞𝐧:

↳ The Context is dynamic

↳ Multi step reasoning is required

↳ AI needs to make decisions or take action

↳ There’s a need for external API calls or workflow automation


🛠️ 𝐔𝐬𝐞 𝐂𝐚𝐬𝐞𝐬:

↳ Multi-step appointment scheduling 🗓️

↳ Drafting dynamic, data-rich customer responses 💬

↳ Troubleshooting via API-triggered workflows ⚙️


Agents are stateful, meaning they remember past steps and adjust based on new data, a powerful tool for orchestrating complex logic with AI.


------------

🔹 𝐏𝐫𝐨𝐦𝐩𝐭 𝐓𝐞𝐦𝐩𝐥𝐚𝐭𝐞𝐬:

Think of prompt templates like laser focused AI assistants, perfect for single turn interactions where you just need one output based on structured data.


𝐁𝐞𝐬𝐭 𝐮𝐬𝐞𝐝 𝐰𝐡𝐞𝐧:

↳ The business context is clear and stable

↳ The task focused and well defined, like summarizing a case or rewriting a sentence

↳ The desired output is predictable, not deterministic

↳ Multi step reasoning is not required


🛠️ 𝐔𝐬𝐞 𝐂𝐚𝐬𝐞𝐬:

↳ Case note summaries 📝

↳ Templated email replies 📧

↳ Meeting note generation 🗓️

↳ Next best action suggestions 🎯


Built in Prompt Builder, these templates securely access Salesforce data via data graphs, RAG, and predefined fields—all while staying inside the Trust Layer

Product Catalog Management

 Key features of Product Catalog Management


1.Catalogs

2.Dynamic Attributes

3.Product Classifications 

4.Products

5.Qualification Rules


Product catalog management allows you to structure your product data by creating catalogs, categories and subcategories.


Ex : Think of this as organizing a library: your catalog is a bookshelf, categories are the shelves, and subcategories are the actions within those shelves.


This structured approach simplifies product management and keeps everything in order.


Catalogs :


Catalogs organize products by category and allow for easy browsing.


Catalogs are an important part of managing product data and ensuring that customers can easily find what they are looking for.


A catalog is a collection of the products that you sell, organized into categories for easier discoverability.


You must create a catalog before you create catalog categories and assign products to the categories.


Categories and Subcategories :


Organize and group products in your catalog by creating catalog categories and catalog subcategories.


Assign products to more than one catalog category and sub category.


2.Dynamic Attributes


Attribute : 


Attributes are the characteristics or properties of products and product classifications.They can be various data types like text, number, date, datetime, checkbox,picklist,currency and percent.


Picklist :


Picklists represent all possible values for such attributes, and users choose one of these values when purchasing a product.You must define picklists before creating attributes of the data type pick list.


Attribute category :


You can group attributes into logical groups called attribute categories.


Attribute categories help users easily find and use the right attributes when they create product classifications.


You can assign attributes individually or through an attribute category to product classifications.


 Product : 

A product is service or goods that a company offers to sell.


Product Classification :


A product classification is a template that you can use to quickly define and create products.


Product classification hold a collection of dynamic attributes. Product classifications can be reused to create multiple products that are similar yet different.


Product Selling model :


Product selling models define how you sell products.The models can be one time , term-defined or evergreen.

Tuesday, 27 May 2025

create a user without querying the ProfileId



Create a Salesforce User without Querying the Profile Id

ex:

 User user= new User(

LastName=‘Some Last Name’,

Alias = ‘ Some Alias’,

Profile = new Profile (Name =‘Standard User’), // <== idLookup

Username=‘SomeUserName@someemail.com’,

Email=‘SomeEmail@someemail.com’,

TimeZoneSidkey=‘America/Los_Angeles’,

LocalSidKey=‘en_US’,

EmailEncodingKey=‘UTF-8’,

LanguageLocalKey=‘en_US’

);


Insert user;



Saturday, 24 May 2025

Revenue Cloud - Troubleshooting common issues

 1.Pricing miscalculations :

—> Double-check discount schedules and ensure price books are active.

—> Make sure to refresh the Pricing Decision table.

—> Turn on Price Logs Capture, and open ‘Pricing Operations Console’ to view pricing debug logs.


2.Error Logging 


—> Enable debug logs in Salesforce to pinpoint errors quickly.

—> Check Revenue Transaction Error Log (RTEL) object associated to the appropriate sobject for the failures.


3.Product not visible in Browse Catalog :


—> Product Discovery settings has right pricing procedure and context definition.

—> Pricebook selected on the quote has the PBEs for the product. In case of multiple Pricebooks, one price book might not have that product.

—> Sync Pricing Data


4.Syncing, refreshing and activating 


—> Make sure that Context Definition is synced.

—> Make sure to refresh DTs after any update.

—> All rules intended to be applied are active. 

RCA (Revenue Cloud Advanced) vs RCB (Revenue cloud Billing) in revenue cloud

Revenue Cloud has two Licenses.


1.Revenue Cloud Advanced (RCA)

2.Revenue Cloud Billing (RCB) 

Decide if you need Revenue cloud Advanced or Revenue Cloud Billing for your Billing needs.




Use Billing Guided Setup :


Guided setup makes onboarding quick and easy for new Billing Admins with a clear order of steps to be followed.


Milestone Billing :


Billed in installments that are triggered on milestone accomplishment, or on predefined dates that indicate incremental progress on the ordered product or service.


Increased customer satisfaction by aligning receivables to progress.


Enhanced project accountability & traceability.


Legal Entity :


Note : Use Legal Entities to represent your organization structure.


1.Create Legal Entity records for each operating business unit.

2.Set an Org Default Legal Entity.

3.Define Billing Treatment and Tax Treatments for each Legal Entity.

4.Use the Legal Entity reference field on Orders,Invoices and Credit Memos.


Impact : 

1.Revenue transactions are processed according to the Legal Entity assigned.

2.Billing, taxation and compliance are handled based on entity-specific treatment rules.

Context Service in RLM

 Context Service :


Note : If you add a custom field to the context , it will flow through the quote, orders, contracts etc.


Tip : Extend Sales Transaction Context to map custom fields.


1.Avoid cloning and then extending Sales Transaction Context.

2.Extend the OOTB Sales Transaction Context directly to create your own custom definition,Add necessary custom mappings and then activate your definition.


Context Services is a layer which listens to the data request sent by application and loads all necessary data onto itself and distributes the required data to specific processes to satisfy the request from application.


How to design Context Services ?


Define Context Definitions :


Context Definition is the set of information which includes nodes, attributes, context tags and mappings.

Node is the user defined container/object which includes attributes (Also referred as fields) mapped to real data by mapping.Nodes and attributes in the nodes require Context Tags to query data from the context definition by consuming application.


Mapping also refer as Context mapping is the next step in defining Context Definition. Mapping of Nodes and its attribute to the input data source are called context mapping.Typically , input data source is salesforce objects in context of RLM.


Use Context Service in a Flow or Procedure :


Defining the screen flow or procedure is the most common way to use Context Services. Context Services must be active to use in either Flow or Procedure.

Salesforce Integration Patterns

 


Friday, 16 May 2025

Revenue Cloud Advanced

 


—> Salesforce’s next-gen iteration of Configure,Price,Quote (CPQ) solution.

—> Unified platform for Quote-to-Revenue lifecycle.

—> Combines the best of Salesforce CPQ (Steelbrick) and Industries CPQ (Velocity/Omnistudio).

—> Fully composable, Scable and API-first architecture.

—> Built on Core Platform (no installed packages).


1.Unified Product-to-Cash Platform.

2.Entire revenue lifecycle, from sales to billing.

3.Holistic revenue management.

3.Natively built on Salesforce Platform.

4.Seamless integration with other Salesforce apps.