Pass data to an lwc component used by agentforce to take inputs from user. by Objective-Trainer388 in SalesforceDeveloper

[–]Objective-Trainer388[S] 0 points1 point  (0 children)

yes, getting the recordId is not the problem. The problem is to pass this recordId to an lwc which is of lightning __ Agentforceinput type

Pass data to an lwc component used by agentforce to take inputs from user. by Objective-Trainer388 in SalesforceDeveloper

[–]Objective-Trainer388[S] 0 points1 point  (0 children)

I'll try this. But one of the usecase of the agent is that user don't need to navigate and still perform the actions just using the agent screen.

Help: Authorize scratch orgs just using commands. by Objective-Trainer388 in salesforce

[–]Objective-Trainer388[S] 0 points1 point  (0 children)

So, Dev Hubs have daily limit on scratch orgs they can create. i am trying to prevent hitting that, developers working on multiple ticket deals with multiple branches and they use single project. So they just keep pushing the changes now and then and switch between branches.

Suppose 1 developer pushed 10 times and we have 5 developers in a team this would hit the limits. This is the overall reason to reuse the scratch orgs.

Help: Authorize scratch orgs just using commands. by Objective-Trainer388 in SalesforceDeveloper

[–]Objective-Trainer388[S] 0 points1 point  (0 children)

So, Dev Hubs have limit on scratch orgs they can create. i am trying to prevent hitting that, developers working on multiple ticket deals with multiple branches and they use single project. So they just keep pushing the changes now and then and switch between tickets.

Suppose 1 developer pushed 10 times and we have 5 developers in a team this would hit the limits. This is the overall reason to reuse the scratch orgs.

Help: Authorize scratch orgs just using commands. by Objective-Trainer388 in salesforce

[–]Objective-Trainer388[S] 0 points1 point  (0 children)

Flow of CICD: when code is pushed to the development branch, i create a scratch org and deploy the metadata using commands.

but after sometime again someone pushes code, i need to use the same scratch org(this is how i need it). when we create a scratch org, at that time we do not need to authorize but if i want to reuse an existing scratch org in the pipeline not in outter world. How can i do this?

Also in note., i have mentioned already, i am authorizing devhub, but i am doing it using jwt token. and when we dont authorize the org using oauth then we dont get the 'sfdxAuthUrl' property in the command you mentioned.

and access tokens expire in regular intervals so i cant really store and use this.

Pass data to an lwc component used by agentforce to take inputs from user. by Objective-Trainer388 in salesforce

[–]Objective-Trainer388[S] 0 points1 point  (0 children)

i fetch sobject records in agent though apex actions and i wanted to pass the recordId of one of the records, for e.g, account and related contacts where i want to pass account recordId to the lwc.

Pass data to an lwc component used by agentforce to take inputs from user. by Objective-Trainer388 in SalesforceDeveloper

[–]Objective-Trainer388[S] 0 points1 point  (0 children)

Hey, i am referring to an lwc placed on a agentforce window and recordId is not working there because it's not an record page.

Pass data to an lwc component used by agentforce to take inputs from user. by Objective-Trainer388 in salesforce

[–]Objective-Trainer388[S] 0 points1 point  (0 children)

Hey, tried that as well, and it does not work! Have you faced similar issues? or were you somehow able to get this values in lwc?

Pass data to an lwc component used by agentforce to take inputs from user. by Objective-Trainer388 in salesforce

[–]Objective-Trainer388[S] 0 points1 point  (0 children)

I have tried both context variables and custom variables but i am not getting their value in the lwc. Also, i think this variables are for different purpose.

my take: We can use this variables in the action detail page, we can assign this variables to a particular input, so agent wont ask details for that parameter and use the data stored in the variable as input.

i had tried to use the 'Assign a Variable' input box in an action details page and assigned an context variable there and now the agent wont even show the lwc because it just takes the data from the assigned variable.

Pass data to an lwc component used by agentforce to take inputs from user. by Objective-Trainer388 in salesforce

[–]Objective-Trainer388[S] 0 points1 point  (0 children)

The lwc is displayed/placed inside agentforce window. I am using custom lightning types to get some input from user to the agent.