{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":6267,"path":"customer-service-management/csm-integration-salesforce-spoke.md","title":"Create Salesforce spoke actions to retrieve opportunities","bundle":null,"doc_type":null,"release":"australia","body":"\n# Create Salesforce spoke actions to retrieve opportunities\n\nThe Salesforce spoke provides actions to retrieve metadata of the opportunity record and create a new opportunity.\n\nOther 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://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/customer-service-management/data-integration-salesforce-example.md).\n\nTo 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.\n\nFor this example, you will create three new Salesforce spoke actions:\n\n-   Get All Opportunities\n-   Get Opportunities for Account Id\n-   Get Opportunity Details\n\nEach action includes three steps:\n\n1.  A pre-processing script step that creates a query.\n2.  A REST step that executes the query.\n3.  A post-processing script step that evaluates the response from the query.\n\n**Note:** You can test all actions from the Flow Designer before you attempt to connect them to the remote table.\n\n-   **[Get All Opportunities custom action](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/customer-service-management/csm-get-all-opportunities-action.md)**  \nThe **Get All Opportunities** action retrieves opportunity records from the Salesforce application. This action is invoked when you view the remote Opportunity table.\n-   **[Get Opportunities for Account Id custom action](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/customer-service-management/csm-account-opportunities-action.md)**  \nThe **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.\n-   **[Get Opportunities Details custom action](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/customer-service-management/csm-details-opportunities-action.md)**  \nThe **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.\n\n**Parent Topic:**[Using remote tables and the Salesforce spoke](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/customer-service-management/csm-integration-remote-tables.md)\n\n"}}