--- title: Add an SAP source slug: '9618' canonical_url: https://docs.coveo.com/en/9618/ collection: index-content source_format: adoc --- # Add an SAP source An SAP source allows you to crawl content from [SAP Commerce Cloud](https://help.sap.com/docs/SAP_COMMERCE_CLOUD). When creating your source, you must provide a JSON configuration instructing Coveo to retrieve items from the SAP services and their respective resource endpoints. This configuration indicates which API calls to execute to fetch the desired [items](https://docs.coveo.com/en/210/), how to parse the responses to extract relevant [metadata](https://docs.coveo.com/en/218/), and which content type these [items](https://docs.coveo.com/en/210/) represent. When working on your SAP source, you may also want to refer to the following articles: * [Concepts](https://docs.coveo.com/en/o2qa5325/) * [Source configuration reference](https://docs.coveo.com/en/2515/) * [Permission configuration reference](https://docs.coveo.com/en/0333/) > **Leading practice** > > The number of [items](https://docs.coveo.com/en/210/) that a source processes per hour (crawling speed) depends on various factors, such as network bandwidth and source configuration. > See [About crawling speed](https://docs.coveo.com/en/2078/) for information on what can impact crawling speed, as well as possible solutions. ## Source key characteristics The following table presents the main characteristics of an SAP source. [cols="4",options="header"] |=== 2+|Features |Supported |Additional information .3+.^|[Content update operations](https://docs.coveo.com/en/2039/) |[refresh](https://docs.coveo.com/en/2710/) ^|[check] a|For each [endpoint](https://docs.coveo.com/en/2515#endpoints-array-required) you define in your source configuration, you can provide a [refresh endpoint](https://docs.coveo.com/en/2515#refreshendpoints-array) to override the initial endpoint. When you do so, the connector can add, update, or delete specific items in the [index](https://docs.coveo.com/en/204/) instead of refreshing the entire repository. However, the following limitations currently apply: * Only refresh queries using the date of the last refresh operation can be made. Tokens can't be used. * A sub-item can't be refreshed if its parent item isn't detected as modified. |[rescan](https://docs.coveo.com/en/2711/) ^|[check] |[Takes place every day by default](https://docs.coveo.com/en/1933/). |[rebuild](https://docs.coveo.com/en/2712/) ^|[check] | .3+.^|[Content security](https://docs.coveo.com/en/1779/) options |[Same users and groups as in your current permission system](https://docs.coveo.com/en/1779#same-users-and-groups-as-in-your-content-system) ^|[x] a| [NOTE] **Note** #### If you'd like to enable this option, contact [Coveo Support](https://connect.coveo.com/s/case/Case/Default). #### If your [source configuration](#content-to-include-section) includes the [`PermissionType` parameter](https://docs.coveo.com/en/2515#permissiontype-string), you must [provide a JSON configuration](https://docs.coveo.com/en/0333/) detailing how to extract the [relationships](https://docs.coveo.com/en/243/) of the indexed permissions. |[Specific users and groups](https://docs.coveo.com/en/1779#specific-users-and-groups) ^|[x] | |[Everyone](https://docs.coveo.com/en/1779#everyone) ^|[check] | |=== ## SAP source commerce requirements Behind the scenes, the SAP source uses the [Stream API](https://docs.coveo.com/en/12#tag/Stream) to push content to the Coveo [index](https://docs.coveo.com/en/204/). Therefore, SAP sources must be associated with a [catalog entity](https://docs.coveo.com/en/3143/) to ensure a complete configuration. This allows the source to accurately build a [product vector](https://docs.coveo.com/en/l9gg3565/) space. For instructions on how to create a catalog entity, see [Commerce catalog entity](https://docs.coveo.com/en/3139/). ## Add an SAP source Follow the instructions below to add an SAP source using the desired [content retrieval method](https://docs.coveo.com/en/1612/). . On the [**Sources**](https://platform.cloud.coveo.com/admin/#/orgid/content/sources/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/content/sources/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/content/sources/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/content/sources/)) page, click **Add source**. . In the **Add a source of content** panel, click the **Cloud** (icon:cloud-icon[alt=cloud-icon,width=16]) or **Crawling Module** ([crawlingmodule]) tab, depending on your [content retrieval context](https://docs.coveo.com/en/1612/). With the latter, you must [install the Crawling Module](https://docs.coveo.com/en/3263/) to make your source operational. . Click the **SAP** tile. . Configure your source. The [completion](#completion) steps are especially important when creating or editing a source of this type. > **Leading practice** > > It's best to create or edit your source in your sandbox organization first. > Once you've confirmed that it indexes the desired content, you can copy your source configuration to your production organization, either [with a snapshot](https://docs.coveo.com/en/3239/) or manually. > > See [About non-production organizations](https://docs.coveo.com/en/2959/) for more information and best practices regarding sandbox organizations. ### "Configuration" tab In the **Edit an SAP Source** panel, the **Configuration** tab is selected by default. It contains your source's general and authentication information, as well as other parameters. #### General information ##### Source name Enter a name for your source. > **Leading practice** > > A source name can't be modified once it's saved, therefore be sure to use a short and descriptive name, using letters, numbers, hyphens (`-`), and underscores (`_`). Avoid spaces and other special characters. ##### Optical character recognition (OCR) If you want Coveo to extract text from image files or PDF files containing images, enable the appropriate option. The extracted text is processed as item data, meaning that it's fully searchable and will appear in the item [Quick view](https://docs.coveo.com/en/2760#search-result-quick-view). > **Note** > > When OCR is enabled, ensure the source's relevant [file type configurations](https://docs.coveo.com/en/l3qg9275/) index the item content. > Indexing the item's metadata only or ignoring the item will prevent OCR from being applied. See [Enable optical character recognition](https://docs.coveo.com/en/2937/) for details on this feature. ##### Project Use the **Project** selector to associate your source with one or more Coveo [projects](https://docs.coveo.com/en/n7ef0517/). #### "Authentication" section In the **Authentication** section, all parameters are optional. Fill the appropriate boxes depending on the authentication type used by the SAP Commerce Cloud instance. * If your SAP Commerce uses a **HTTP, Basic, Kerberos, or NTLM authentication** protocol, enter the **Username** and **Password** of the account with which you want to crawl the source. This fills the `username` and `password` fields in your source JSON configuration. The account of which you enter the credentials must have access to all the content that you want to make searchable. See [Source Credentials Leading Practices](https://docs.coveo.com/en/1920/). * If your source uses the **OAuth 2.0 authentication** protocol, enter your content source **Client ID**, **Client secret** and **Refresh token** in the corresponding boxes. * If your source uses an API key to authenticate, enter it in the **API key** box. * If your source doesn't require authentication, leave all boxes empty. #### "Content to include" section In the **JSON configuration** box, enter your source JSON configuration. For more information on the SAP source JSON configuration, see: * [Reference](https://docs.coveo.com/en/2515/) * [Concepts](https://docs.coveo.com/en/o2qa5325/) ### "Content security" tab Select who will be able to access the source items through a Coveo-powered [search interface](https://docs.coveo.com/en/2741/). For details on the content security options, see [Content security](https://docs.coveo.com/en/1779/). > **Note** > > If, while [writing your source JSON configuration](https://docs.coveo.com/en/9618#content-to-include-section), you chose to index content access > [permissions](https://docs.coveo.com/en/223/) and used the [`PermissionType` parameter](https://docs.coveo.com/en/2515#permissiontype-string), > you must select the **Same users and groups as in your current permission system** option and provide a [JSON permission configuration](https://docs.coveo.com/en/0333/) detailing how to retrieve the > [relationships](https://docs.coveo.com/en/243/) of each [security identity](https://docs.coveo.com/en/240/) and how to index this data. ### "Access" tab . On the **Access** tab, specify whether each group (and API key, if applicable) in your [Coveo organization](https://docs.coveo.com/en/185/) can view or edit the current source. For example, when creating a new source, you could decide that members of Group A can edit its configuration, while Group B can only view it. For more information, see [Custom access level](https://docs.coveo.com/en/3151#custom-access-level). On the **Access** tab, specify whether each group (and API key, if applicable) in your [Coveo organization](https://docs.coveo.com/en/185/) can view or edit the current source. For example, when creating a new source, you could decide that members of Group A can edit its configuration, while Group B can only view it. For more information, see [Custom access level](https://docs.coveo.com/en/3151#custom-access-level). ### Completion . Click **Add Source**/**Save** to add/save your source configuration. . While writing your JSON configuration, you may have decided to populate fields that aren't [default fields](https://docs.coveo.com/en/1833#field-origin). If you have not already created these fields for another source, you must [create them](https://docs.coveo.com/en/1833#add-a-field) on the [**Fields**](https://platform.cloud.coveo.com/admin/#/orgid/content/fields/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/content/fields/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/content/fields/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/content/fields/)) page before building your source. **Examples** * You decided to retrieve picture URIs and to have Coveo populate the `pictureuri` field with this data. Your item metadata therefore contains: ```json "pictureuri": "%[picture.uri]" ``` However, since the `pictureuri` field isn't a default field like `author` or `date`, you must create it. * You have another source populating the custom field `facebookaccountid`. When creating your new source, you therefore don't need to create this field, as it's already in the [**Fields**](https://platform.cloud.coveo.com/admin/#/orgid/content/fields/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/content/fields/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/content/fields/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/content/fields/)) page. . Ensure that your source correctly maps all the fields to populate. If a field doesn't have a mapping, you must [create one](https://docs.coveo.com/en/1640/). **Example** You map the `pictureuri` field with the following rule: `%[pictureuri]`. . On the [**Sources**](https://platform.cloud.coveo.com/admin/#/orgid/content/sources/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/content/sources/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/content/sources/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/content/sources/)) page, click **Launch build** or **Launch rebuild** in the source **Status** column to add the source content or to make your changes effective, respectively. ## Required privileges You can assign privileges to allow access to specific tools in the [Coveo Administration Console](https://docs.coveo.com/en/183/). The following table indicates the privileges required to view or edit elements of the [**Sources**](https://platform.cloud.coveo.com/admin/#/orgid/content/sources/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/content/sources/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/content/sources/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/content/sources/)) page and associated panels. See [Manage privileges](https://docs.coveo.com/en/3151/) and [Privilege reference](https://docs.coveo.com/en/1707/) for more information. > **Note** > > The **Edit all** privilege isn't required to create sources. > When granting privileges for the [Sources](https://docs.coveo.com/en/1707#sources-domain) domain, you can grant a group or API key the **View all** or [**Custom**](https://docs.coveo.com/en/3151#custom-access-level) access level, instead of **Edit all**, and then select the **Can Create** checkbox to allow users to create sources. > See [Can Create ability dependence](https://docs.coveo.com/en/3151#can-create-ability-dependence) for more information. ## Ignoring "no first page" errors in subitems When indexing your content, Coveo may encounter an HTTP error. By default, Coveo stops the crawling process when it encounters such an error. However, you can [configure your source to ignore specific errors](https://docs.coveo.com/en/2515#skippableerrorcodes-string) and continue indexing. Similarly, when requesting [subitems](https://docs.coveo.com/en/2515#subitems-array) from your API, Coveo will stop the indexing process if your API returns a 404 error rather than the first page of results. A 404 error on the first page prevents Coveo from indexing any of your subitems, as the missing first page contains the information needed to request the second page, such as a cursor or the URL of the next page. However, you can configure your source to ignore this error and continue indexing. It will therefore finish indexing the other items of the same endpoint, including their subitems if the API returns valid result pages. Then, your source will move on to any other endpoint you've defined. To ignore "no first page" errors in subitems . On the [**Sources**](https://platform.cloud.coveo.com/admin/#/orgid/content/sources/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/content/sources/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/content/sources/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/content/sources/)), select your source, and then, in the **More** menu, click **Edit configuration with JSON**. . In your source JSON configuration, in the `parameters` object, add the following: ``` "SkipNoFirstPageErrorsInSubItems": { "value": "true" }, ``` . Click **Save and rebuild source**. This parameter applies to all subitem requests made by your source. ## What's next? * If you're using the SAP source in a Coveo for Commerce implementation, create a [catalog entity](https://docs.coveo.com/en/3139/). * [Schedule source updates](https://docs.coveo.com/en/1933/).