# AFAS plugin
Integrates AFAS Profit (opens new window) with the Epona provisioning service. The plugin periodically syncs clients, matters, and documents from AFAS to SharePoint, and optionally fetches documents immediately after a matter is created.
DLL: Epona.AFAS.dll
# What it does
- Matter sync — reads projects and organisations from AFAS via the REST API and creates or updates clients and matters in SharePoint on a configurable schedule.
- Document sync — downloads attachments from AFAS dossiers and uploads them to the correct SharePoint document library folder, mapped via metadata.
- Post handler — when a matter is created in SharePoint, immediately fetches related AFAS dossier documents without waiting for the next scheduled run.
- Team members sync — optionally reads team members from an AFAS connector and maps them to SharePoint group members.
# Deployment
- Copy
Epona.AFAS.dllto the service's bin directory. - Restart the provisioning service.
- Open the Configurator, select the relevant
SharepointCfg, and configure the AFAS section that now appears in the property grid.
# Configuration structure
The plugin configuration is nested:
Configuration (one per SharepointCfg)
└── ConfigurationInstance (list) — one per AFAS environment or use case
└── AFASJob (list) — one per sync task (matter job or document job)
# Configuration reference
# Configuration
Top-level settings attached to a SharepointCfg.
# Name
Type: string | Default: AFAS
Display name for this plugin configuration.
# ConfigurationInstances
Type: ConfigurationInstance (list)
One or more AFAS connection configurations.
# ConfigurationInstance
Defines a connection to one AFAS environment.
# Name
Type: string | Default: AFAS
Unique name for this instance. Used in log messages and secret key naming.
# Disabled
Type: boolean | Default: false
Set to true to disable this instance without removing it.
# Url
Type: string
Base URL of the AFAS REST endpoint. Example: https://12345.rest.afas.online/profitrestservices/
# AfasToken
Type: string
AFAS API token. Stored encrypted. Managed via the Secrets manager in the Configurator.
# TestMapping
Type: boolean | Default: false
When enabled, moves parsed JSON to the test directory and skips updating the last-changed timestamp. Use to validate field mappings without modifying state.
# Debug
Type: boolean | Default: false
Enables verbose debug logging for this instance.
# Jobs
Type: AFASJob (list)
One or more sync jobs.
# AFASJob
Defines a single scheduled sync task. A job is a matter job if MatterCode is set, and a document job if both FileUrl and DocumentMetadataUrl are set.
# Scheduling
# Name
Type: string
Unique job name within the instance.
# Disabled
Type: boolean | Default: false
Disables this job without removing it.
# Url
Type: string
AFAS REST connector path relative to the instance base URL. Matter example: profitrestservices/connectors/SharePoint_Projecten. Document example: profitrestservices/connectors/Profit_Subject_Attachments_2.
# IntervalInMinutes
Type: integer
How often the job runs.
# StartTime
Type: TimeSpan
Earliest time of day the job may run. Leave empty to run at any time.
# EndTime
Type: TimeSpan
Latest time of day the job may run. Leave empty to run at any time.
# LastRunDateTimeFieldName
Type: string
AFAS field name used to filter records modified since the last run. For matters: Project_Gewijzigd_op. For documents: Instuurdatum.
# Debug
Type: boolean | Default: false
Enables verbose debug logging for this job.
# Matter job settings
# MatterCode
Type: string
AFAS field that maps to the SharePoint matter code. Supports composite values with \| separator. Example: Project\|CL_{OrgPersId}.
# MatterName
Type: string
AFAS field that maps to the SharePoint matter name.
# MatterFieldMapping
Type: string
Maps AFAS fields to SharePoint matter fields. Syntax: sharepointField=afasField;sharepointField2=afasField2.
# MatterFilter
Type: string
Filters applied when reading matters from AFAS. Syntax: <afasField>=<value>;.
# ClientCode
Type: string
AFAS field that maps to the SharePoint client code.
# ClientName
Type: string
AFAS field that maps to the SharePoint client name.
# ClientFieldMapping
Type: string
Maps AFAS fields to SharePoint client fields. Same syntax as MatterFieldMapping.
# MatterFilePostHandlerDocumentJobName
Type: string
Name of the document job that the post handler should execute after matter creation. Must match the Name of a document job in the same ConfigurationInstance.
# Document job settings
A job becomes a document job when both FileUrl and DocumentMetadataUrl are set.
# DocumentMetadataUrl
Type: string
AFAS connector path for fetching dossier metadata. Example: profitrestservices/connectors/SharePoint_Dossiers.
# DocumentMetadataDossierIdColumnName
Type: string
AFAS metadata field containing the dossier ID. Example: DossierId. Required for the post handler.
# DocumentMetadataFilterColumnName
Type: string
AFAS field used to filter the metadata connector. Example: DossierId.
# DocumentMetadataMapping
Type: string
Maps AFAS metadata fields to SharePoint document metadata fields. Same syntax as MatterFieldMapping.
# DocumentFilter
Type: string
Filters applied when reading documents. Syntax: <afasField>=<value>;.
# FileUrl
Type: string
AFAS file connector path for downloading attachment bytes. Example: profitrestservices/fileconnector.
# DocumentSubjectIDColumnName
Type: string
AFAS field used to link documents to their dossier. Example: subject_id.
# DocumentFileIdColumnName
Type: string | Default: file_id
AFAS field containing the file identifier.
# DocumentFileNameColumnName
Type: string | Default: file_name
AFAS field containing the filename.
# DocumentAttachmentIdColumnName
Type: string | Default: attachment_id
AFAS field containing the attachment identifier.
# DocumentTargetFolder
Type: string
SharePoint document library subfolder where synced documents are placed.
# Post handler dossier filter settings (matter job)
Used by the post handler to look up dossier documents at matter creation time. All three properties must be set together.
# DossierFiltersFieldsIdsColumnNames
Type: string
Comma-separated AFAS filter field IDs. Example: OrgPersId,Project.
# DossierFiltersValuesColumnNames
Type: string
Comma-separated source field names to read filter values from. Supports {empty}. Example: {Nummer},{empty}.
# DossierFiltersOperatorTypes
Type: string
Comma-separated AFAS operator type values. Example: 1,1.
# Provisioning set references
These properties link a synced matter to the provisioning configuration that should be applied when the matter is created.
# MatterSiteCollectionSet
Type: string
Name of the SiteCollectionCfg to use for provisioning the matter site collection.
# MatterSiteSet
Type: string
Name of the SiteCfg to apply to the matter site.
# MatterPermissionSet
Type: string
Name of the PermissionSetCfg to apply to the matter site.
# MatterDocLibSets
Type: string (list)
Names of DocLibCfg entries to provision on the matter site.
# ClientSiteCollectionSet
Type: string
Name of the SiteCollectionCfg for the client site collection.
# ClientSiteSet
Type: string
Name of the SiteCfg for the client site.
# ClientPermissionSet
Type: string
Name of the PermissionSetCfg for the client site.
# Team members sync
Optional. Reads team members from an AFAS connector and assigns them to a SharePoint group or column.
# TeamMembersUrl
Type: string
AFAS connector path for team member data.
# TeamMembersFilterColumnName
Type: string
AFAS field to filter on.
# TeamMembersFilterValueColumnNameInSource
Type: string
Source field whose value is used as the filter value.
# TeamMembersEmailAddressColumnName
Type: string
AFAS field containing the member's email address.
# TeamMembersMembersColumnName
Type: string
Target SharePoint column or group name to write members to.
# Example configuration
| Property | Example value |
|---|---|
Name | AFAS |
ConfigurationInstances[0].Name | Production |
ConfigurationInstances[0].Url | https://12345.rest.afas.online/profitrestservices/ |
ConfigurationInstances[0].Jobs[0].Name | MatterSync |
ConfigurationInstances[0].Jobs[0].Url | profitrestservices/connectors/SharePoint_Projecten |
ConfigurationInstances[0].Jobs[0].IntervalInMinutes | 15 |
ConfigurationInstances[0].Jobs[0].LastRunDateTimeFieldName | Project_Gewijzigd_op |
ConfigurationInstances[0].Jobs[0].MatterCode | ProjectCode |
ConfigurationInstances[0].Jobs[0].MatterName | ProjectNaam |
ConfigurationInstances[0].Jobs[0].MatterFieldMapping | MatterType=ProjectType;Responsible=Verantwoordelijke |
ConfigurationInstances[0].Jobs[0].MatterSiteCollectionSet | MatterSite |
ConfigurationInstances[0].Jobs[0].MatterSiteSet | MatterSite |
ConfigurationInstances[0].Jobs[0].MatterPermissionSet | MatterSite |
ConfigurationInstances[0].Jobs[0].MatterFilePostHandlerDocumentJobName | DocumentSync |
ConfigurationInstances[0].Jobs[1].Name | DocumentSync |
ConfigurationInstances[0].Jobs[1].Url | profitrestservices/connectors/Profit_Subject_Attachments_2 |
ConfigurationInstances[0].Jobs[1].FileUrl | profitrestservices/fileconnector |
ConfigurationInstances[0].Jobs[1].DocumentMetadataUrl | profitrestservices/connectors/SharePoint_Dossiers |
ConfigurationInstances[0].Jobs[1].DocumentMetadataDossierIdColumnName | DossierId |
ConfigurationInstances[0].Jobs[1].DocumentSubjectIDColumnName | subject_id |
ConfigurationInstances[0].Jobs[1].DocumentTargetFolder | Correspondence |
ConfigurationInstances[0].Jobs[1].DossierFiltersFieldsIdsColumnNames | OrgPersId,Project |
ConfigurationInstances[0].Jobs[1].DossierFiltersValuesColumnNames | {Nummer},{empty} |
ConfigurationInstances[0].Jobs[1].DossierFiltersOperatorTypes | 1,1 |
ConfigurationInstances[0].Jobs[1].IntervalInMinutes | 60 |
# Related
- Configuration reference — provisioning configuration reference
- Plugins index — list of available plugins