

# Set up real-time data integration for Salesforce

Check [Before you begin](#real-time-data-integration-prerequisites), then complete these steps in order.

1. [Step 1: Prepare your Connect Customer instance](real-time-data-integration-instance.md)

1. [Step 2: Create a Salesforce integration user and External Client App](real-time-data-integration-credentials.md)

1. [Step 3: Deploy the CloudFormation stack](real-time-data-integration-resources.md)

1. [Step 4: Test the guide, then add it to your inbound flow](real-time-data-integration-start.md)

## Before you begin
<a name="real-time-data-integration-prerequisites"></a>

You need the following access before Step 1. Someone else in your organization might need to grant it, such as your Salesforce admin, AWS admin or Connect Customer admin.
+ System Administrator access to a Salesforce sandbox, with My Domain deployed and API access enabled for the org.
+ Permission to deploy the stack in your AWS account. The stack creates IAM roles, so this is administrator-level permission, or a deployer role that your AWS administrator creates from the template's deployer policy. Your AWS administrator decides who deploys. See [CloudFormation template reference](real-time-data-integration-deployment.md).
+ A test Connect Customer instance, not Connect Customer Basic, in a Region with both the External Tool block and Amazon Bedrock AgentCore Gateway. See [External Tool availability by Region](https://docs.aws.amazon.com/connect/latest/adminguide/regions.html#externaltool_region) and [Supported Regions for AgentCore](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agentcore-regions.html). If you don't have one, Step 1 shows how to create it.
+ Access to the Connect Customer admin website for your test instance with the **Admin** security profile, or permission in the AWS console to log in for emergency access.
+ A place to run the guide's AWS commands: [AWS CloudShell](https://console.aws.amazon.com/cloudshell/home), or the AWS CLI on your computer. For CloudShell, your IAM identity needs CloudShell access, for example the `AWSCloudShellFullAccess` managed policy. See [Where to run the AWS commands](#real-time-data-integration-where-to-run).

Each command block in this guide starts with `(` and ends with `)`. Long blocks are folded under a title that says what they do: expand the block, copy it, paste the whole block at the prompt and press Enter. It asks for each value and shows the default in brackets; press Enter to accept the default. A prompt that says `input hidden` shows nothing as you paste; paste the value and press Enter. If CloudShell shows a Safe Paste warning, choose **Paste**.

Start with the Salesforce sandbox and the test instance. Each environment gets its own stack; see [Test and production environments](real-time-data-integration-test.md#real-time-data-integration-environments).

### Where to run the AWS commands
<a name="real-time-data-integration-where-to-run"></a>

Run the guide's AWS command blocks in one of these places:

------
#### [ CloudShell (recommended) ]

AWS CloudShell needs nothing installed, is signed in as you, and has the AWS CLI, curl and python3. Sign in to the AWS Management Console in the account you deploy to, choose the Region of your Connect Customer instance, and open CloudShell from the console's toolbar. See [What is AWS CloudShell?](https://docs.aws.amazon.com/cloudshell/latest/userguide/welcome.html).

------
#### [ Your computer, with the AWS CLI ]

1. Open a terminal on Linux, macOS or Windows Subsystem for Linux (WSL) that has curl and python3. Type **bash** and press Enter: the command blocks need bash, and macOS opens zsh.

1. Install or update AWS CLI version 2; see [Installing or updating to the latest version of the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html). The instance check in Step 1 confirms that it has the commands this guide uses.

1. Sign in to the account you deploy to with **aws login** or **aws configure sso**. See [Login for AWS local development using console credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sign-in.html) and [Configuring IAM Identity Center authentication with the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/sso-configure-profile-token.html).

1. Set the profile and the Region of your Connect Customer instance, for example:

   ```
   export AWS_PROFILE={{profile-name}}
   export AWS_REGION={{us-west-2}}
   ```

1. Run **aws sts get-caller-identity**. Its `Account` line must be the ID of the account you deploy to.

------

Steps that need your own computer say so.