---
sourceDocument: Yokohama Customer Service Management
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/yokohama/customer-service-management

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama Customer Service Management

ft:clusterId :

    - csm

bundleId :

    - csm

workflow :

    - Customer and Industry


---

# Create Salesforce spoke actions to retrieve opportunities for use in the remote table definition

# Create Salesforce spoke actions to retrieve opportunities for use in the remote table definition {#csm-integration-salesforce-spoke___Ref16694770}

Release version: Yokohama  
Updated January 30, 2025  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read  
The Salesforce spoke provides actions to retrieve metadata of the opportunity record
and create a new opportunity.

Other than Data Stream Actions, there is no action to get a set of the opportunity records based on a given search criteria. You must create your own actions to accomplish the stated goal of the reference example. See [Reference Salesforce integration using remote tables](https://servicenow-prod.fluidtopics.net/sbEWMxywFCeJZjyV8IFWLw "In this example, the Customer Account table is extended to include an associated Salesforce Account ID which, in turn, is used to retrieve Salesforce opportunities associated with this account. The remote table is used to hold the retrieved opportunity data.").

To create a new action, copy an existing action and modify it to suit your needs. For
example, you can copy the Get All Accounts action and modify it
to retrieve opportunity records.  
For this example, you will create three new Salesforce spoke actions:

* Get All Opportunities
* Get Opportunities for Account Id
* Get Opportunity Details
{#csm-integration-salesforce-spoke__ul_tnv_pdz_53b}  
Each action includes three steps:

1. A pre-processing script step that creates a query.
2. A REST step that executes the query.
3. A post-processing script step that evaluates the response from the query.

{#csm-integration-salesforce-spoke__ol_e23_tdz_53b}  
Note:  
You can test all actions from the Flow Designer before you attempt to connect them to the remote table.
* **[Get All Opportunities custom action](https://servicenow-prod.fluidtopics.net/3iElxe6iyzSJsiTP2eN6sA)**   
  The Get All Opportunities action retrieves opportunity records from the Salesforce application. This action is invoked when you view the remote Opportunity table.
* **[Get Opportunities for Account Id custom action](https://servicenow-prod.fluidtopics.net/rxrUMd_cgtVmZ2J5LpV9kQ)**   
  The Get Opportunities for Account Id action retrieves opportunity records for the specific Salesforce account. This action is invoked when the agent views a Salesforce opportunity available for the customer account based on the Salesforce account associated with it.
* **[Get Opportunities Details custom action](https://servicenow-prod.fluidtopics.net/7r6Pf1cCIXLWZhxVSuZdtQ)**   
  The Get Opportunities Details action retrieves a single Opportunity record from the Salesforce application based on the record Id. This action is invoked when the user opens the form for the Opportunity record in the remote table.

