Additional configuration CRM Service for Afas Profit

Note Additional CRM connector license required.

Introduction

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

  • SharePoint > UCC CONFIG > Plugin Attributes

  • SharePoint > UCC CONFIG > Plugin Settings

 

PluginAttributes

The plugin attributes list contains the mapping between the data entities in Afas Profit and the Contacts and Cases info in the Web Agent. This mapping is used to determine which fields will be shown in the Web Agent 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 Attributes 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 Web Agent.

SystemName

Must be the Salesforce 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 Web Agent. 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

Make the property clickable with the Hyperlink specified. It is possible to include the value of a property in the Hyperlink. This is done by putting the value of a SystemName property in square brackets in the Hyperlink. For example if there is a property with the SystemName ‘Example’, then the URL becomes: http://www.example.com/?queryString=[Example]

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.

Note: ContactSearch will fall back to Contact if no items are supplied for the ContactSearch category. The same rule applies to Lead, LeadSearch, Case and CaseSearch. Only Contact is mandatory to have items.

 

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.

PluginSettings

  1. Open the UCC Config page on SharePoint

  2. Open the Plugin Settings list

  3. The following optional settings can be added:

    Note: All plugin settings for the CrmService must have the Scope set to CrmService.

     

    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: e.g. +0012345678. See “The International Public Telecommunication Number Plan”.

    2. International: e.g. +1 206-555-1234. Based on the E.123 International format.

    3. Rfc3966: e.g. tel:+1-206-555-1234. See “The tel URI for Telephone Numbers”.

    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.

    Important: change this setting if phone numbers are stored in any of the other formats to improve performance. 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

 

The following mandatory Settings should be added to the default PluginSettings list items to enable the CRM Service:

Setting

Value

Scope

Token

The Afas security token to connect to the Afas Get Connector. The token has to be encrypted with the Anywhere365 password tool.

Mandatory setting.

CrmService

ConnectorRestServiceBaseUrl

Url of the Afas Profit rest service. Mandatory setting.

CrmService

InSite

Url of Afas Insite, Afas Insite is a web application that can be used to open and display relevant Afas records to an agent during a call. Mandatory setting.

CrmService

 

Example Token example (this token is invalid):

<token><version>1</version><data>D563AE2A016846549376192A1B70F968E85967B84A095DBCBA33748C1DE29CB2</data></token>

Example ConnectorRestServiceBaseUrl

https://<Orgnumber>.rest.afas.online/Profitrestservices/connectors/

Each Afas environment had a specific url used for the rest endpoints.The OrgNumber field between brackets is a place holder for the real organization number of the company using Afas. If for instance the organization number is 12345, the url becomes: https:/12345.rest.afas.online/Profitrestservices/

Example of an AFAS Insite url: https://12345.afasinsite.nl/

Afas Insite is the web application used to access Afas and Afas records. In case of a positive match on contacts or cases, the retrieved contact or case records shown in the web EW or Web Agent will also have a hyperlink to the record in Afas Insite.

 

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 Ew. 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 BaseCaseQuery. Only the name of the connector (Anywhere365_Cases) is different.

The rest service url (setting ConnectorRestServiceBaseUrl) combined with the BaseContactQuery, OrgPersonBaseQuery or BaseCaseQuery 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 AfasProfit) to a WebAgent case status.

The status of a case record has to be mapped to the Web Agent case status because the Web Agent 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 AfasProfit

Status in WebAgent

Goedgekeurd

Closed

Afgehandeld

Closed

Handmatig Afgehandeld

Closed

Vervallen

Closed

 

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

Organisatie_persoon__intern_

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

ContactId

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.