> For the complete documentation index, see [llms.txt](https://docs.coherent.global/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coherent.global/integrations/salesforce/business-user-guide.md).

# Business user guide

Before diving into the integration process, it’s essential to have a basic understanding of **Coherent Spark**. We recommend starting with the [Get started in 5 minutes](/getting-started-in-5-minutes.md) guide for a quick overview.

Additionally, ensure your Salesforce developers have already built the necessary Spark-related components for the integration. This will allow you to focus on the administrative setup without interruptions.

{% hint style="info" %}
This guide is intended for Salesforce Admins responsible for the integration in their Salesforce DevHub or Scratch org. It also assumes that you have some basic understanding of Salesforce and its terminologies.
{% endhint %}

## Prerequisites

To get started, you will need the following:

1. Access to your Salesforce **DevHub/Scratch** org.
2. Access to your Coherent **Spark account** (with at least one Spark service).

As you know by now, your Spark service is a representation of your Excel-based business operations available as a RESTful API accessible via HTTP requests in a secure manner.

{% hint style="info" %}
Always confirm that your Excel model is working as expected before uploading it to Spark. Once uploaded, refer to the [Execute API](/spark-apis/execute-api.md) resource or [API Tester](/navigation/api-tester.md) for more details on your Spark settings.
{% endhint %}

## Locate your Spark settings

After setting up the Spark service, gather the following information to configure Spark settings in your DevHub org. This is crucial for the initial step of the integration process. The necessary fields include:

* **Base URL**: The Spark engine URL (e.g., `https://excel.{environment}.coherent.global`).
* **Tenant Name**: The name of your Spark tenant.
* **Synthetic Key**: Synthetic keys a.k.a [Authorization - API keys](/spark-apis/authorization-api-keys.md) are used for authentication and authorization. Contact your Spark admin if needed to obtain the synthetic key. Keep in mind that Spark offers other security schemes such as [Client Credentials](/identity-and-access-management/client-credentials.md).
* **Service URI**: an identifier to locate your service, usually folder and service names. Visit the [Execute API](/spark-apis/execute-api.md) to learn more about it.

## Set up Spark Settings as Custom Metadata

Now that you have the Spark settings, you can set them up as Custom Metadata in your DevHub org.

Start by adding the following details to the **Spark Settings** custom metadata, which should be editable by subscribers org. This custom metadata type is shipped with the Connector. Read more about how to handle [Custom Metadata Types](https://trailhead.salesforce.com/content/learn/modules/custom_metadata_types_dec/cmt_create) if needed.

Here's an example of what the Spark settings may look like:

| Field          | Value                                         |
| -------------- | --------------------------------------------- |
| `Setting name` | `my-setting`                                  |
| `Base URL`     | `https://excel.myenvironment.coherent.global` |
| `Tenant name`  | `my-tenant`                                   |
| `API key`      | `599*****69a9`                                |

The `Setting name` should be a unique name used just for traceability purposes.

## Build Flow or LWC components

Ideally, Salesforce developers on your team should help you build Flow or LWC components to calls existing Apex stubs to interact with the Spark service. Of course, if you have web development experience, you may follow these guides and examples from [Lightning Design System](https://www.lightningdesignsystem.com/components/overview/) and [LWC Component Library](https://developer.salesforce.com/docs/component-library/).&#x20;

<figure><img src="https://res.cloudinary.com/hy4kyit2a/f_auto,fl_lossy,q_70/learn/modules/lwc-for-visualforce-developers/learn-how-coding-concepts-apply-to-lwc/images/c69f05c292fb68b21b109e176a4a3fbb_8-c-7-c-32-f-7-63-cf-4-f-02-8459-22400-cedd-6-a-9.png" alt=""><figcaption><p>LWC Architecture (Source: <a href="https://res.cloudinary.com/hy4kyit2a/f_auto,fl_lossy,q_70/learn/modules/lwc-for-visualforce-developers/learn-how-coding-concepts-apply-to-lwc/images/c69f05c292fb68b21b109e176a4a3fbb_8-c-7-c-32-f-7-63-cf-4-f-02-8459-22400-cedd-6-a-9.png">Trailhead</a>)</p></figcaption></figure>

Otherwise, use the [Developer guide](/integrations/salesforce/developer-guide.md) that includes instructions on how to customize components using HTML, JavaScript, and CSS, to build your desired app.&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.coherent.global/integrations/salesforce/business-user-guide.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
