> 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/afas-profit.md).

# AFAS Profit CRM Service

Configure CRM Service for AFAS Profit.

Configure CRM Service for AFAS Profit when WebAgent must retrieve AFAS Profit information through AFAS Get Connectors.

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

## Request AFAS Profit CRM Service in OnePortal

1. Request the AFAS Profit CRM Service for the customer environment through the current OnePortal, delivery, or support process.
2. Confirm which UCC and WebAgent configuration must consume AFAS Profit data.
3. Confirm that AFAS Profit 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.

{% hint style="info" %}
Exact OnePortal labels can differ by release. Use the current customer-specific request path instead of legacy labels.
{% endhint %}

## Prepare AFAS Profit

An AFAS Profit administrator must prepare connector access before the CRM Service settings can be completed.

| Preparation item          | What to prepare                                                                                                                                                                            | Used by CRM Service                     |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------- |
| AFAS Online REST endpoint | Confirm the customer-specific AFAS Profit REST endpoint.                                                                                                                                   | `ConnectorRestServiceBaseUrl`           |
| AFAS Insite URL           | Confirm the customer-specific Insite URL when WebAgent must open AFAS Profit record links.                                                                                                 | `Insite`                                |
| Get Connectors            | Create or confirm the Get Connectors that expose the records required in WebAgent. The required connector names are `Anywhere365_Contacts`, `Anywhere365_OrgPer`, and `Anywhere365_Cases`. | Query and lookup behavior               |
| App Connector             | Add the required Get Connectors to the App Connector used by CRM Service.                                                                                                                  | AFAS authorization for connector access |
| Authentication token      | Generate or confirm the App Connector token approved for CRM Service.                                                                                                                      | `Token`                                 |

Use AFAS guidance for endpoint addresses, Get Connector import/export, fixed filters, App Connector setup, and REST calls:

* [AFAS address and web service endpoint guidance](https://help.afas.nl/help/NL/SE/App_Conect_WebSrv_Addrss.htm)
* [AFAS import/export connector guidance](https://help.afas.nl/help/EN/SE/App_Cnnctr_ImpExp.htm)
* [AFAS fixed filter guidance for Get Connectors](https://help.afas.nl/help/EN/SE/App_Cnnctr_Get_Fltr_Fixed.htm)
* [AFAS custom app guidance](https://help.afas.nl/help/EN/SE/App_Apps_Custom_Add.htm)
* [AFAS REST call guidance for Get Connectors](https://help.afas.nl/help/EN/SE/App_Cnr_Rest_Call.htm?query=get%20connector%20rest)

## Configure AFAS Profit CRM Service in Dialogue Cloud Neo / SharePoint

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

| Setting                       | Requirement                              | Value                                                                                                                                                                                                |
| ----------------------------- | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ConnectorRestServiceBaseUrl` | Required                                 | AFAS Online REST endpoint supplied for the customer environment. Example: `https://<Orgnumber>.rest.afas.online/Profitrestservices/connectors`.                                                      |
| `Token`                       | Required                                 | App Connector token handled through the approved secret process. Example format: `<token><version>1</version><data>D563AE2A016846549376192A1B70F968E85967B84A095DBCBA33748C1DE29CB2</data></token>`. |
| `Insite`                      | Required when AFAS Insite links are used | AFAS Insite URL used to resolve record links from WebAgent. Example: `https://12345.afasinsite.nl/`.                                                                                                 |

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

{% hint style="info" %}
Use the current configuration source for the environment. Do not rely on legacy SharePoint Plugin Settings navigation unless it is confirmed as the active process for this environment.
{% endhint %}

## Configure optional AFAS Profit settings in Dialogue Cloud Neo / SharePoint

Optional AFAS Profit configuration controls query behavior, case-status mapping, Insite link templates, and field mappings. Add optional settings with scope `CrmService`.

| Setting                      | Where configured   | Default or value guidance                                                                                                                                                                                                                                   |
| ---------------------------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `DefaultPhoneNumberRegion`   | `PluginSettings`   | ISO 3166 alpha-2 region code. Default: `ZZ`.                                                                                                                                                                                                                |
| `PhoneNumberFormat`          | `PluginSettings`   | Default: `Wildcard`. AFAS Profit does not enforce one global phone-number format, so wildcard matching is the default behavior. If the customer's AFAS phone fields use a supported exact format, configure that format to avoid heavier wildcard searches. |
| `OrgPersonBaseQuery`         | `PluginSettings`   | Retrieves organization and person records from AFAS Profit. Default: `Anywhere365_OrgPer?skip=0&take=20&filterfieldids=[SearchFields]&filtervalues=[SearchValues]&operatortypes=[Operators]`.                                                               |
| `ContactsBaseQuery`          | `PluginSettings`   | Retrieves contact-person records from AFAS Profit. Default: `Anywhere365_Contacts?skip=0&take=20&filterfieldids=[SearchFields]&filtervalues=[SearchValues]&operatortypes=[Operators]`.                                                                      |
| `CasesBaseQuery`             | `PluginSettings`   | Retrieves case records from AFAS Profit. Default: `Anywhere365_Cases?skip=0&take=10&filterfieldids=[SearchFields]&filtervalues=[SearchValues]&operatortypes=[Operators]`.                                                                                   |
| `ContactUrlLinkTemplates`    | `PluginSettings`   | Maps AFAS contact entity types to Insite link templates. Default: `Organisatie:organisatie-beknopt-prs?BcId=[Contact];Persoon:persoon-beknopt-prs?BcId=[Contact];Persoon bij organisatie:contactpersoon-prs?CdId=[Contact]`.                                |
| `CaseUrlLinkTemplates`       | `PluginSettings`   | Maps AFAS dossier or case types to Insite link templates. Default: `10:service-melding?SbId=[SubjectId]`.                                                                                                                                                   |
| `CaseStatus`                 | `PluginSettings`   | Maps AFAS dossier statuses to WebAgent case statuses. Default mapping treats `Goedgekeurd`, `Afgehandeld`, `Handmatig Afgehandeld`, and `Vervallen` as `Closed`; other statuses are treated as open.                                                        |
| `UseDefaultPluginAttributes` | `PluginSettings`   | Default behavior: if the setting is absent or `True`, CRM Service uses default AFAS `PluginAttributes`. Set to `False` only when all required AFAS `PluginAttributes` will be maintained manually.                                                          |
| AFAS `PluginAttributes`      | `PluginAttributes` | Map AFAS Profit attributes to WebAgent contact, contact-search, case, and case-search output.                                                                                                                                                               |

<details>

<summary>AFAS field-mapping guidance</summary>

AFAS base queries combine the Get Connector name with paging and placeholders:

* `filterfieldids=[SearchFields]` comes from searchable `PluginAttributes`.
* `filtervalues=[SearchValues]` can include phone number, SIP URI, email, ID, or manual WebAgent search text.
* `operatortypes=[Operators]` controls equality or wildcard matching.

For AFAS `PluginAttributes`, use AFAS Profit attributes as `SystemName` values. If an attribute comes from a linked entity, include the alias before the attribute. Use:

* `DisplayName` for the label shown in WebAgent.
* `ShowOnExtensionWindow` to control whether WebAgent displays the value.
* `Order`; restart numbering for each `Category`.
* `FieldType` values such as `Id`, `Name`, `PhoneNumber`, `SipAddress`, `Email`, `Date`, `Search`, and AFAS-specific `Type`.
* `Hyperlink` with the configured `Insite`, `ContactUrlLinkTemplates`, or `CaseUrlLinkTemplates`, for example `[Insite]/[ContactUrlLinkTemplates]`.
* `ShowOnToast` to force the attribute into the query.

Only disable default AFAS attributes when the replacement mapping includes the required identifier, searchable phone/email/SIP fields, and case fields.

### Default `PluginAttributes`

The default AFAS Profit rows are used when `UseDefaultPluginAttributes` is absent or `True`. Preserve the default spelling in `SystemName` values, including `AdressLine1`, `AdressLine3`, `AdressLine4`, and `SubjectIdate`.

| DisplayName          | SystemName          | Category      | Order | ShowOnExtensionWindow | FieldType            | Hyperlink                            |
| -------------------- | ------------------- | ------------- | ----: | --------------------- | -------------------- | ------------------------------------ |
| Id                   | `BcCo`              | Account       |     0 | `false`               | `Id`                 | `[Insite]/[ContactUrlLinkTemplates]` |
| Name                 | `Name`              | Account       |     1 | `true`                | `Name`               |                                      |
| Phone Number         | `TelWork`           | Account       |     2 | `true`                | `PhoneNumber,Search` |                                      |
| Mobile               | `Mobiel_werk`       | Account       |     3 | `true`                | `PhoneNumber,Search` |                                      |
| Supported Types      | `Type`              | Account       |     4 | `false`               | `Type`               |                                      |
| Address              | `AdressLine1`       | Account       |     5 | `true`                |                      |                                      |
| Postal Code City     | `AdressLine3`       | Account       |     6 | `true`                |                      |                                      |
| Country              | `AdressLine4`       | Account       |     7 | `true`                |                      |                                      |
| Email                | `MailWork`          | Account       |     8 | `true`                | `SipAddress,Search`  |                                      |
| Phone Number         | `Telefoonnr._prive` | Account       |     9 | `true`                | `PhoneNumber,Search` |                                      |
| Mobile               | `Mobiel_prive`      | Account       |    10 | `true`                | `PhoneNumber,Search` |                                      |
| Email                | `E-mail_prive`      | Account       |    11 | `true`                | `SipAddress,Search`  |                                      |
| Id                   | `PerNumber`         | Contact       |     0 | `false`               | `Id`                 | `[Insite]/[ContactUrlLinkTemplates]` |
| Name                 | `Name`              | Contact       |     1 | `true`                | `Name`               |                                      |
| Organization Nr      | `OrgNumber`         | Contact       |     2 | `true`                |                      |                                      |
| Phone Number         | `TelWork`           | Contact       |     3 | `false`               | `PhoneNumber,Search` |                                      |
| Mobile               | `MobWork`           | Contact       |     4 | `false`               | `PhoneNumber,Search` |                                      |
| Supported Types      | `Type`              | Contact       |     5 | `false`               | `Type`               |                                      |
| Address              | `AddressLine1`      | Contact       |     6 | `false`               |                      |                                      |
| Postal Code City     | `AddressLine3`      | Contact       |     7 | `false`               |                      |                                      |
| Country              | `AddressLine4`      | Contact       |     8 | `false`               |                      |                                      |
| Email                | `MailWork`          | Contact       |     9 | `true`                | `SipAddress,Search`  |                                      |
| Phone Number Private | `TelPrivate`        | Contact       |    10 | `false`               | `PhoneNumber,Search` |                                      |
| Mobile Private       | `MobPrivate`        | Contact       |    11 | `false`               | `PhoneNumber,Search` |                                      |
| Email Private        | `MailPrivate`       | Contact       |    12 | `true`                | `SipAddress,Search`  |                                      |
| Id                   | `SubjectIdate`      | Case          |     0 | `false`               | `Id`                 | `[Insite]/[CaseUrlLinkTemplates]`    |
| Subject              | `Subject`           | Case          |     1 | `true`                | `Title`              |                                      |
| Description          | `Comment`           | Case          |     2 | `true`                | `Description`        |                                      |
| Date                 | `DateCreated`       | Case          |     3 | `true`                | `Date`               |                                      |
| Status               | `Status`            | Case          |     4 | `true`                | `Status`             |                                      |
| ContactId            | `Contact.OrgPersId` | Case          |     4 | `false`               | `Id`                 |                                      |
| DossierType          | `TypeId`            | Case          |     4 | `false`               | `Type`               |                                      |
| Name                 | `Name`              | AccountSearch |     1 | `true`                | `Name`               |                                      |
| Name                 | `Naam`              | ContactSearch |     1 | `true`                | `Name`               |                                      |
| Subject              | `Subject`           | CaseSearch    |     1 | `false`               | `Name`               |                                      |

</details>

## Validate AFAS Profit CRM Service

1. Confirm that CRM Service can reach the AFAS Profit REST endpoint.
2. Search for a known AFAS Profit contact, organization, or case from WebAgent.
3. Confirm that expected AFAS fields appear in WebAgent.
4. Confirm that Insite links open the expected AFAS Profit records when links are configured.

## References

* [AFAS address and web service endpoint guidance](https://help.afas.nl/help/NL/SE/App_Conect_WebSrv_Addrss.htm)
* [AFAS import/export connector guidance](https://help.afas.nl/help/EN/SE/App_Cnnctr_ImpExp.htm)
* [AFAS fixed filter guidance for Get Connectors](https://help.afas.nl/help/EN/SE/App_Cnnctr_Get_Fltr_Fixed.htm)
* [AFAS custom app guidance](https://help.afas.nl/help/EN/SE/App_Apps_Custom_Add.htm)
* [AFAS REST call guidance for Get Connectors](https://help.afas.nl/help/EN/SE/App_Cnr_Rest_Call.htm?query=get%20connector%20rest)


---

# 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/afas-profit.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.
