Send Salesforce opportunities from Slack with index

BotsCRMMarketing

What it does

When someone runs the Salesforce list_by_account_with_start_ix_with_print_count opportunity command in Slack, this automation searches Salesforce for opportunities tied to that account. It posts matching opportunities in the channel so someone can browse them by index and count.

Who it's for

Sales teams who need to view Salesforce opportunities from Slack without leaving the conversation.

How teams use this

Browse account opportunities by index

Run the command with a starting point and count to view a slice of opportunities tied to an account. The channel sees the results without opening Salesforce.

Paginate through large opportunity lists

Adjust the starting index and count in each command to move through a long list of opportunities one page at a time. The same flow handles pagination.

Filter opportunities by stage before posting

Add a stage condition to the query so only opportunities in a specific stage are returned and posted to Slack. This narrows the list without changing the command.

Show opportunity details in each post

Include amount, close date, and owner in the Slack message for each opportunity so someone has more context. The index and count logic stays the same.

How it works

  1. Run the opportunity command. Type the Salesforce list_by_account_with_start_ix_with_print_count opportunity command in a Slack channel with the account, starting index, and count.
  2. Search for opportunities by account. Query Salesforce for opportunities tied to that account using a WHERE clause so the right records are fetched and filtered by the starting index and count parameters.
  3. Post matching opportunities. Reply in Slack with the opportunities that fall within the starting index and count range so someone can see them in the channel.