> 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

{% 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 %}

Before diving into the integration process, it’s essential to have a basic understanding of **Coherent Spark**. We recommend starting with the [Tutorial: Get started in 5 minutes](/tutorial-get-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.

## Prerequisites

To get started, you will need the following:

* Access to your Salesforce **DevHub/Scratch** org.
* Access to a Coherent Spark account with `read` and `execute` permissions.

## Sign in to Coherent Spark

Coherent Spark is a platform that allows you to run Excel models in a cloud environment, exposing them as API services.

[#sign-in-to-coherent-spark](#sign-in-to-coherent-spark "mention") and get the following:

* Base URL and tenant (e.g., `https://excel.myenvironment.coherent.global/mytenant`)
* Credentials:
  * [Authorization - API keys](/spark-apis/authorization-api-keys.md) are used for authentication and authorization.
  * Spark offers other security schemes such as [Client credentials](/identity-and-access-management/client-credentials.md).
* Service URI:
  * `folder` - the folder name containing the Spark model
  * `service` - the name of the Spark model
  * `version` - and optionally the semantic version number.

Roughly speaking, a folder acts as a container that holds one or more services. Think of folders as a way to organize and group related services together. Each service represents an Excel model that has been converted into a Spark service. Services can exist in multiple versions, representing different iterations or updates of that service over time. When interacting with a Spark service, you are always working with a specific version – the latest one by default. You can explicitly specify an older version if you need to work with a previous iteration of the service.

You should also confirm your service is working in the [API Tester](/navigation/api-tester.md). Find more information about Spark services in the [How to: Create a Spark service](/build-spark-services/how-to-create-a-spark-service.md).

## 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:

| Key            | 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 call 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/).

<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="Client service communication between lightning web component, component definition, HTML render, and the user interface."><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.
