For the complete documentation index, see llms.txt. This page is also available as Markdown.

Salesforce Service Cloud

Search and manage the Salesforce Knowledge base, triage and route cases, log and send case email, read the case feed and SLA milestones, list entitlements, Omni-Channel agent work, and messaging sessions, and create cases and work orders.

Connectors

Choose the connector that matches your authentication method. The options below use the names shown in StackAI.

Connector
Authentication

Salesforce Service Cloud (OAuth)

OAuth sign-in

Salesforce Service Cloud

Credentials

Salesforce Service Cloud (OAuth)

Connect to Salesforce Service Cloud using OAuth with automatic credential management by StackAI.

Set up in Salesforce Service Cloud

  1. Use a Salesforce Service Cloud account with access to the records and operations that your workflow needs.

  2. If your organization restricts application access or user consent, have its administrator approve the connection before you sign in.

Set up in StackAI

  1. Open Settings → Connections, add a connection, and select Salesforce Service Cloud (OAuth).

  2. Select Connect, sign in to the provider account, and review the requested access. Complete authorization to return to StackAI.

  3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

StackAI obtains the OAuth credentials during sign-in. You do not need to paste an access token or refresh token.

Salesforce Service Cloud

Connect to Salesforce Service Cloud with a username, password, and security token.

Set up in Salesforce Service Cloud

  1. Prepare the Salesforce Service Cloud account or service that the workflow will access. Grant access to the required resources and operations.

  2. Security Token: Your Salesforce security token. Reset it in your Salesforce settings if needed

Set up in StackAI

  1. Open Settings → Connections, add a connection, and select Salesforce Service Cloud.

  2. Enter the credentials and connection details in the fields below.

  3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

Connection fields

StackAI field
Required
What to enter

Username

Yes

Your Salesforce username (email address).

Password

Yes

Your Salesforce password.

Security Token

Yes

Your Salesforce security token. Reset it in your Salesforce settings if needed. Provider instructions.

Domain (Optional)

Optional / as applicable

Custom domain for your Salesforce instance (e.g., 'na1' for North America).

Sandbox

Optional / as applicable

Whether this is a Salesforce sandbox instance.

Verify the connection

Check that the connection is healthy. Then run a read operation against a resource the connected account can access. A successful connection check confirms authentication; it does not guarantee permission for every action.

If access is denied, check the credential or OAuth permissions, the selected account or environment, and access to the specific resource. Update expired credentials or reconnect after permissions change.

Use an action

  1. Add the required Salesforce Service Cloud action to the workflow.

  2. Select a connection when the action requests one.

  3. Complete the required fields. Use the reference picker when a value comes from another workflow step.

  4. Run the workflow and inspect the action’s output. Check the result before using it in a later step.

Actions

Search Knowledge Articles

Find published knowledge articles that match a question or keywords.

Required permissions: api.

Inputs

Field
Type
Required
Description

Search text

string

Yes

Words or a question to search for in article titles and bodies.

Language

select (string)

No

Language of the articles to search. Available values: en-US, en-GB, es, es-MX, fr, de, it, ja, pt-BR, zh-CN, nl, ko. Default: en-US.

Channel

select (string)

No

Which publishing channel to search: internal app, public site, customer portal or partner portal. Available values: App (internal), Pkb (public knowledge base), Csp (customer portal), Prm (partner portal). Default: App.

Data category filter

string

No

Only articles in this data category, as Group:Category.

Max results

integer

No

Maximum number of articles to return (default 20, max 100). Minimum: 1. Maximum: 100. Default: 20.

Page

integer

No

Page number to resume a previous search. Minimum: 1.

Outputs

Field
Type
Description

Articles

object_array

Matching published articles.

Next page

integer

Page number to fetch more, empty when done.

Get Knowledge Article

Read the full text of one knowledge article.

Required permissions: api.

Inputs

Field
Type
Required
Description

Article

string

Yes

The article's Id, URL name or draft version Id.

Language

select (string)

No

Language version to read. Available values: en-US, en-GB, es, es-MX, fr, de, it, ja, pt-BR, zh-CN, nl, ko. Default: en-US.

Outputs

Field
Type
Description

Article ID

string

KnowledgeArticleId.

Title

string

Article title.

Fields

object_array

Every layout field with label, API name and raw value.

Version ID

string

Id of the article version that was read.

Article number

string

Human-readable article number.

URL name

string

URL-safe name.

Summary

string

Short summary.

Publish status

string

Draft, Online or Archived.

Body (text)

textarea

All rich-text fields of the article as plain text, in layout order.

Last published

string

When the article was last published.

URL

string

Link to the article in Salesforce.

Create Knowledge Article Draft

Create a draft knowledge article for a knowledge manager to review, or start a new draft version of a published article.

Required permissions: api.

Inputs

Field
Type
Required
Description

Title

string

Yes

Article title.

Body

textarea

No

Article content. Plain text or simple HTML.

Body field

select (string)

No

Which rich-text field of the article layout receives the body. Loaded from your org; defaults to the first rich-text field. Options load from the selected connection.

Summary

textarea

No

Short summary shown in search results.

URL name

string

No

URL-safe unique name. Generated from the title when empty.

Language

select (string)

No

Article language. Available values: en_US, en_GB, es, es_MX, fr, de, it, ja, pt_BR, zh_CN, nl_NL, ko. Default: en_US.

Article type

select (string)

No

Record type (FAQ, How-To, ...). Uses the org default when empty. Options load from the selected connection.

Revise existing article

string

No

Article Id of a published article to draft a new version of, instead of creating a new article.

Additional fields

textarea

No

Extra fields to set, as a JSON object of API name to value.

Outputs

Field
Type
Description

Draft version ID

string

Id of the new draft version.

Article ID

string

Id of the article the draft belongs to.

Title

string

Title as saved.

URL name

string

URL name as saved.

Publish status

string

Always Draft after this action.

Article number

string

Human-readable article number.

Body field used

string

Which field received the body.

URL

string

Link to the draft in Salesforce.

Publish Knowledge Article

Publish a reviewed draft so it appears in search and agent consoles, or archive a published article.

Required permissions: api.

Inputs

Field
Type
Required
Description

Version ID

string

Yes

The draft version to publish (or the online version to archive).

Action

select (string)

No

Publish the draft or archive the article. Available values: Publish, Archive. Default: publish.

Outputs

Field
Type
Description

Version ID

string

The version acted on.

Article ID

string

Parent article Id.

Title

string

Article title.

Publish status

string

Status after the action: Online or Archived.

URL

string

Link to the article.

Assign or Escalate Case

Route a case through your assignment rules, hand it to a specific user or queue, escalate it, or change its status and priority.

Required permissions: api.

Inputs

Field
Type
Required
Description

Case

string

Yes

The case to update.

Routing

select (string)

No

Who should own the case: let the active assignment rules decide, run one specific rule, set the owner directly, or keep the current owner. Available values: Run active assignment rules, Run a specific assignment rule, Set the owner directly, Keep the current owner. Default: active_rules.

Assignment rule

select (string)

No

The assignment rule to run when Routing is 'specific rule'. Options load from the selected connection.

Owner (user or queue)

string

No

The user or queue that should own the case (Routing: set the owner directly).

Escalate

boolean

No

Mark the case as escalated.

Status

select (string)

No

New case status. Options load from the selected connection.

Priority

select (string)

No

New case priority. Available values: High, Medium, Low.

Outputs

Field
Type
Description

Case ID

string

The updated case.

Case number

string

Human-readable case number.

Owner ID

string

Owner after routing.

Status

string

Status after the update.

Escalated

boolean

Whether the case is escalated.

Owner name

string

Owner's name.

Owner type

string

User or Queue.

Priority

string

Priority after the update.

URL

string

Link to the case.

Log Email on Case

Record an email that was already sent or received on a case's Emails list, without sending anything.

Required permissions: api.

Inputs

Field
Type
Required
Description

Case

string

Yes

The case to log the email on.

Direction

select (string)

No

Whether the email was received from the customer or sent to them. Available values: Outgoing (sent to the customer), Incoming (received from the customer). Default: outgoing.

From

string

Yes

Sender email address.

To

string

Yes

Recipient email addresses, comma-separated.

Subject

string

Yes

Email subject.

Body

textarea

Yes

Email body as plain text.

HTML body

textarea

No

Optional HTML version of the body.

Cc

string

No

Cc addresses, comma-separated.

Bcc

string

No

Bcc addresses, comma-separated.

Message date

datetime

No

When the email was sent or received. Defaults to now.

Related contact

string

No

Contact or lead the email relates to.

Outputs

Field
Type
Description

Email message ID

string

Id of the logged email.

Case ID

string

The case it was logged on.

Status

string

Email status code label.

Message date

string

Recorded message date.

URL

string

Link to the email record.

Send Email from Case

Send an email reply from a case and log it on the case timeline.

Required permissions: api.

Inputs

Field
Type
Required
Description

Case

string

Yes

The case this email is about.

To

string

Yes

Recipient email addresses, comma-separated.

Subject

string

Yes

Email subject.

Body

textarea

Yes

Email body. Plain text or HTML.

Send as

select (string)

No

Send from the connected user or from an org-wide address such as support@. Options load from the selected connection.

Body is HTML

boolean

No

Treat the body as HTML instead of plain text. Default: false.

Attachments

string

No

Files already in Salesforce to attach, as comma-separated ContentVersion Ids.

Log on case

boolean

No

Save the sent email on the case timeline. Default: true.

Outputs

Field
Type
Description

Sent

boolean

Whether Salesforce accepted the email.

Case ID

string

The related case.

Recipients

string

Who the email went to.

Subject

string

Subject sent.

Sender

string

Address or user it was sent from.

Logged on case

boolean

Whether it was saved to the case.

Get Case Feed

Read a case's timeline: posts, status changes, emails and comments.

Required permissions: api.

Inputs

Field
Type
Required
Description

Case

string

Yes

The case whose feed to read.

Max items

integer

No

Maximum feed items to return (default 25, max 100). Minimum: 1. Maximum: 100. Default: 25.

Item types

select (string)

No

Only certain kinds of items. Available values: Everything, Posts, Field changes, Emails, Case comments. Default: all.

Page token

string

No

Continue a previous read.

Outputs

Field
Type
Description

Feed items

object_array

Feed items, newest first.

Source

string

Whether the Chatter API or the SOQL fallback was used.

Next page token

string

Token to fetch older items, empty when done.

List Entitlements

Check which support entitlements (SLAs) a customer account, contact or asset has.

Required permissions: api.

Inputs

Field
Type
Required
Description

Account

select (string)

No

The customer account. Required unless a contact or asset is given. Options load from the selected connection.

Contact

string

No

Only entitlements this contact is named on.

Asset

string

No

Only entitlements for this asset.

Status

select (string)

No

Which entitlements to include. Available values: Active, Expired, Inactive, Any status. Default: Active.

Max results

integer

No

Maximum entitlements to return (default 50, max 200). Minimum: 1. Maximum: 200. Default: 50.

Outputs

Field
Type
Description

Entitlements

object_array

Matching entitlements.

Count

integer

Number returned.

Get Case Milestones

See a case's SLA milestones (first response, resolution) and optionally mark one complete.

Required permissions: api.

Inputs

Field
Type
Required
Description

Case

string

Yes

The case whose milestones to read.

Mark complete

select (string)

No

A milestone on this case to mark as completed now. Options load from the selected connection.

Completion time

datetime

No

When the milestone was completed. Defaults to now.

Outputs

Field
Type
Description

Milestones

object_array

All milestones on the case.

Open

integer

Milestones not yet completed.

Violated

integer

Milestones past target and incomplete.

Next deadline

string

Earliest open target date.

Create Case with Attachment

Open a new case, optionally routed by your assignment rules, and attach a file from a URL.

Required permissions: api.

Inputs

Field
Type
Required
Description

Subject

string

Yes

Short title of the issue.

Description

textarea

No

Details of the issue.

Priority

select (string)

No

Case priority. Available values: High, Medium, Low.

Origin

select (string)

No

Where the case came from (Email, Web, Phone...). Options load from the selected connection.

Account

select (string)

No

Customer account. Options load from the selected connection.

Contact

string

No

Customer contact.

File URL

string

No

Public or signed URL of a file to attach (screenshot, log, PDF).

File name

string

No

Name to give the attached file. Taken from the URL when empty.

Use assignment rules

boolean

No

Let the org's active case assignment rules pick the owner. Default: true.

Status

select (string)

No

Initial status. Uses the org default when empty. Options load from the selected connection.

Type

select (string)

No

Case type (Question, Problem...). Options load from the selected connection.

Entitlement

string

No

Entitlement to apply so SLA milestones start.

Web email

string

No

Requester's email when there is no contact.

Additional fields

textarea

No

Extra case fields as a JSON object of API name to value.

Outputs

Field
Type
Description

Case ID

string

New case Id.

Case number

string

Human-readable case number.

Status

string

Status of the new case.

Owner ID

string

Owner after assignment rules.

URL

string

Link to the case.

Owner name

string

Owner's name.

File document ID

string

Id of the attached file document, if any.

File version ID

string

Id of the uploaded file version.

File name

string

Name of the attached file.

List Omni-Channel Agent Work

See who is working a case through Omni-Channel, what work an agent has, and which agents are online.

Required permissions: api.

Inputs

Field
Type
Required
Description

Case

string

No

Show the work items for this case.

Agent

string

No

Show the work items assigned to this agent.

Work status

select (string)

No

Which work items to include. Available values: Open (assigned, opened or paused), Assigned, Opened, Closed, Declined, Transferred, All. Default: open.

Include online agents

boolean

No

Also list agents currently online in Omni-Channel with their presence status. Default: false.

Max results

integer

No

Maximum work items to return (default 50, max 200). Minimum: 1. Maximum: 200. Default: 50.

Outputs

Field
Type
Description

Work items

object_array

Omni-Channel work items.

Count

integer

Number of work items returned.

Agents online

object_array

Agents currently online (when requested).

List Messaging Sessions for Case

Find the SMS, WhatsApp or in-app messaging sessions linked to a case.

Required permissions: api.

Inputs

Field
Type
Required
Description

Case

string

Yes

The case whose messaging sessions to list.

Max results

integer

No

Maximum sessions to return (default 20, max 200). Minimum: 1. Maximum: 200. Default: 20.

Status

select (string)

No

Only sessions in this state. Available values: All, New, Waiting, Active, Inactive, Ended. Default: all.

Outputs

Field
Type
Description

Sessions

object_array

Messaging sessions, newest first.

Count

integer

Number returned.

Create Work Order from Case

Dispatch a field visit by creating a work order linked to a case.

Required permissions: api.

Inputs

Field
Type
Required
Description

Case

string

Yes

The case that needs on-site service.

Subject

string

No

Short title of the work. Defaults to the case subject.

Description

textarea

No

What the technician should do.

Priority

select (string)

No

Work order priority. Available values: Low, Medium, High, Critical.

Status

select (string)

No

Initial status. Uses the org default (usually New) when empty. Options load from the selected connection.

Work type

select (string)

No

Work type template to apply (duration, skills). Options load from the selected connection.

Account

string

No

Override the account copied from the case.

Contact

string

No

Override the contact copied from the case.

Start

datetime

No

Planned start.

End

datetime

No

Planned end.

Additional fields

textarea

No

Extra work order fields as a JSON object of API name to value.

Outputs

Field
Type
Description

Work order ID

string

New work order Id.

Work order number

string

Human-readable number.

Case ID

string

Linked case.

Status

string

Status of the work order.

URL

string

Link to the work order.

Account ID

string

Account on the work order.

Contact ID

string

Contact on the work order.

Triggers

A trigger starts a workflow when its configured event occurs. Configure the event and filters before enabling the trigger.

Case Created

Fires when a new case is opened in Salesforce Service Cloud.

Optionally limit this to one channel, priority or record type. Leave the filters empty to fire for every new case.

Required permissions: api.

Configuration

Field
Type
Required
Description

Only this origin

select (string)

No

Only fire for cases from this channel (Email, Web, Phone...). Options load from the selected connection.

Only this priority

select (string)

No

Only fire for cases with this priority. Available values: High, Medium, Low.

Only this record type

select (string)

No

Only fire for cases of this record type. Options load from the selected connection.

Event inputs

Field
Type
Required
Description

Case ID

string

Yes

New case Id. Default: .

Case number

string

Yes

Human-readable number. Default: .

Subject

string

No

Case subject.

Description

string

No

Case description.

Status

string

Yes

Initial status. Default: .

Priority

string

No

Priority.

Origin

string

No

Channel the case came from.

Owner ID

string

Yes

Owner user or queue. Default: .

Owner name

string

No

Owner's name.

Account ID

string

No

Customer account.

Account name

string

No

Account name.

Contact ID

string

No

Customer contact.

Contact name

string

No

Contact name.

Contact email

string

No

Contact or supplied email.

Created

string

Yes

When the case was created. Default: .

URL

string

Yes

Link to the case. Default: .

Outputs

Field
Type
Description

Case ID

string

New case Id.

Case number

string

Human-readable number.

Status

string

Initial status.

Owner ID

string

Owner user or queue.

Created

string

When the case was created.

URL

string

Link to the case.

Subject

string

Case subject.

Description

textarea

Case description.

Priority

string

Priority.

Origin

string

Channel the case came from.

Owner name

string

Owner's name.

Account ID

string

Customer account.

Account name

string

Account name.

Contact ID

string

Customer contact.

Contact name

string

Contact name.

Contact email

string

Contact or supplied email.

Case Status Changed

Fires when a case moves to a new status or is closed.

Optionally fire only for one target status, or only when a case is closed. Open cases are snapshotted on the first poll after you enable this (within 5 minutes); status changes before that poll set the baseline and do not fire.

Required permissions: api.

Configuration

Field
Type
Required
Description

Only when status becomes

select (string)

No

Only fire when the case reaches this status. Options load from the selected connection.

Closed cases only

boolean

No

Only fire when a case is closed. Default: false.

Event inputs

Field
Type
Required
Description

Case ID

string

Yes

Case Id. Default: .

Case number

string

Yes

Human-readable number. Default: .

Subject

string

No

Case subject.

Previous status

string

No

Status before the change.

New status

string

Yes

Status after the change. Default: .

Closed

boolean

Yes

Whether the case is now closed. Default: false.

Closed at

string

No

When it closed.

Priority

string

No

Priority.

Owner ID

string

Yes

Current owner. Default: .

Owner name

string

No

Owner's name.

Account ID

string

No

Customer account.

Contact ID

string

No

Customer contact.

Changed at

string

Yes

When the case was last modified. Default: .

URL

string

Yes

Link to the case. Default: .

Outputs

Field
Type
Description

Case ID

string

Case Id.

Case number

string

Human-readable number.

New status

string

Status after the change.

Closed

boolean

Whether the case is now closed.

Owner ID

string

Current owner.

Changed at

string

When the case was last modified.

URL

string

Link to the case.

Subject

string

Case subject.

Previous status

string

Status before the change.

Closed at

string

When it closed.

Priority

string

Priority.

Owner name

string

Owner's name.

Account ID

string

Customer account.

Contact ID

string

Customer contact.

Case Comment Added

Fires when a comment is added to a case.

Choose whether to watch public comments, internal comments or both. Reads case comments, not Chatter posts.

Required permissions: api.

Configuration

Field
Type
Required
Description

Visibility

select (string)

No

Fire for public comments, internal comments, or both. Available values: Public and internal, Public only (customer-visible), Internal only. Default: all.

Only this case

string

No

Only fire for comments on one case.

Event inputs

Field
Type
Required
Description

Comment ID

string

Yes

CaseComment Id. Default: .

Case ID

string

Yes

The case commented on. Default: .

Case number

string

No

Human-readable number.

Case subject

string

No

Subject of the case.

Comment

string

Yes

Comment text. Default: .

Public

boolean

Yes

Visible to the customer. Default: false.

Author ID

string

Yes

Who wrote it. Default: .

Author

string

No

Author's name.

Created

string

Yes

When it was posted. Default: .

URL

string

Yes

Link to the case. Default: .

Outputs

Field
Type
Description

Comment ID

string

CaseComment Id.

Case ID

string

The case commented on.

Comment

textarea

Comment text.

Public

boolean

Visible to the customer.

Author ID

string

Who wrote it.

Created

string

When it was posted.

URL

string

Link to the case.

Case number

string

Human-readable number.

Case subject

string

Subject of the case.

Author

string

Author's name.

Case Owner Changed

Fires when a case is assigned or transferred to a different user or queue.

Optionally fire only for one user or queue, or only for users or only for queues. Open cases are snapshotted on the first poll after you enable this (within 5 minutes); transfers before that poll set the baseline and do not fire.

Required permissions: api.

Configuration

Field
Type
Required
Description

Only when assigned to

string

No

Only fire when the case lands on this user or queue.

Only this owner type

select (string)

No

Fire for assignments to users, to queues, or both. Available values: Users and queues, Users only, Queues only. Default: any.

Event inputs

Field
Type
Required
Description

Case ID

string

Yes

Case Id. Default: .

Case number

string

Yes

Human-readable number. Default: .

Subject

string

No

Case subject.

Previous owner ID

string

No

Owner before the change.

New owner ID

string

Yes

Owner after the change. Default: .

New owner

string

No

New owner's name.

New owner type

string

Yes

User or Queue. Default: .

Status

string

Yes

Case status. Default: .

Priority

string

No

Priority.

Account ID

string

No

Customer account.

Contact ID

string

No

Customer contact.

Changed at

string

Yes

When the case was last modified. Default: .

URL

string

Yes

Link to the case. Default: .

Outputs

Field
Type
Description

Case ID

string

Case Id.

Case number

string

Human-readable number.

New owner ID

string

Owner after the change.

New owner type

string

User or Queue.

Status

string

Case status.

Changed at

string

When the case was last modified.

URL

string

Link to the case.

Subject

string

Case subject.

Previous owner ID

string

Owner before the change.

New owner

string

New owner's name.

Priority

string

Priority.

Account ID

string

Customer account.

Contact ID

string

Customer contact.

Important behavior

If an operation is denied, check the connection’s granted permissions and the account’s access in the provider. Reauthorize the connection when it needs additional permissions.

Actions that create, update, send, or delete data can change the connected service. Review their inputs before running them. A retry can repeat an operation; consider this when configuring retries for actions that change data.

The catalog lists the fields and capabilities available in the supplied provider definition. Availability can also depend on your deployment and organization’s Feature Access settings.

Last updated

Was this helpful?