Questions tagged [connect-api]
ConnectApi is the Apex namespace that includes Chatter in Apex functionality.
134
questions
0
votes
0
answers
31
views
update the quantity and price of of OrderItemSummary
It possible to update the quantity and price of of OrderItemSummary or add new product to order and its order product summary once order is created using connectAPI in commerce cloud. As we have split ...
0
votes
1
answer
36
views
Getting error [{"errorCode":"NOT_FOUND","message":"The requested resource does not exist"}]
I want to update the order summery item price and quantify, to archive it i am trying to follow below solutions none of them worked for me. Do anyone here have any idea on what is the issue
I am ...
0
votes
1
answer
60
views
B2B Commerce: Error getting or creating webcart
I'm trying to run some apex tests in our Webstore (there's just one in the org), in a scenario that the test class creates dummy user/account/contact/buyer group/products/cart to finally test some ...
-1
votes
0
answers
30
views
Duplicates on multiple pages of CommerceSearch.searchProducts result
I've just noticed that I get duplicate products when fetching subsequent pages using CommerceSearch.searchProducts. Have you ever faced such a problem? It's worth mentioning that I'm not exceeding the ...
0
votes
0
answers
27
views
Missing required 'subjectId' parameter for Sending a Direct Message Connect REST API
Send a Direct Message
URL above is giving me the endpoint and body for sending a direct message in community. When run in workbench, the DirectMessage, DirectMessageFeed, and FeedItem record was ...
0
votes
0
answers
67
views
Illegal value for parameter when using ConnectApi.CommerceCart.addItemToCart
I am trying to use the ConnectApi.CommerceCart for B2B Commerce to add an item to the cart in Experience Cloud. I am on the B2B Commerce Storefront template in LWR. I get this error
Illegal value for ...
1
vote
0
answers
159
views
ConnectApi.NamedCredentials.deleteCredential not doing anything
I am working with the ConnectApi namespace NamedCredentials class to create and delete Named/External credentials programatically.
Creation was easy enough but now I am struggling to delete. I am ...
0
votes
0
answers
107
views
GraphQL rate limit?
can anyone help me understand GraphQL rate limit how i can check in my org
not able to understand below limit.
https://developer.salesforce.com/docs/platform/graphql/guide/rate-limit.html
0
votes
1
answer
205
views
Named Credentials create APIs missing Label and Name values?
I'm looking at these three pieces of documentation:
The ConnectApi.NamedCredentials class and specifically the createCredentials method
The ConnectApi.CredentialInput class that defines the argument ...
2
votes
2
answers
459
views
What is the actual number or calculation for the Connect API Rate Limit
I'm in the process of designing something that will use the Connect REST API and am not able to find any documentation on what the actual number of calls is limited to or how to calculate them. I ...
0
votes
1
answer
1k
views
Alternative method for Creation Order Summary
My requirement was to create test class for Creating Order Summary. Test data was created using ConnectApi.OrderSummaryCreation.createOrderSummary. But if I use ConnectApi, I was forced to use (...
0
votes
1
answer
354
views
How to use connect api in cdp environment salesforce
I am trying to use connectapi to connect to cdp entities like below
public static ConnectApi.CdpQueryMetadataOutput cdpM {get;set;}
public static ConnectApi.CdpQueryMetadataOutput test1() {
...
0
votes
1
answer
144
views
Error 411 Calling Internal Connect REST API (Notifications) | Enhanced Domains
I am having issues attempting to mark notifications as read using the Connect REST API. The API is being called by an apex class, but is still treated as an external callout. The method is being fire ...
0
votes
0
answers
125
views
How to decode ConnectApi response?
Based on article: https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/intro_encoding.htm
Responses from ConnectApi are by default encoded, they have mentioned in this article ...
0
votes
1
answer
204
views
Update notification through connect notification api
I have been trying to execute a Patch request to /connect/notifications api by sending the following payload from developer console. But I get the response as Bad Request, error code 400.
{
"...
0
votes
0
answers
124
views
CommerceWishlist class getWishlistSummaries wont take a wishlist ID
I am trying to get the product information for wishlist items. When I try to use the commercewishlist getWishlistSummaries with the optional wishlist ID i get this error. I see in the docs that this ...
0
votes
1
answer
381
views
Salesforce CMS REST API: /search `NOT_FOUND`
I am attempting to hit the /connect/cms/delivery/channels/{{channelId}}/contents/search?page=1&pageSize=20&queryTerm=test&scope=All REST API endpoint but am getting the following 404 ...
0
votes
1
answer
2k
views
ConnectApi.CommerceCatalog.getProduct on inactive product
I am working on a B2B commerce project and I have issues with deactivated products (IsActive=false)
https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/...
1
vote
0
answers
177
views
Salesforce Health Cloud - Connect API Specifications
Is there any way we can find API specifications (Open API) or JSON schema definitions for all Business Connect API resources and objects?
I am trying to build an integration between our salesforce ...
3
votes
2
answers
1k
views
Creating a chatter post with inline images from Flow
I was trying to make a Chatter Post from a Flow.
I have a ScreenFlow in order to get the richtext from the user, I save it in a variable and try to convert it in a Chatter Post via ConnectApiHelper.
...
0
votes
1
answer
511
views
Connect API not returning notifications
I'm using a Connected App. this is subscribed to a custom notification (0ML)
i am using the SF standard API: POST /services/data/v54.0/actions/standard/customNotificationAction
with this payload:
{ &...
2
votes
1
answer
382
views
createReturnOrder
Hi i'm writing in Apex a code that must call to this method. I don't know how i can call it, i try with
ConnectApi.ReturnOrderOutputRepresentation idReturnOrder = new ConnectApi....
8
votes
1
answer
3k
views
Retrieve standard and custom notifications of a user in Apex
Is there a way to fetch the unread bell icon notifications of a user in Apex?
We have a community built on the Build Your Own (LWR) template where we need to implement an LWC component that displays ...
2
votes
1
answer
860
views
Tag and @mentions in custom LWC?
I'm attempting to tag a users in a custom lwc component. THis is my current code.
@AuraEnabled
public static void postFeedItem(String msgTxt, String recordId){
ConnectApi.FeedElement ...
2
votes
0
answers
138
views
Connect API - set ContentVersion custom field on file upload
I'm trying to upload a file with the following request:
curl -H "X-PrettyPrint: 1" -F 'json={"title":"BoatPrices"};type=application/json'
-F "fileData=@BoatPrices....
1
vote
0
answers
354
views
Order Summary creation failed
On our project we have order creation for logged user and for guest. We would like to transform order to OrderSummary but it fails. In Apex we use ConnectApi.OrderSummaryCreation.createOrderSummary ...
2
votes
1
answer
326
views
I receive an empty list of notifications using the Connect REST API endpoint: /connect/notifications
I want to get all the current user's notifications to display them in a LWC component. For this, I tried to make a REST API callout from Salesforce to the same Salesforce org using Connect REST API ...
2
votes
0
answers
521
views
Can't run a test class on a class with ConnectApi.ManagedTopics as an Internal user OR as a Community user
I have an LWC which displays as a collapsible menu on an Experience Cloud Site. It's in a scratch org, and I'd like to deploy to production. The LWC is using a class that uses ConnectApi.ManagedTopics ...
4
votes
1
answer
405
views
ConnectApi.ConnectApiException: Context user does not have permission to create rich text in feed
Trying to post richtext (a bolded piece of text) to a chatter feed via ConnectAPI using code below and get this error (user is System Admin)
ConnectApi.ConnectApiException: Context user does not ...
1
vote
1
answer
418
views
Setup ConnectApi.FeedElementPage with message mentions for Test (setTestGetFeedElementsFromFeed)
I have a class that uses ConnectApi.ChatterFeeds.getFeedElementsFromFeed and from the result page I extract the mentioned users.
This is working as intended but now I have to create a test for this ...
1
vote
2
answers
2k
views
Chatter Post and Tag user from Apex Trigger
I'm trying to do a chatter post and tag a user on a record from Apex Trigger.
I tried the following approach,per https://blog.jeffdouglas.com/2013/10/03/chatter-for-apex-code-examples/
Id userId = ...
1
vote
1
answer
1k
views
How to create a test for the ManagedTopic?
I have an Apex class TopicController that has a method that returns a list of Navigational Managed Topics:
public with sharing class TopicController {
// Returns a list of all Navigational Managed ...
0
votes
1
answer
496
views
how to query direct message object from the customer community plus profile?
I need to retrieve direct message data from the customer community plus user profile. How to query direct message object from the customer community plus profile?
Thanks,
Prasad
1
vote
1
answer
3k
views
Sending large Files to external system
From Salesforce, I am sending files to AWS Server. I am able to successfully achieve it if the file is under 3 to 4 MB. When I try with more than 6 to 7 MB, the file is getting reached to the AWS ...
2
votes
1
answer
227
views
Does the url value for MarkupBeginSegmentInput matter?
Given a ConnectApi.MarkupBeginSegmentInput with a markupType of ConnectApi.MarkupType.HYPERLINK, the url attribute is required as stated in the documentation: https://developer.salesforce.com/docs/...
0
votes
1
answer
2k
views
How do I avoid error ConnectApi.ConnectApiException: Cannot provide both 'Poll' and 'QuestionAndAnswers' capability values at the same time
I am trying to set a question title for a poll chatter post created by apex using the following code
CollaborationGroup g = [SELECT Id FROM CollaborationGroup WHERE Name='Edge Communications Customer ...
0
votes
1
answer
380
views
Customer user cannot create chatter post on a community group
I have an issue when I try create a post from an apex class, the user is a customer community user and I create the post from a Lightning community
ConnectApi.ChatterFeeds.postFeedElement(Network....
2
votes
0
answers
193
views
Multiple Files on chatter Feed is not showing when created from apex
I see Chatter post can allow multiple files to be posted at a time in Lightning. But from the below code in Apex, I'm only able to get one file on the chatter post.
List<ConnectApi.BatchInput> ...
0
votes
0
answers
43
views
Is it Possible to insert Files from VF Page using Connect APIs?
I know attachments can insert through connect API. What about Files ? I have heapsize issues while insert an document with size of 5 mb
Here is My Controller to Insert a file
@AuraEnabled
public ...
0
votes
0
answers
467
views
Custom Chatter Feed
Trying to build a lightning component or VF page wherein I can quickly see below views of chatters, is there something nearby already available on AppExchange or Github?
List of all unread chatters (...
0
votes
1
answer
2k
views
Reaching Connect API's hourly request limit for this user and application?
I`ve got this type of error during the work in Lightning Community:
You have reached the Connect API's hourly request limit for this user
and application. Please try again later.
My API Requests ...
0
votes
1
answer
471
views
Chatter API vs ConnectAPI
I'm trying to understand the difference between Chatter REST Api and ConnectAPI in terms of capabilities.
If my task is to post to a Chatter feed from an external application, I believe there would ...
2
votes
1
answer
56
views
Can the new Chatter API Communities resource create a Visualforce Tabs community?
In Summer '19, we got access to a new POST method on the connect/communities endpoint, allowing for programmatic creation of a Community:
Make a POST request to the existing /connect/communities ...
1
vote
0
answers
50
views
Get ConventVersionId via Connect API
So I'm circling back on a problem I tackled a few years ago, as I needed to update the Chatter API version that I'm using, and in doing so need to rework some code that touched the nasty hack in ...
1
vote
1
answer
224
views
How can I mark 'Best Answer' through ConnectApi?
How do I mark an answer as Best Answer through ConenctApi? I tried setting bestAnswerId of ConnectApi.QuestionAndAnswersCapabilityInput but it does not mark the answer as Best Answer.
ConnectApi....
0
votes
1
answer
3k
views
ConnectApi.NotFoundException: Resource not found (ConnectApi.Communities)
I'm trying to get the community site url, using the ConnectApi in a lightning component, with a SystemAdmin it works fine, but not with any other profile.
Here is my code
final Network myNetwork = [...
0
votes
1
answer
868
views
Connecting to metadata API in SOAP with token in PHP
I try to call retrieve in SOAP using PHP but I need to login before.
For login, I have a token that I get from "https://test.salesforce.com/services/oauth2/token"
So, I try to pass this token in the ...
0
votes
0
answers
176
views
Create Custom Chatter Feed
I was recently tasked with retrieving chatter feeds addressed to the context User {'To Me' feeds} and only those ('To Me' feeds) that were on Cases (standard Objects) that were 'Open' and getting to ...
2
votes
2
answers
764
views
Platform events and Chatter Posts
I am subscribing to platform events in apex trigger. In the trigger I am trying to post to user's chatter feed using Chatter Connect API.
I am aware that in this case the context is "Automated Process"...
0
votes
2
answers
1k
views
How to display Data in tabular format when Posting it to Chatter via Apex?
I have a requirement where I want to send email notification to User if Opportunity Close Date is last 10 days and send Chatter Feed notification when Opportunity Close Date is Last 3 days.
For this ...