On Premises

Additional configuration CRM Service for AFAS Profit

Note

An additional AnywhereNow WebAgent for Voice or for Omnichannel license is required.

Introduction

Follow the instructions below when you want to add additional settings to the CRM Service for Afas Profit.

PluginSettings

  1. Open the UCC Config page on SharePoint

  2. Open the Plugin Settings list

  3. The following optional settings can be added:

Setting Value Scope
DefaultPhoneNumberRegion

Iso 3166 alpha-2 code. Default ZZ.

CrmService
PhoneNumberFormat

The format used when searching the CRM phone number fields when a call comes in. There are 5 options. Default setting is WildCard.

  1. E164 The E.164 phone number format is an international (ITU) standard for dialing telephone numbers on the Public Switched Telephony Network (PSTN). Loosely formulated, only "+" and upto 15 digits (0-9) are allowed For example: +4433221100 (For number notation/display and storage see the E.123 standard): e.g. +12065551234 Based on the E.164 The E.164 phone number format is an international (ITU) standard for dialing telephone numbers on the Public Switched Telephony Network (PSTN). Loosely formulated, only "+" and upto 15 digits (0-9) are allowed For example: +4433221100 (For number notation/display and storage see the E.123 standard) International Phone Numbering format. Learn More - ITU (E.164).

  2. International: e.g. +1 (206) 555-1234. Based on the E.123 The E.123 format is an international (ITU) standard for notation and storage of international telephone numbers, email addresses and web addresses. Loosely formulated, "+ ", digits, non alphanumeric characters (like brackets, hyphens) and spaces are allowed For example: +44 (333) 221-100 International Notation format. Learn More - ITU (E.123)

  3. Rfc3966 The rfc3966 format defines an international (IETF) standard for dialing (and storing) a telephone number as a URI. Loosely formulated, start the URI with "tel:" followed by an E.164 or E.123 formatted phone number. For example: tel:+44333221100: e.g. tel:+12065551234. Based on the SIP The Session Initiation Protocol, or SIP, is a protocol for multimedia communication (audio, video and data communication). SIP is also used for Voice over IP (VoIP). SIP has interactions with other Internet protocols such as HTTP and SMTP. Uri format "tel:+". Learn More - RFC3966.

  4. Wildcard: do a wildcard search. This option is the default value in case setting PhoneNumberFormat has not been configured.

  5. Pattern: Search on a predefined pattern.

The WildCard format is used by default for AFAS because AFAS Profit does not enforce one of the globally used phone number formats like E164. A wild card search is a relative heavy search, because it is a like search with multiple wild cards.

In case the phone number fields uses one of the supported formats like E164, setting the plugin to this format will ensure that the Crm Service will use an equals search instead of a like search, which will be faster and more efficient.

It is also possible to define a custom phone number format in case the phone number fields support formats not covered by the other phone number formats. In that case select option Pattern. For each format add a setting PhoneNumberPattern followed by an incremental integer. So in case of 1 format add setting PhoneNumberPattern or PhoneNumberPattern1. In case of 2 or more formats use settings PhoneNumberPattern1 and PhoneNumberPattern2. See Phone Number Recognition in Integrations for more information.

CrmService
OrgPersonBaseQuery

Query template to retrieve Organization and Person records from Afas,

Default: Anywhere365_OrgPer?skip=0&take=20&filterfieldids=[SearchFields]&filtervalues=[SearchValues]&operatortypes=[Operators]

See Available Base Queries section below.

CrmService
ContactsBaseQuery

Query template to retrieve contacts from Afas,

Default: Anywhere365_Contacts?skip=0&take=20&filterfieldids=[SearchFields]&filtervalues=[SearchValues]&operatortypes=[Operators]

See Available Base Queries section below.

CrmService
CasesBaseQuery

Query template to retrieve cases from Afas,

Default: Anywhere365_Cases?skip=0&take=10&filterfieldids=[SearchFields]&filtervalues=[SearchValues]&operatortypes=[Operators]

See Available Base Queries section below.

CrmService
CaseStatus

Mapping of a case (incident) status (statuscode) to a WebAgent case status. See Case Status mapping section below.

CrmService
ContactUrlLinkTemplates

Each Afas record entity type has it’s own unique url. This setting contains a mapping between the Afas record entity type and the linked url template for contacts. The currently supported entity types are Organizations, Persons and ContactPersons.

Default mapping: Organisatie:organisatie-beknopt-prs?BcId=[Contact];Persoon:persoon-beknopt-prs?BcId=[Contact];Persoon bij organisatie:contactpersoon-prs?CdId=[Contact]

CrmService
CaseUrlLinkTemplates

Each Afas record entity type has it’s own unique url. This setting contains a mapping between the Afas record entity type and the linked url template for cases. The cases are linked to the dossier entity in Afas. There are a lot of dossier types. Each dossier type has it’s own unique url template.

Default: 10:service-melding?SbId=[SubjectId]

CrmService
UseDefaultPluginAttributes

Setting to overrule the default plugin attributes settings.

If this setting does not exist or the value is set to True then the default plugin attributes settings are used. If you want to overrule the default PluginAttributes settings just add this setting and set the value to False.

All PluginAttributes will have to be added manually if set to False.

CrmService

For the mandatory Settings see Add PluginSettings

Available Base Queries

Afas Profit data is obtained using rest API requests. See Afas documentation about REST service.

Queries are created using base filter queries and further completed using the attributes in the PluginAttributes list.

The following base queries are available:

  • OrgPersonBaseQuery: Used to retrieve relevant contact info during a call. Retrieve Person and Organisation records from Afas Profit.

  • BaseContactQuery: Used to retrieve relevant contact info during a call. Retrieve Contact Person records from Afas Profit. Current default: Anywhere365_Contacts?skip=0&take=20&filterfieldids=[SearchFields]&&filtervalues=[SearchValues]&operatortypes=[Operators]

  • BaseCaseQuery: Used to retrieve relevant case info. Mapped to the Dossier entity in Afas Profit. Current default: Anywhere365_Cases?skip=0&take=10&filterfieldids=[SearchFields]&filtervalues=[SearchValues]&operatortypes=[Operators]

The base queries can be divided in 6 parts. If we dissect the BaseContactQuery, we will see the folllowing settings:

  1. Anywhere365_Contacts: The name of the used Afas Get connector to retrieve Contact Info.

  2. skip=0: The number of records that will be skipped.

  3. take=20: The number of records that will be retrieved.

  4. Filterfieldids: The Afas fields that will be filtered on. These fields are configured in the Plugin Attributes List.

  5. Filtervalues: The search values in the request. The most common search values are:

    • Phone number: Phone number of the caller\callee during the phone call conversation. The Crm Service will do an equal or like query based on the configured phone number format.

    • Sip uri: Sip Uri of the caller\callee during the phone call conversation. The sip uri is often compared with the email fields and is an equals search.

    • Email: In case a search value is recognized as an email, the Crm Service will do an equals search on the email fields.

    • Id: The Id field is mainly used to retrieve cases based on the id of a selected contact. The Crm Service will do an equals search on an Id field.

    • Other search values like manually entered search values in the WebAgent. These are mostly used in like searches.

  6. OperatorTypes: The operators used in the search request. For instance equals or like operators.

The same setup applies tot settings OrgPersonBaseQuery and CasesBaseQuery. Only the name of the connector (Anywhere365_Cases) is different.

The rest service url (setting ConnectorRestServiceBaseUrl) combined with the ContactsBaseQuery, OrgPersonBaseQuery or CasesBaseQuery setting is used to create a request to retrieve data from the AFAS rest Services.

CaseStatus mapping

The table shows the default mapping of a case (dossier) status (as assigned in AFAS Profit) to a WebAgent case status.

The status of a case record has to be mapped to the WebAgent case status because the WebAgent only supports the statuses Open, Closed and New. Currently only the Closed statuses are mapped for Afas Profit. Otherwise the status will be assumed to be Open (it would be a nice option to be able to use the original status instead of the mapped status in the future).

Value as in AFAS Profit Status in WebAgent
Goedgekeurd Closed
Afgehandeld Closed
Handmatig Afgehandeld Closed
Vervallen Closed

PluginAttributes

The plugin attributes list contains the mapping between the data entities in AFAS Profit and the Contacts and Cases info in the WebAgent. This mapping is used to determine which fields will be shown in the WebAgent or Extension Window. It also maps important information like which fields contains the unique id of an entity. Or which fields are phone number or email fields. All items are grouped by the Category field.

Note

Only modify this list if you want to deviate from the default PluginAttributes. See Predefined PluginAttributes for the defaults and how to override these defaults.

The PluginAttributes list contains the following columns:

Column Meaning
DisplayName

Name of the property shown in the WebAgent.

SystemName

Must be the AFAS profit attribute. If it is part of a linked entity then the alias must precede the attribute.

ShowOnExtensionWindow

Indicate that the property is visible in the WebAgent. The main reasons to set this to ‘No’ and still configure it as an item is when the property should not be shown, but is used in a Hyperlink or it’s an ID.

Order

The order in which the property is to be shown.

Important

Counting must restart for each Category.

FieldType

Zero or more field types, these are covered per Category later on.

Hyperlink

Combination of pluginsetting Insite and setting ContactUrlLinkTemplates or CaseUrlLinkTemplates. Example: [Insite]/[ ContactUrlLinkTemplates]

OpenAutomatically

Ignored by the CrmService.

Category

The Category for this item.

ShowOnToast

Can be used to force the inclusion of the attribute in the query.

It is possible to combine the values of several properties, for instance when a name is split up in multiple properties, e.g. a FirstName and LastName column. In this case both properties should have the same DisplayName and they should appear after each other in Order, e.g. 1 and 2.

The sections below give a short description for the supported categories.

Contact

The items in this category are the properties shown of a single contact. It supports the following field types:

Field type Description
Id

This field type in combination with a value in the Hyperlink column, will be shown as CRM link.

Name

The name of the contact which will be shown as the contact’s title.

PhoneNumber

Column may contain a phone number.

SipAddress

Column may contain a SIP-address.

Email

Column may contain an e-mail address.

Date

Column contains a date (and time).

Search

Column is searchable. This type should be set for each column containing a PhoneNumber, Email or SipAddress to search for a contact match. This type will also mark a field as a search option if no ContactSearch items are configured.

Type

The contact record type in AFAS. The default AFAS Get Connector used by the CRM Service returns the types: Person, ContactPerson, Organization.

ContactSearch

This category is used to display a summary of the contact and used for searching contacts. All properties which should be searchable, must have the Search field type.

Case

The DisplayNames in this category are fixed. The following items are supported:

DisplayName Description
Title

Multiple items can have this DisplayName. Must have field type Title.

Description

Only a single item is allowed to have this DisplayName. Must have field type Description.

Date

Must have the Date field type to be used.

Status

The values must match the CaseStatus setting. Add field type Status.

Type

The values must match the CaseStatus setting. Add field type Type.

Id

Unique Id of the case. This Id is used to create the hyperlink to the Case record. FieldType Id mandatory.

ContactId

Unique Id of the Organization or Person linked to the case/dossier item. The Id is used to retrieve cases based on an Id of a Person or Organization. FieldType Id mandatory.

CaseSearch

This category is used to define on which field a case will be searched in case of a manual search.

Predefined PluginAttributes

Note

These predefined attributes may be overwritten/removed by creating a PluginAttribute item in SharePoint with the same SystemName and Category. Do not give it any field types and set both ShowOnExtensionWindow and ShowOnToast to No to remove this attribute from the query. Also make sure that the system name is not included in any hyperlink!

Note

The base query in the PluginSettings list must also be modified when adding attributes of another entity.

Account

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

The Account category is used to map Afas Profit Organization and Person records to contact info in the CRM Service.

Category Account is liked to the result from the request defined in plugin setting OrgPersonBaseQuery.

Contact

DisplayName SystemName Category Order ShowOnExtensionWindow FieldType HyperLink

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

The Contact category is used to map Afas Profit Contact Person records to contact info in the Crm Service.

Category Contact is mapped to the result from the request defined in plugin setting OrgPersonBaseQuery.

Case

DisplayName SystemName Category Order ShowOnExtensionWindow FieldType HyperLink

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

Case is mapped to Afas entity type Dossier. There are many dossier types, but they have the same basic fields in the Afas Service

AccountSearch

DisplayName SystemName Category Order ShowOnExtensionWindow FieldType HyperLink

Name

Name

AccountSearch

1

true

Name

Search on Organization and Person records in Afas. Default search is on name. If the Crm Service receives a search value in email format, the Crm Service will do a search on the email fields in category Account. If the Crm Service receives a phone number search value in sip uri format (tel:+316...), the Crm Service will do a search on the phone number fields in category Account.

ContactSearch

DisplayName SystemName Category Order ShowOnExtensionWindow FieldType HyperLink

Name

Naam

ContactSearch

1

true

Name

Search on Contact Person records in Afas. Default search is on name and email. If the Crm Service receives a search value in email format, the Crm Service will do a search on the email fields in category Contaxt. If the Crm Service receives a phone number search value in sip uri format (tel:+316...), the Crm Service will do a search on the phone number fields in category Contact.

CaseSearch

DisplayName SystemName Category Order ShowOnExtensionWindow FieldType HyperLink

Subject

Subject

CaseSearch

1

false

Name

Default search is currently only on subject.