> For the complete documentation index, see [llms.txt](https://atlas.anywhere.now/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://atlas.anywhere.now/channels-integrations/crm-service/sap-c4c.md).

# SAP C4C CRM Service

Configure CRM Service for SAP C4C.

Configure CRM Service for SAP C4C when WebAgent must retrieve SAP C4C information through the SAP C4C OData API.

Before requesting the service, confirm the [shared CRM connector licensing prerequisites](/channels-integrations/crm-service.md#licensing-prerequisites).

{% hint style="info" %}
Confirm that SAP C4C CRM Service is offered for the customer environment before starting. Provider availability can depend on the environment and support policy.
{% endhint %}

## Request SAP C4C CRM Service in OnePortal

1. Request the SAP C4C CRM Service for the customer environment through the current OnePortal, delivery, or support process.
2. Confirm which UCC and WebAgent configuration must consume SAP C4C data.
3. Confirm that SAP C4C is the enabled CRM Service provider before changing provider settings.
4. Use [Configure CRM Service settings](/channels-integrations/crm-service/configure-crm-service-settings.md) for shared request, change, `PluginSettings`, `PluginAttributes`, and secret-handling rules.

## Prepare SAP C4C

Prepare SAP C4C OData API access before CRM Service settings are completed.

| Preparation item       | What to prepare                                                                                                                                                                                            | Used by CRM Service                 |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
| OData endpoint         | Customer-specific SAP C4C OData API URL.                                                                                                                                                                   | `ApplicationHost`                   |
| Service account        | SAP C4C account approved for OData API access. If the environment uses a non-MFA service-account model with a non-expiring password, confirm current security-policy wording before relying on that model. | `Username` and encrypted `Password` |
| Object scope           | Contacts, leads, cases, or related objects WebAgent must display.                                                                                                                                          | OData query and mapping design      |
| CSRF or batch behavior | Any environment-specific batch and CSRF handling required by the approved OData access model.                                                                                                              | Optional query behavior             |

## Configure SAP C4C CRM Service in Dialogue Cloud Neo / SharePoint

Enter or request these values in the active configuration source for `CrmService` `PluginSettings`.

| Setting              | Requirement | Value                                                                                                                               |
| -------------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `ApplicationHost`    | Required    | SAP C4C OData API URL supplied for the environment, for example `https://<xxxxxxx>.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/`. |
| `Username`           | Required    | SAP C4C service account approved for CRM Service access.                                                                            |
| Encrypted `Password` | Required    | Secret for the approved SAP C4C account, handled through the approved secret process.                                               |

Configure SAP C4C field mappings in `CrmService` `PluginAttributes` when the default mapping is not sufficient for the customer data model.

## Configure optional SAP C4C settings in Dialogue Cloud Neo / SharePoint

Add optional settings with scope `CrmService`.

| Setting                    | Where configured   | Default or value guidance                                                                                                                                                                                    |
| -------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `ShowStatus`               | `PluginSettings`   | Shows whether the caller is a contact, lead, or unknown. Default: `True`.                                                                                                                                    |
| `DefaultPhoneNumberRegion` | `PluginSettings`   | ISO 3166 alpha-2 region code. Default: `ZZ`.                                                                                                                                                                 |
| `PhoneNumberFormat`        | `PluginSettings`   | Default: `Wildcard`. Supported behavior uses only `Wildcard` for SAP C4C because SAP applies internal phone-number formatting.                                                                               |
| `BaseContactQuery`         | `PluginSettings`   | OData contact query. Default: `ContactCollection?$select={0}&$format=json&$filter={1}&$top=100`. `$format=json` is mandatory.                                                                                |
| `BaseLeadQuery`            | `PluginSettings`   | OData lead query. Default: `LeadCollection?$select={0}&$format=json&$filter={1}&top=100`. `$format=json` is mandatory.                                                                                       |
| `ContactImageEndpoint`     | `PluginSettings`   | Contact image endpoint. Default: `ContactCollection('{0}')/ContactAttachmentFolder?$select=Binary,MimeType&$format=json&$filter=TypeCode eq '10016'`; the filter returns business-partner image attachments. |
| `BaseCaseQuery`            | `PluginSettings`   | OData case query. Default: `ServiceRequestCollection?$select={0}&$filter={1}&$top=50&$format=json`. `$format=json` is mandatory.                                                                             |
| `ContactCaseFilter`        | `PluginSettings`   | Contact-to-case filter. Default: `BuyerMainContactPartyID`.                                                                                                                                                  |
| `BaseBatchQuery`           | `PluginSettings`   | Batch request path. Default: `$batch`; used because SAP OData `OR` operator limitations require separate where clauses.                                                                                      |
| `CsrfQuery`                | `PluginSettings`   | CSRF query. Default: `ContactCollection?$select=ContactID&$format=json`.                                                                                                                                     |
| `CaseStatus`               | `PluginSettings`   | Maps SAP C4C case status text to WebAgent status. Default mappings: `New=Open`, `Working=Open`, `Escalated=Open`, `Closed=Closed`.                                                                           |
| `UseLeads`                 | `PluginSettings`   | Controls whether CRM Service retrieves leads as well as contacts. Default: `true`.                                                                                                                           |
| SAP C4C `PluginAttributes` | `PluginAttributes` | Map SAP C4C fields to WebAgent contact, lead, case, and search output.                                                                                                                                       |

<details>

<summary>SAP C4C query and mapping guidance</summary>

Keep customer-specific OData edits in the delivery or configuration record. If a query is changed, preserve mandatory `$format=json` handling where the query requires it.

Use SAP C4C attributes as `SystemName` values in `PluginAttributes`; linked-entity fields must include the alias before the attribute. Common mapping areas include contact fields, lead fields, case fields, image links, search fields, and status fields. Where SAP C4C stores formatted phone numbers inconsistently, validate wildcard matching with known records.

### Default `PluginAttributes`

Preserve default spelling and casing in these rows, including `LastName`, duplicate order `1` values for Contact and Lead identifier rows, and the `{publicUrl}` placeholder.

| DisplayName   | SystemName                                  | Category      | Order | ShowOnExtensionWindow | FieldTypes            | Hyperlink                                                                                                                                                                               | ShowOnToast |
| ------------- | ------------------------------------------- | ------------- | ----: | --------------------- | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| Company       | `companyname`                               | Account       |     0 | No                    | `Name`                |                                                                                                                                                                                         | Yes         |
| Account ID    | `accountid`                                 | Account       |     1 | No                    | `Id`                  |                                                                                                                                                                                         | No          |
| Company       | `name`                                      | Account       |     2 | Yes                   | `Name, Search`        |                                                                                                                                                                                         | No          |
| Phone Number  | `telephone1`                                | Account       |     3 | Yes                   | `PhoneNumber, Search` |                                                                                                                                                                                         | No          |
| Owner         | `owner.fullname`                            | Account       |     4 | Yes                   |                       |                                                                                                                                                                                         | No          |
| Case ID       | `id`                                        | Case          |     1 | No                    | `Id`                  | `{publicUrl}/sap/public/byd/runtime?bo_ns=http://sap.com/thingTypes&bo=COD_GENERIC&node=Root&operation=OnExtInspect&param.InternalID=[ID]&param.Type=COD_SRQ_AGENT_TT&sapbyd-agent=TAB` | No          |
| Title         | `Name`                                      | Case          |     2 | Yes                   | `Name, Search`        |                                                                                                                                                                                         | No          |
| Description   | `ServiceRequestTextCollection`              | Case          |     3 | Yes                   |                       |                                                                                                                                                                                         | No          |
| Date          | `LastChangeDateTime`                        | Case          |     4 | Yes                   | `Date`                |                                                                                                                                                                                         | No          |
| Status        | `ServiceRequestUserLifeCycleStatusCodeText` | Case          |     5 | Yes                   | `FormattedValue`      |                                                                                                                                                                                         | No          |
| Contact       | `BuyerMainContactPartyID`                   | Case          |     6 | Yes                   |                       |                                                                                                                                                                                         | No          |
| Case ID       | `id`                                        | CaseSearch    |     1 | No                    | `Id`                  |                                                                                                                                                                                         | No          |
| Title         | `Name`                                      | CaseSearch    |     2 | Yes                   | `Name, Search`        |                                                                                                                                                                                         | No          |
| Contact ID    | `ContactID`                                 | Contact       |     1 | No                    | `Id`                  | `{publicUrl}/sap/public/byd/runtime?bo_ns=http://sap.com/thingTypes&bo=COD_GENERIC&node=Root&operation=OnExtInspect&param.InternalID=[ContactID]&param.Type=COD_CONTACT_TT`             | No          |
| Object ID     | `ObjectID`                                  | Contact       |     1 | No                    | `Id`                  |                                                                                                                                                                                         | No          |
| Name          | `Name`                                      | Contact       |     2 | No                    | `Name`                |                                                                                                                                                                                         | Yes         |
| First Name    | `FirstName`                                 | Contact       |     3 | Yes                   | `Name, Search`        |                                                                                                                                                                                         | Yes         |
| LastName      | `LastName`                                  | Contact       |     4 | Yes                   | `Name, Search`        |                                                                                                                                                                                         | Yes         |
| Email         | `Email`                                     | Contact       |     5 | Yes                   | `Search, Email`       |                                                                                                                                                                                         | No          |
| Phone Number  | `NormalisedPhone`                           | Contact       |     6 | Yes                   | `Search, PhoneNumber` |                                                                                                                                                                                         | No          |
| Mobile Number | `NormalisedMobile`                          | Contact       |     7 | Yes                   | `Search, PhoneNumber` |                                                                                                                                                                                         | No          |
| Company ID    | `AccountID`                                 | Contact       |     8 | No                    | `Id`                  |                                                                                                                                                                                         | No          |
| Company Name  | `AccountFormattedName`                      | Contact       |     9 | Yes                   | `Name`                |                                                                                                                                                                                         | Yes         |
| Contact ID    | `ContactID`                                 | ContactSearch |     1 | No                    | `Id`                  |                                                                                                                                                                                         | No          |
| First Name    | `FirstName`                                 | ContactSearch |     2 | Yes                   | `Name, Search`        |                                                                                                                                                                                         | Yes         |
| LastName      | `LastName`                                  | ContactSearch |     3 | Yes                   | `Name, Search`        |                                                                                                                                                                                         | Yes         |
| Email         | `Email`                                     | ContactSearch |     4 | Yes                   | `Search, Email`       |                                                                                                                                                                                         | No          |
| Phone Number  | `NormalisedPhone`                           | ContactSearch |     5 | Yes                   | `Search, PhoneNumber` |                                                                                                                                                                                         | No          |
| Mobile Number | `NormalisedMobile`                          | ContactSearch |     6 | Yes                   | `Search, PhoneNumber` |                                                                                                                                                                                         | No          |
| Company Name  | `AccountFormattedName`                      | ContactSearch |     7 | Yes                   | `Name`                |                                                                                                                                                                                         | Yes         |
| Lead ID       | `id`                                        | Lead          |     1 | No                    | `Id`                  | `{publicUrl}/sap/public/byd/runtime?bo_ns=http://sap.com/thingTypes&bo=COD_GENERIC&node=Root&operation=OnExtInspect&param.InternalID=[ID]&param.Type=COD_MKT_PROSPECT`                  | No          |
| Object ID     | `ObjectID`                                  | Lead          |     1 | No                    | `Id`                  |                                                                                                                                                                                         | No          |
| Name          | `name`                                      | Lead          |     3 | No                    | `Name, Search`        |                                                                                                                                                                                         | Yes         |
| First Name    | `ContactFirstName`                          | Lead          |     4 | No                    | `Name`                |                                                                                                                                                                                         | Yes         |
| Last Name     | `ContactLastName`                           | Lead          |     5 | No                    | `Name`                |                                                                                                                                                                                         | Yes         |
| Email         | `ContactEMail`                              | Lead          |     6 | Yes                   | `Search, Email`       |                                                                                                                                                                                         | Yes         |
| Phone         | `ContactPhone`                              | Lead          |     7 | Yes                   | `PhoneNumber`         |                                                                                                                                                                                         | Yes         |
| Mobile        | `ContactMobile`                             | Lead          |     8 | Yes                   | `PhoneNumber`         |                                                                                                                                                                                         | Yes         |
| Company       | `Company`                                   | Lead          |     9 | Yes                   | `Search, Name`        |                                                                                                                                                                                         | Yes         |
| Lead ID       | `id`                                        | LeadSearch    |     1 | No                    | `Id`                  |                                                                                                                                                                                         | No          |
| Name          | `name`                                      | LeadSearch    |     3 | No                    | `Name, Search`        |                                                                                                                                                                                         | Yes         |
| Email         | `ContactEMail`                              | LeadSearch    |     6 | Yes                   | `Search, Email`       |                                                                                                                                                                                         | Yes         |
| Phone         | `ContactPhone`                              | LeadSearch    |     7 | Yes                   | `PhoneNumber, Search` |                                                                                                                                                                                         | No          |
| Mobile        | `ContactMobile`                             | LeadSearch    |     8 | Yes                   | `PhoneNumber, Search` |                                                                                                                                                                                         | No          |
| Company       | `Company`                                   | LeadSearch    |     9 | Yes                   | `Search, Name`        |                                                                                                                                                                                         | No          |

</details>

## Validate SAP C4C CRM Service

1. Confirm that CRM Service can reach the SAP C4C OData endpoint.
2. Search for a known SAP C4C contact, lead, or case from WebAgent.
3. Confirm that expected SAP C4C fields appear in WebAgent.
4. Confirm that phone-number recognition returns the expected SAP C4C record.

## References

Confirm current SAP C4C API and service-account procedures with the SAP C4C owner for the customer environment.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://atlas.anywhere.now/channels-integrations/crm-service/sap-c4c.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
