CrmSync
abstract class CrmSync extends BaseHook implements xi_crm_synchronisation_hook
Abstract Class for CRM Sync Plugins This abstract class incorporates the old interface and is the recommended way to create new sync plugins for the CRM
Properties
Controller | $mod | Instance providing the hook |
from BaseHook |
array | $_hook_info | Hook Information "id" => "4914" "instance_id" => "api_microsoft" "name" => "oauth_client" "hook" => "webservice.oauth_client" "type" => "object" "registry_name" => "oauth_client" "function_name" => "" "internal" => "no" "dep_mode" => "local" "active" => "yes" "title" => "Basic functions" "description" => "" "options" => "" |
from BaseHook |
int | $_crm_contact_id | ||
array | $_crm2src_map |
Methods
This function should create a new/empty contact in source and return a reference key The CRM will use updateContactPropertyValues() afterwards to set the properties
This function should delete the contact associated with the reference key
This function should return true, when the referenced contact has been deleted in source The function will be called before getContactPropertyValues and as a result may delete the crm contact
This function should return all available properties of the source, which are meant to be available for synchronisation The keys should not change afterwards, as they will be used for mapping and identification
Return the properties of the specified contact
Get Hook identifier consists of instance_id puncto separator and hook name Ex. instance_id.name
Return Hook information (ID, InstanceID, Name, Hook Type, Object Type, ...)
This function should return reference keys for contacts which have been created in source since the last sync The CRM will call getContactPropertyValues() for the given contacts to retrieve the data
Returns Values of specified Fields after sync time
Get all Fields available for Synchronisation
Returns true if this hook is available otherwise false.
Set the values in source
Update the properties of the specified contact
Details
at line 67
abstract string
createContact()
This function should create a new/empty contact in source and return a reference key The CRM will use updateContactPropertyValues() afterwards to set the properties
at line 87
abstract bool
deleteContact(string $sourceReferenceKey)
This function should delete the contact associated with the reference key
at line 56
abstract mixed
getContactIsDeleted(string $sourceReferenceKey)
This function should return true, when the referenced contact has been deleted in source The function will be called before getContactPropertyValues and as a result may delete the crm contact
at line 23
abstract array
getContactProperties()
This function should return all available properties of the source, which are meant to be available for synchronisation The keys should not change afterwards, as they will be used for mapping and identification
at line 45
abstract array
getContactPropertyValues(string $sourceReferenceKey, string[] $propertyKeys, int $syncTime = null)
Return the properties of the specified contact
in
BaseHook at line 76
string
getHookDescription()
No description
in
BaseHook at line 55
string
getHookIdentifier()
Get Hook identifier consists of instance_id puncto separator and hook name Ex. instance_id.name
in
BaseHook at line 45
array
getHookInfoValue(bool $key = false)
Return Hook information (ID, InstanceID, Name, Hook Type, Object Type, ...)
in
BaseHook at line 69
string
getHookInstance()
No description
in
BaseHook at line 62
string
getHookName()
No description
in
BaseHook at line 83
string
getHookTitle()
No description
at line 34
abstract array
getNewContacts(int $syncTime = null)
This function should return reference keys for contacts which have been created in source since the last sync The CRM will call getContactPropertyValues() for the given contacts to retrieve the data
in
BaseHook at line 88
getObject()
No description
at line 128
array
get_field_values(array $sync_keys, $source_ref_id, int|bool $sync_time = false)
Returns Values of specified Fields after sync time
at line 114
get_sync_fields()
Get all Fields available for Synchronisation
at line 92
bool
isAvailable()
Returns true if this hook is available otherwise false.
at line 143
bool
set_field_values(array $sync_key_values, string|int $source_ref_id, int $sync_time)
Set the values in source
at line 78
abstract bool
updateContactPropertyValues(string $sourceReferenceKey, $propertyKeyValues, $syncTime)
Update the properties of the specified contact