<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent”></a> Class ErpSyncAgent
Namespace: SuperOffice.WebApi.AgentsAssembly: SuperOffice.WebApi.dll Services for the ERP Integration Services feature <p></p> <b>Online Restricted:</b> This agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.
Inheritance
object ← AgentBase ← ErpSyncAgentImplements
IErpSyncAgent, IAgentBase, IDisposableInherited Members
AgentBase._json, AgentBase._binary, AgentBase._config, AgentBase._client, AgentBase._disposeClient, AgentBase.Merge(RequestOptions), AgentBase.BuildRequestFromObject(HttpMethod, string, object, WebApiOptions, string), AgentBase.BuildRequestFromStream(HttpMethod, string, Stream, WebApiOptions, string), AgentBase.BuildRequestFromObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string), AgentBase.ParseAuthorization(IAuthorization), AgentBase.CancelRequest(), AgentBase.SendRequestObject(HttpMethod, string, object, WebApiOptions, string), AgentBase.SendRequestObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string), AgentBase.SendRequest(HttpRequestMessage, RequestOptions), AgentBase.ThrowOnResponseErrorAsync(HttpRequestMessage, HttpResponseMessage), AgentBase.ParseResponse<T>(HttpResponseMessage), AgentBase.Finally(RequestOptions), AgentBase.Dispose(), AgentBase.Configuration, AgentBase.Client, AgentBase.HasRunningRequest, AgentBase.ClientCancellationTokenSource, AgentBase.ProgressListener, AgentBase.UploadProgressListener, object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()Examples
<pre><code class=“lang-csharp”>using SuperOffice.WebApi; using SuperOffice.WebApi.Agents; var mySession = new WebApiOptions(“http://example.com/super/api”); mySession.Authorization = new AuthorizationUsernamePassword(“user”, “pass”); using (ErpSyncAgent agent = new ErpSyncAgent(mySession)) { // call methods on agent here… }</code></pre>Constructors
<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent__ctor_System_Net_Http_HttpClient_”></a> ErpSyncAgent(HttpClient)
Constructor: Services for the ERP Integration Services featureParameters
httpClient HttpClient
Use this HTTP client instead of making own HttpClient instance.
<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent__ctor_SuperOffice_WebApi_WebApiOptions_System_Net_Http_HttpClient_”></a> ErpSyncAgent(WebApiOptions, HttpClient)
Constructor: Services for the ERP Integration Services featureParameters
options WebApiOptions
Base URL and authentication values.
httpClient HttpClient
Optional: Use this HTTP client instead of making a new one.
Methods
<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_BreakActorLinkAsync_System_Int32_System_Int32_SuperOffice_WebApi_Data_CrmActorType_SuperOffice_WebApi_RequestOptions_”></a> BreakActorLinkAsync(int, int, CrmActorType, RequestOptions)
Remove the link between a CRM entity and an ERP entity <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpConnectionId int
The ERP connection ID
crmRecordId int
The ID of the CRM entity to connect to
crmActorType CrmActorType
Identifies the CRM actor type corresponding to this CRM entity
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<bool> True if success<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_CanDeleteErpSyncConnectorEntityAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> CanDeleteErpSyncConnectorEntityAsync(int, RequestOptions)
Can we delete the connector? <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpSyncConnectorId int
The ID of the ErpSync connector to check if can be deleted
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ErpSyncResponseCode> Enum response says ok or what is wrong<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_ChangeEngineIntervalAsync_System_TimeSpan_SuperOffice_WebApi_RequestOptions_”></a> ChangeEngineIntervalAsync(TimeSpan, RequestOptions)
Change the interval for each run of the Sync Engine <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
interval TimeSpan
The run interval for the engine
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_ChangeEngineStatusAsync_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> ChangeEngineStatusAsync(bool, RequestOptions)
Change the current running/stopped status of the Sync engine <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
run bool
If true, then start the engine; otherwise stop it (requests to the Batch system, may not be immediately reflected)
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ErpSyncEngineStatus> The current status of the engine<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_ConnectActorAsync_System_Int32_System_Int32_SuperOffice_WebApi_Data_CrmActorType_System_String_SuperOffice_WebApi_Data_ErpActorType_SuperOffice_WebApi_Data_ErpSyncFieldValue___SuperOffice_WebApi_RequestOptions_”></a> ConnectActorAsync(int, int, CrmActorType, string, ErpActorType, ErpSyncFieldValue[], RequestOptions)
Create a link between Erp and Crm and set default values <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpConnectionId int
ErpConnectionId
crmRecordId int
CrmRecordId
crmActorType CrmActorType
The Crm Actor type
erpKey string
erpActorType ErpActorType
The Erp Actor type
fieldValues ErpSyncFieldValue[]
The Crm Fields
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_CreateActorLinkAsync_System_Int32_System_Int32_SuperOffice_WebApi_Data_CrmActorType_System_String_SuperOffice_WebApi_Data_ErpActorType_SuperOffice_WebApi_RequestOptions_”></a> CreateActorLinkAsync(int, int, CrmActorType, string, ErpActorType, RequestOptions)
Link a crm entity to an erp entity <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpConnectionId int
The ERP connection ID
crmRecordId int
The ID of the CRM entity to connect to
crmActorType CrmActorType
Identifies the CRM actor type corresponding to this CRM entity
erpKey string
The ERP entity identifier
erpActorType ErpActorType
The ERP actor type
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<bool> True if success<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_CreateDefaultErpSyncConnectorEntityAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultErpSyncConnectorEntityAsync(RequestOptions)
Set default values into a new ErpSyncConnectorEntity. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ErpSyncConnectorEntity> A blank ErpSyncConnectorEntity<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_CreateErpActorFromCrmAsync_System_Int32_System_Int32_SuperOffice_WebApi_Data_ErpActorType_SuperOffice_WebApi_Data_CrmActorType_SuperOffice_WebApi_Data_StringDictionary_SuperOffice_WebApi_RequestOptions_”></a> CreateErpActorFromCrmAsync(int, int, ErpActorType, CrmActorType, StringDictionary, RequestOptions)
Create ErpActor from crm entity <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
connectionId int
The connection ID
crmEntityId int
The ID of the CRM entity to create an ERP actor from
erpActorType ErpActorType
The ERP actor type
crmActorType CrmActorType
The CRM actor type
erpFieldKeyValues StringDictionary
A map of matching erp field keys and values to set for the new erp entity
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<bool> Created ERP actor with success<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_DeleteConnectionAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteConnectionAsync(int, RequestOptions)
Deletes a connection from the database. <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpConnectionId int
Primary key of the connection
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task A void return<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_DeleteErpSyncConnectorEntityAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteErpSyncConnectorEntityAsync(int, RequestOptions)
Deletes the ErpSyncConnectorEntity <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpSyncConnectorEntityId int
The identity of the ErpSyncConnectorEntity
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_ForceResyncAsync_System_Int32_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> ForceResyncAsync(int, int[], RequestOptions)
Force resync from CRM or given Erp connection to all other connections <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpConnectionId int
If positive, resync from the given erp connection
internalKeyIds int[]
The internal keys of the entities to resync, or empty to resync all
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<PluginResponse> The response<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_ForceResyncBatchTaskAsync_System_Int32_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> ForceResyncBatchTaskAsync(int, int[], RequestOptions)
Start batch task to force resync from CRM or given Erp connection to all other connections <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpConnectionId int
If positive, resync from the given erp connection
internalKeyIds int[]
The internal keys of the entities to resync, or empty to resync all
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_ForceResyncExternalAsync_System_Int32_SuperOffice_WebApi_Data_ErpActorType_System_String___SuperOffice_WebApi_RequestOptions_”></a> ForceResyncExternalAsync(int, ErpActorType, string[], RequestOptions)
Force resync from CRM or given Erp connection to all other connections, using external keys <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpConnectionId int
Resync from the given erp connection
erpActorType ErpActorType
Which actor type the external keys are associated with
externalKeys string[]
The internal keys of the entities to resync, or empty to resync all
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<PluginResponse> The response<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_ForceResyncExternalNoBlankValuesAsync_System_Int32_SuperOffice_WebApi_Data_ErpActorType_System_String___SuperOffice_WebApi_RequestOptions_”></a> ForceResyncExternalNoBlankValuesAsync(int, ErpActorType, string[], RequestOptions)
Force resync from CRM or given Erp connection to all other connections, using external keys, and tell the sync that you don’t want blank values to overwrite non-blank values. Useful on import. <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpConnectionId int
Resync from the given erp connection
erpActorType ErpActorType
Which actor type the external keys are associated with
externalKeys string[]
The internal keys of the entities to resync, or empty to resync all
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<PluginResponse> The response<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_ForceResyncNoBlankValuesAsync_System_Int32_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> ForceResyncNoBlankValuesAsync(int, int[], RequestOptions)
Force resync from CRM or given Erp connection to all other connections and tell the sync that you don’t want blank values to overwrite non-blank values. Useful on import. <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpConnectionId int
If positive, resync from the given erp connection
internalKeyIds int[]
The internal keys of the entities to resync, or empty to resync all
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<PluginResponse> The response<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_ForceSyncAllAsync_SuperOffice_WebApi_RequestOptions_”></a> ForceSyncAllAsync(RequestOptions)
Sync all active connections even when automatic sync is off <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<PluginResponse> The response<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_GetActorTypeMappingAsync_System_Int32_SuperOffice_WebApi_Data_ErpActorType_SuperOffice_WebApi_RequestOptions_”></a> GetActorTypeMappingAsync(int, ErpActorType, RequestOptions)
Get the current mappings for one connection/actor; connection+actor type = unique key <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpConnectionId int
The ERP connection ID
actorType ErpActorType
The actor type
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ErpSyncActorTypeMapping> The current mapping from the database<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_GetAllConnectionsAsync_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> GetAllConnectionsAsync(bool, RequestOptions)
Returns all ERP Sync connections without config field data. Uses theErpConnection archive.
<p></p>
<b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.
Parameters
includeDeleted bool
Include deleted connections in the result?
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ErpConnection[]> The connection id, name, description<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_GetAllConnectorsAsync_SuperOffice_WebApi_RequestOptions_”></a> GetAllConnectorsAsync(RequestOptions)
Returns all ERP Sync connectors. Uses theErpConnector archive.
<p></p>
<b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.
Parameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ListItem[]> The connector id, name, url<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_GetConfigurationFieldsAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetConfigurationFieldsAsync(int, RequestOptions)
Returns all fields needed to connect to the given connector <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpConnectorId int
The id of the erp connector
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<FieldMetadata[]> The fields<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_GetConnectionAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetConnectionAsync(int, RequestOptions)
Returns the specified connection. <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpConnectionId int
Primary key of the connection
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ErpConnection> The connection<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_GetConnectionListMappingsAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetConnectionListMappingsAsync(int, RequestOptions)
Returns the listmappings for the specified connection. <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpConnectionId int
Primary key of the connection
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ErpConnectionListMappingContainer> The listmappings<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_GetConnectionsAndDisplayFieldsAsync_SuperOffice_WebApi_Data_CrmActorType_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetConnectionsAndDisplayFieldsAsync(CrmActorType, int, RequestOptions)
Get all connection statuses and fields for a given entity <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
crmActorType CrmActorType
The type of the CRM entity
entityId int
The id of the entity
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ErpConnectionData[]> An array of ErpConnectionData carriers<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_GetCrmActorTypeAsync_System_Int32_SuperOffice_WebApi_Data_ErpActorType_SuperOffice_WebApi_RequestOptions_”></a> GetCrmActorTypeAsync(int, ErpActorType, RequestOptions)
Retrieves the CrmActorType that are mapped to a specific ErpActorType for this connection <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpConnectionId int
The ERP connection ID
erpActorType ErpActorType
The ERP actor type
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<CrmActorType> The CrmActorType<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_GetDefaultValueInfoAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetDefaultValueInfoAsync(int, RequestOptions)
Get information about default value for an ERP field <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpFieldId int
The id of the ERP field
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ErpSyncDefaultValue> Object with information about default values<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_GetEngineStatusAsync_SuperOffice_WebApi_RequestOptions_”></a> GetEngineStatusAsync(RequestOptions)
Get the current status of the Sync engine <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ErpSyncEngineStatus> The current status of the engine<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_GetErpConnectionConfigFieldsAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetErpConnectionConfigFieldsAsync(int, RequestOptions)
Returns the config fields for the connection. <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpConnectionId int
Primary key of the erp connection
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<StringDictionary> Config Fields<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_GetErpFieldValuesAsync_System_Int32_SuperOffice_WebApi_Data_CrmActorType_System_Int32_System_String___SuperOffice_WebApi_RequestOptions_”></a> GetErpFieldValuesAsync(int, CrmActorType, int, string[], RequestOptions)
Get the values for the specified fields from the ERP connection <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpConnectionId int
The id of the connection
crmActorType CrmActorType
The type of the CRM entity
entityId int
The id of the entity
fieldKeys string[]
The fields for which you want to get the values
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<string[]> An array containing the values for the specified fields, in the same order<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_GetErpSyncConnectionSummaryAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetErpSyncConnectionSummaryAsync(int, RequestOptions)
Get a summary of the current ErpSync configuration/setup <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpSyncConnectionId int
The ID of the ErpSync connection for which information is sought
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ErpSyncConnectionSummary> Summary of connection information, and one summary element per configured actor type<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_GetErpSyncConnectorEntityAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetErpSyncConnectorEntityAsync(int, RequestOptions)
Gets a specific ErpSyncConnectorEntity object. <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpSyncConnectorEntityId int
The identifier of the ErpSyncConnectorEntity object
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ErpSyncConnectorEntity> ErpSyncConnectorEntity<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_GetFieldValuesFromCrmAsync_System_Int32_SuperOffice_WebApi_Data_CrmActorType_SuperOffice_WebApi_RequestOptions_”></a> GetFieldValuesFromCrmAsync(int, CrmActorType, RequestOptions)
Get Crm Field values <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
recordId int
The id of the CRM entity
actorTypeCrm CrmActorType
CRM Actor type
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ErpSyncFieldValue[]> The Crm Fields<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_GetFieldValuesFromErpAsync_System_Int32_SuperOffice_WebApi_Data_ErpActorType_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetFieldValuesFromErpAsync(int, ErpActorType, string, RequestOptions)
Get Erp Field values <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpConnectionId int
Erp connection id
actorTypeErp ErpActorType
ERP Actor type
erpKey string
Primary key for the erp actor
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ErpSyncFieldValue[]> The Erp Fields<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_GetFieldsForNewErpActorAsync_System_Int32_SuperOffice_WebApi_Data_ErpActorType_SuperOffice_WebApi_RequestOptions_”></a> GetFieldsForNewErpActorAsync(int, ErpActorType, RequestOptions)
Get the fields that must be filled out when creating a new ERP actor <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpConnectionId int
The id of the connection
erpActorType ErpActorType
The type of the ERP actor to create
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<FieldMetadata[]> The fields that are required for the new ERP actor<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_MoveErpFieldItemAsync_System_Int32_System_Int32_System_Int32_SuperOffice_WebApi_Data_ErpActorType_SuperOffice_WebApi_RequestOptions_”></a> MoveErpFieldItemAsync(int, int, int, ErpActorType, RequestOptions)
Moves the rank of the erp field up or down <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpFieldId int
The id of the erp field to move
direction int
Positive value to increase rank, negative to decrease.
erpConnectionId int
The id of the connection
erpActorType ErpActorType
The actor type for which we want to rank fields
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_SaveActorTypeMappingAsync_SuperOffice_WebApi_Data_ErpSyncActorTypeMapping_SuperOffice_WebApi_RequestOptions_”></a> SaveActorTypeMappingAsync(ErpSyncActorTypeMapping, RequestOptions)
Save mappings for a connection/actor <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
mapping ErpSyncActorTypeMapping
The mapping to be saved; new mapping rows will be created in the database if needed
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ErpSyncActorTypeMapping> The current mapping from the database<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_SaveConnectionAsync_SuperOffice_WebApi_Data_ErpConnection_SuperOffice_WebApi_RequestOptions_”></a> SaveConnectionAsync(ErpConnection, RequestOptions)
Saves a connection to the database. <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
connection ErpConnection
The connection to save.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ErpConnection> The resulting connection.<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_SaveConnectionListMappingsAsync_SuperOffice_WebApi_Data_ErpConnectionListMappingContainer_SuperOffice_WebApi_RequestOptions_”></a> SaveConnectionListMappingsAsync(ErpConnectionListMappingContainer, RequestOptions)
Saves a connection to the database. <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
listMapping ErpConnectionListMappingContainer
The list item mappings to save.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ErpConnectionListMappingContainer> The saved list mappings.<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_SaveDefaultValueInfoAsync_SuperOffice_WebApi_Data_ErpSyncDefaultValue_SuperOffice_WebApi_RequestOptions_”></a> SaveDefaultValueInfoAsync(ErpSyncDefaultValue, RequestOptions)
Save information about a default value for an ERP field <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpSyncDefaultValue ErpSyncDefaultValue
The id of the ERPfield to save
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ErpSyncDefaultValue> The newly saved ErpSyncDefaultValue<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_SaveErpConnectionSyncPrioritiesAsync_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> SaveErpConnectionSyncPrioritiesAsync(int[], RequestOptions)
Takes an array of the ErpConnection ids and saves these as ordered sync priorities <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpConnectionIds int[]
The id put in array in the same order as the priorities
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<bool> Returns true if new sync priorities is saved<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_SaveErpSyncConnectorEntityAsync_SuperOffice_WebApi_Data_ErpSyncConnectorEntity_SuperOffice_WebApi_RequestOptions_”></a> SaveErpSyncConnectorEntityAsync(ErpSyncConnectorEntity, RequestOptions)
Updates the existing ErpSyncConnectorEntity or creates a new ErpSyncConnectorEntity if the id parameter is 0. <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpSyncConnectorEntity ErpSyncConnectorEntity
The ErpSyncConnectorEntity that is saved.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ErpSyncConnectorEntity> New or updated ErpSyncConnectorEntity<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_SupportsAdvancedSearchAsync_System_Int32_SuperOffice_WebApi_Data_ErpActorType_SuperOffice_WebApi_RequestOptions_”></a> SupportsAdvancedSearchAsync(int, ErpActorType, RequestOptions)
Indicates if the connection supports advanced search for the given erp actor <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpConnectionId int
Ths id of the connection
erpActorType ErpActorType
The erp actor type to check for
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<bool> True if advanced search is supported<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_SyncAllAsync_SuperOffice_WebApi_RequestOptions_”></a> SyncAllAsync(RequestOptions)
Sync all active connections <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<PluginResponse> The response<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_TestConnectionByConfigAsync_System_Int32_SuperOffice_WebApi_Data_StringDictionary_SuperOffice_WebApi_RequestOptions_”></a> TestConnectionByConfigAsync(int, StringDictionary, RequestOptions)
Tests to see if the given connection has a valid connection to its connector <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpConnectionId int
The id of the connector we try to connect to
configFields StringDictionary
The config fields used to test connection
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<bool> Returns true if success<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_TestConnectionByIdAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> TestConnectionByIdAsync(int, RequestOptions)
Tests to see if we can establish a connection with the given config fields <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpConnectionId int
The id of the connection
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<bool> Returns true if success<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_TestConnectorUrlAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> TestConnectorUrlAsync(string, RequestOptions)
Test if connector urls anwers <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
url string
The url to test connection on
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ErpSyncResponseCode> Enum response says ok or what is wrong<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_ToggleErpConnectionActiveAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> ToggleErpConnectionActiveAsync(int, RequestOptions)
Toggles the Active state of the connection <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpConnectionId int
Primary key of the erp connection
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<string[]> Contains the reason for why the toggle failed. Empty if operation was successful<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_TryConnectActorAsync_System_Int32_System_Int32_SuperOffice_WebApi_Data_CrmActorType_System_String_SuperOffice_WebApi_Data_ErpActorType_SuperOffice_WebApi_Data_ErpSyncFieldValue___SuperOffice_WebApi_RequestOptions_”></a> TryConnectActorAsync(int, int, CrmActorType, string, ErpActorType, ErpSyncFieldValue[], RequestOptions)
Create a link between Erp and Crm and set default values <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpConnectionId int
ErpConnectionId
crmRecordId int
CrmRecordId
crmActorType CrmActorType
The Crm Actor type
erpKey string
erpActorType ErpActorType
The Erp Actor type
fieldValues ErpSyncFieldValue[]
The Crm Fields
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<bool><a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_UpdateConnectionFieldsAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> UpdateConnectionFieldsAsync(int, RequestOptions)
Gets all supported actor types, and all fields for each actor type, and save this state to the CRM database <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
erpConnectionId int
The ERP connection ID
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<bool> Success or fail<a id=“SuperOffice_WebApi_Agents_ErpSyncAgent_ValidateArchiveColumnConfigAsync_System_String_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> ValidateArchiveColumnConfigAsync(string, int, RequestOptions)
Clear field info from table SUPERLISTCOLUMNSIZE if field mapping changed on given connection <p></p> <b>Online Restricted:</b> The ErpSync agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.Parameters
listOwner string
GUI name used in archive control config
erpConnectionId int
The ERP connection ID
requestOptions RequestOptions
Override language/culture codes on this request.