Sunday, 27 March 2022

GraphQL

 GraphQL is a query language for your API.

It has been developed as a more flexible and efficient alternative to REST.


GraphQL - Query language for API


1.Provides clients the power to ask for exactly what they need and nothing more.

2.GraphQL APIs get all the data your app needs in a single request.

3.Language agnostic - Plenty of client and server libraries are avaialble.



Note :

In GraphQL we can compose the request in the form of a GraphQL query and ask

for exactly what I need to build the app.It then responds with the JSON object with exactly what I asked for.


No multiple round-trips like REST. No Over-fetching or under-fetching.


REST vs GraphQL :


REST :

1.Multiple round trips to collect the information form multiple resources.

2.Over fetching and under fetching data resources.

3.Frontend teams rely heavily on backend teams to deliver the APIs.

4.Caching is built into HTTP spec.


GraphQL :

1.One single request to collect the information by aggregation of data.

2.you only get what you ask for.Tailor made queries to your exact needs.

3.Frontend and backend teams can work independently.

4.Doesn't use HTTP spec for caching (Libraries like APollo,Relay come with caching options).


Sunday, 13 March 2022

Salesforce Experience Cloud Deployments

 There are two key deployment methods when it comes to deploying your Salesforce community.

1.Change sets 

This is a point and click-based toolset that represents a list of customizations that can be deployed 

to any connected org within your Salesforce organization.

Note :

1.Point-and-click-based.

2.Under Setup menu in Salesforce.

3.Migrate changes between your orgs.


There are some considerations when it comes to change sets.

-> Experience Template Changes :

The first of those is Experience template changes. So if you make changes to your template within, say, stage or dev, 

you're going to need to make those changes manually in the upstream environment before deploying your broader change set.

-> audience target :

So if you make any updates to any of your audiences, to any assignments around audiences, 

you're going to need to make those manually within that upstream environment.



2.Metadata API

This is more of a code-based tool set that allows you to deploy a set of customizations more programmatically to any org that you choose.


1.Code-based

2.Utilizes app or command line

3.Migrate from one org to another.

4.Experience Bundle 


what the ExperienceBundle allows us to do is it allows us to extract granular site metadata so that we can quickly update and deploy bits 

and pieces of our site without having to deploy the entire site at once. So the ExperienceBundle is a nice way, if you've made a very small change 

to your site and you just want to deploy that change, the Metadata API using the Experience Bundle allows this to happen.


Experience Cloud Moderation :


There are three core areas when it comes to moderation.

1.moderation criteria

2.moderation rules

3.moderation settings


Note :

Essential for healthy site collaboration.

core areas of moderation.

-> Member and content criteria.

-> Rules to block ,review ,replace and flag content.

-> user content flagging.

-> Moderation workspace.


moderation criteria :


Within Salesforce communities, there are two types of moderation criteria.


1.member criteria

2.Content criteria


-> Member Criteria :

Member criteria utilizes member information to designate which member to target with a moderation rule. 

This could be the type of member such as customer, partner or internal or even based upon their profile. 

This can also be based upon their join date or whether they've posted or commented in the community. 

-> Content Criteria :

Content criteria is all about keyword searching. This could be used to protect from profanities being used in the community 

or flagging competitor names or certain keywords that you want to call out from a moderator's perspective.


Moderation Rules :


There are two types of moderation rules within Salesforce communities.


1.Content rules

2.Rate rules


-> Content rules :


Content rules are used to moderate the content that's being posted within your community.

This is comprised of a couple different settings.

 a.content type

   Do you want this rule to apply to a post or a comment or both.

 b.moderation action

   This is where you choose one of several actions, whether to block, flag, replace or review that item. 

 c.member message

  This is where you can give a message to the member, notating the action you're taking and why you're taking it.

 d.member's and content criteria 

   So utilizing that member and content criteria you have previously set up, you configure them here within your rule, 

   and it will only apply to those members and those keywords you've previously designated

   

-> Rate rules :


Rate rules are there to help limit the number of times somebody has posted within your community. 


a.content type 

This is comprised of content type. So again, do you want this to apply to a post, a comment, as well as other content types such as private messages 

or files? Then what members do you want it to apply to?

b.member criteria

So you can reuse your member criteria here within a rate rule to determine which members this rate rule should apply to.

c.rate limits

Now there's several different options when setting your rate limits.

The first of those is the time period you're looking at, and that can either be 3 minutes or 15 minutes. 

And then you're going to set how many times are they posting within that time period before you notify a moderator and then before you freeze them as a user.

  

what moderation actions are available within our moderation rules?

->  block   

This prevents the content from being published at all. 

So if it contains a keyword, it will be blocked, and that user won't be able to post it until they remove that particular keyword.


Note : Prevents content from being published.


-> review

This allows a moderator to review a post or a comment before it is published within the community. 

So it allows the user to post it., but it puts it in a review status to where only a moderator or the poster can see that post 

until a moderator approves it within the moderation workspace.


Note : Allows Moderators to review before being published.


-> replace

This allows publishing, but replaces the keywords that are found within that post or comment with asterisks. 


Note : Allows Publishing but replaces keyword(s) with asterisks.


-> flag

This allows publishing, but it automatically flags that content for a moderator's review. So it's still available within the community. 

Other members are able to see that, but it's flagged so the moderator can review it and take action on it, if necessary. 


Note : Allows publishing but automatically flags content.



Moderation settings :


Moderation settings are a couple areas where I can further my moderation within my community.


-> user content flagging

This is a checkbox under community administration where I can allow my users to flag posts as they see fit to bring to a moderator's attention. 

So if something slips through a moderation rule, a user could flag it, and it would appear within my moderation workspace as a moderator for me 

to review and take action on. 

-> file types and sizes 

This is where I can set the types of files and the sizes of those files that can be uploaded to my community as a moderator.

-> moderation workspace


Home/Overviewpage :


This is where a moderator would go to do their work. They would get an overview page to see how many pending discussions 

are out there or how many flagged posts are out there right from a Home and Overview tab.

moderator Page :


That's where I can go to my moderate page where I can review the list of items I need to moderate as a moderator, 

and then I can take action on them, as necessary.


Rules Page :


The rules page where I can manage all of my moderation rules, my moderation content criteria, and my moderation member criteria.


Summary :


1.moderation is necessary for a healthy site.

2.moderation criteria for members and content.

3.moderation rules can be used for monitoring member-generated content.


Experience Cloud Analytics :


1.reports and dashboards package


The reports and dashboards package that Salesforce provides. 

This is a package on the AppExchange that comes with a set of dashboards, reports, 

and custom report types to help you get off the ground when reporting on your Experience Cloud site.


2.dashboard workspace


Once you have the package installed, then you're going to take a look at the dashboard workspace. 

This is the analytics landing page for your Experience managers where they're going to go for all things reporting on the Experience Cloud site.