Skip to main content

Questions tagged [connect-api]

ConnectApi is the Apex namespace that includes Chatter in Apex functionality.

Filter by
Sorted by
Tagged with
1 vote
0 answers
25 views

Invoking a Per User Named Credential OAuth flow on click of a button

Here is my use Case. I am trying to connect Salesforce with another Salesforce org with Per User Identity Type. The Second Salesforce org is just to demonstrate that the process works and will ...
Aditya Sehgal's user avatar
0 votes
0 answers
33 views

EnsureFunds Async in Salesforce Order Management System not able to capture balance for 2 failed invoices on 1 order

So the use case is , I am trying to capture funds for an order using Ensure Funds Async connect ap provided by salesforce . There is this 1 common patter which i am seeing is whenever we have 2 failed ...
Mudit Yadav's user avatar
2 votes
0 answers
184 views

How can I retrieve custom parameters from External Credentials with Apex?

I'm looking to retrieve some External Credential information in an Apex class, and so far I've been successful in retrieving everything except for the parameters associated with the credential's ...
AM-KA's user avatar
  • 33
2 votes
1 answer
195 views

How to set Client Id and Client Secret for External credential Principal from Apex

I am building a Getting started page for a Managed package App to easily configure External Credential. I am using ConnectApi.NamedCredentials.createExternalCredential method to dynamically create ...
Anmol Kumar's user avatar
  • 3,651
0 votes
1 answer
121 views

D2C/B2B Commerce Lightning: effectiveAccountId is invalid for Guest

I have enabled guest view and guest can place an order from the storefront. However, I need to create a cart by clicking on an external link. When I try to create a new cart for a guest user I get an ...
Vira Osina's user avatar
0 votes
0 answers
295 views

create cart and add line items using connect API for commerce cloud

I tried to create cart using ConnectApi.createCart but this is showing error that Variable does not exist: ConnectApi The above issue is getting when in tried from developer console. Do anyone have ...
Anu's user avatar
  • 3,879
0 votes
1 answer
86 views

Not able to add WishlistItem with same Product ID in a Wishlist (B2B Commerce)

For one of the B2B org, we have a requirement to add custom fields (Quantity__c and Product_Type__c) in the WishListItem object. With ConnectApi.CommerceWishlist.addItemToWishlist(), we can't set the ...
Ashish's user avatar
  • 2,372
1 vote
1 answer
277 views

Creating a Named Credential with Apex

Trying to programmatically create a Named Credential and getting odd errors when trying to run this code: ConnectApi.ConnectApiException: Provide only the developer name of the external credential. ...
nstuyvesant's user avatar
0 votes
0 answers
141 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 ...
Anu's user avatar
  • 3,879
0 votes
1 answer
254 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 ...
Anu's user avatar
  • 3,879
0 votes
1 answer
573 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 ...
Diego Catharino's user avatar
0 votes
0 answers
72 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 ...
JMRAF's user avatar
  • 31
0 votes
0 answers
311 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 ...
Kevin Ang's user avatar
1 vote
0 answers
356 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 ...
David's user avatar
  • 33
0 votes
0 answers
153 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
Harshi's user avatar
  • 265
1 vote
1 answer
369 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 ...
Keith C's user avatar
  • 136k
3 votes
2 answers
735 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 ...
Peter Knolle's user avatar
  • 29.1k
0 votes
1 answer
2k 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 (...
Aiswarya Sajithkumar P's user avatar
0 votes
1 answer
534 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() { ...
sfdc_to_learn's user avatar
0 votes
1 answer
263 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 ...
lu_ke____'s user avatar
  • 453
0 votes
0 answers
188 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 ...
Bithermal's user avatar
0 votes
1 answer
285 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. { "...
AJM's user avatar
  • 85
0 votes
0 answers
151 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 ...
user114304's user avatar
0 votes
1 answer
511 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 ...
lu_ke____'s user avatar
  • 453
1 vote
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/...
munchj's user avatar
  • 65
1 vote
0 answers
199 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 ...
Jawad Ahmad's user avatar
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. ...
mgarcia's user avatar
  • 33
0 votes
1 answer
738 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: { &...
planetsmoke's user avatar
2 votes
1 answer
479 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....
Jota's user avatar
  • 25
8 votes
1 answer
4k 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 ...
dennisjsk's user avatar
  • 208
2 votes
1 answer
1k 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 ...
MnZ's user avatar
  • 3,170
2 votes
0 answers
161 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....
Bart Juriewicz's user avatar
1 vote
0 answers
471 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 ...
dudka090's user avatar
2 votes
1 answer
433 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 ...
Fota Madalina's user avatar
2 votes
0 answers
609 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 ...
Shira Freed's user avatar
4 votes
1 answer
472 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 ...
cropredy's user avatar
  • 72.2k
1 vote
1 answer
496 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 ...
Sadistik's user avatar
2 votes
2 answers
3k 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 = ...
Anurag's user avatar
  • 2,236
1 vote
1 answer
2k 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 ...
Andrey Metelsky's user avatar
0 votes
1 answer
559 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
Prasad Ruwanpathirana's user avatar
2 votes
1 answer
4k 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 ...
Nagaraj Ramachandran's user avatar
2 votes
1 answer
274 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/...
aaron's user avatar
  • 854
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 ...
Patlatus's user avatar
  • 17.3k
0 votes
1 answer
401 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....
MatteoL's user avatar
2 votes
0 answers
209 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> ...
mira's user avatar
  • 57
0 votes
0 answers
49 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 ...
Gowtham sakthi's user avatar
0 votes
0 answers
542 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 (...
Chirag Mehta's user avatar
  • 1,261
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 ...
m_konyk's user avatar
  • 546
0 votes
1 answer
533 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 ...
Prudhvi Konda's user avatar
2 votes
1 answer
62 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 ...
David Reed's user avatar
  • 93.2k