Skip to content

Commit f8e7966

Browse files
committed
Document how to install the Salesforce integration
1 parent ee14633 commit f8e7966

1 file changed

Lines changed: 63 additions & 0 deletions

File tree

  • src/pages/integrations/salesforce

src/pages/integrations/salesforce/index.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,66 @@ performs an HTTP request to the Friendly Captcha site verification API.
2525

2626
The LWC or HTML scripts render a Friendly Captcha widget on your website. After the challenge is solved, the solution is passed to your back-end, where the Apex class is used to verify the solution in a request to the Friendly Captcha API. Both the LWC and the Apex class can read configuration settings from a Custom Metadata Type Record.
2727

28+
## Installation
29+
30+
:::info
31+
32+
To install Friendly Captcha for Salesforce, you will need administrator privileges for your Salesforce organization. You will also need to use the command line.
33+
34+
If possible, we recommend testing the installation in a development Salesforce organization.
35+
36+
:::
37+
38+
The best way to install Friendly Captcha for Salesforce is by deploying the source code to your Salesforce organization. First, download the project from [GitHub][github] onto your local computer. In your terminal, `cd` into the `friendly-captcha-salesforce` directory.
39+
40+
If you don't already have the Salesforce CLI installed, you can either [install it from the website][sf-cli-website], or you can [run it in a Docker container][sf-cli-docker]:
41+
42+
```
43+
docker run --rm -it -v $PWD:/app -w /app salesforce/cli:latest-full
44+
```
45+
46+
Next, authenticate the Salesforce CLI with your Salesforce organization:
47+
48+
<details>
49+
<summary>Authenticating if you installed the CLI from the website</summary>
50+
51+
If you installed the Salesforce CLI directly (i.e., without Docker), you can authenticate using a web browser by running
52+
53+
```
54+
sf org login web --alias=MySFOrg
55+
```
56+
57+
This will open a web browser where you log in with your Salesforce admin credentials. After you successfully log in, your command line session should be authenticated.
58+
59+
</details>
60+
61+
<details>
62+
<summary>Authenticating if you are using Docker</summary>
63+
64+
If you're using Docker, you may not be able to use the web browser authentication flow. Instead, you can use the device authentication flow:
65+
66+
```
67+
sf org login device --alias=MySFOrg
68+
```
69+
70+
Follow the instructions in the output of the command to authenticate your session.
71+
72+
</details>
73+
74+
If everything is successful, you should see your organization in the output when you run
75+
76+
```
77+
sf org list
78+
```
79+
80+
To deploy Friendly Captcha for Salesforce to your organization, run
81+
82+
```
83+
sf project deploy start --target-org MySFOrg
84+
```
85+
86+
You should see a list of resources deploying into your organization. When the command finishes, you can proceed to [configuration](#configuration).
87+
2888
## Configuration
2989

3090
To use Friendly Captcha for Salesforce, there are a few configuration parameters that you have to supply. At minimum, you have to supply a [sitekey][sitekey-instructions] for the front-end integration and an [API key][apikey-instructions] for the back-end integration.
@@ -231,3 +291,6 @@ Each event handler receives an `event` argument with a `detail` property matchin
231291
[sitekey-instructions]: /docs/v2/getting-started/setup
232292
[apikey-instructions]: /docs/v2/api/authentication#creating-api-keys
233293
[widget-events]: /docs/v2/sdk/events
294+
[github]: https://github.com/FriendlyCaptcha/friendly-captcha-salesforce
295+
[sf-cli-website]: https://developer.salesforce.com/tools/salesforcecli
296+
[sf-cli-docker]: https://hub.docker.com/r/salesforce/cli

0 commit comments

Comments
 (0)