Published at: 2025-10-30

Call Center Integration - Universal Connector


1. ShareCRM-side Call Center Initialization

Call Center plugin configuration path: Administration → Business Plugin Management → Call Center

  • After tenant initialization completes, the following items are created:

① A Role named “Call Center Agent” is added under Administration → Role Permissions Management → Business Feature Permissions → Role Permission Settings

② A preset CRM object named “Call Log” is added

2. Plugin Configuration

First, select the Service Provider: “New Provider Integration” and enter the provider name.

picture coming soon:

Next, perform the following steps to ensure proper system integration:

step 1: Parameter configuration;
step 2: Callback function configuration;
step 3: Outbound-call function configuration;
step 4: Phone bar component integration (optional — skip if you do not need phone bar integration)

3. Notes on Function Configuration

3.1 URL formats

Replace placeholders with appropriate values per scenario when configuring URLs:

POST requests:

Without string: https://www.fxiaoke.com/open/callcenter/common/handle/pushData/{fsEa}/{eventType}/{callType}

With string: https://www.fxiaoke.com/open/callcenter/common/handle/pushData/string/{fsEa}/{eventType}/{callType}

GET requests:

With get, without string: https://www.fxiaoke.com/open/callcenter/common/handle/pushData/get/{fsEa}/{eventType}/{callType}

With get and string: https://www.fxiaoke.com/open/callcenter/common/handle/pushData/get/string/{fsEa}/{eventType}/{callType}

3.1.1 URL placeholder descriptions

{fsEa}: tenant identifier (required)
{eventType}: the event type corresponding to this URL
{callType}: call type — in (incoming) or out (outbound). This value can be empty.

3.1.2 Difference between URLs with “string” and without

  • With “string”: the response body is a plain string. This is typically used for third‑party screen-pop integrations. In most cases the non-string URL is sufficient.

picture coming soon:

  • Without “string”: the response is a standard JSON structure

// errorCode=0 indicates success
// eventType in data indicates the event type; result is the function return { “errorCode”: 0, “errorMessage”: “Success”, “data”: { “eventType”: “popThird”, “result”: “https://www.fxiaoke.com/open/cc/?code=2010&msg=…” }, “traceMsg”: “callcenter-provider Server: 10.124.68.61, env: fstest-gray, traceId: fs-eservice-gray/639c1d0239fcbd0001695d52” }

3.2 Callback function behavior

When the provider calls the configured URL, the bound callback function receives the transmitted parameters. The eventType and all parameters received from the provider are passed through to the function for custom business processing based on eventType and payload.

4. Function Configuration Guide

Callback functions and outbound-call functions use the same configuration.

Return type: Map
Bound CRM object: Call Log

picture coming soon:

Functions accept fixed parameters:

picture coming soon:

Callback function parameters:

type: String name: eventType — the event type defined in the URL
type: Map name: externalDataMap — parameters sent in the request

The fields inside externalDataMap depend on the provider’s request payload.

Outbound-call function parameters:

type: Map name: externalDataMap — parameters sent in the request

Example externalDataMap for outbound-call function: { “callOutApiName”: “AccountObj”, // API name of the object being called “callOutDataId”: “629ddf6484d613000131686d”, // ID of the object record being called “customerNum”: “18390940098” // Phone number being called }

Outbound-call function template

/** * @codeName Call Center Outbound Function Template */ // You can read values from externalDataMap: [callOutApiName, callOutDataId, customerNum] Fx.log.info(“Received parameters: “ + externalDataMap);

// Retrieve tenant binding and current agent information String methodName = “queryBindInfo”; // Example seatId Map args = [“seatId”: “2002”]; // Unified call template def ret = Fx.proxy.callAPI(“eservice.proxy”, [“x-fs-methodname”: methodName,”Content-Type”: “application/json;charset=UTF-8”], [“args”: args]); HttpResult result = ret.data as HttpResult; Map map = result.content as Map; Fx.log.info(“Tenant and agent binding info: “ + map);

Fx.log.info(“Outbound request start”); /** * Implement outbound request logic per provider documentation; you can use the binding info above */ Fx.log.info(“Outbound request end”);

// Return an empty result map Map resultMap = [:]; return resultMap;

Callback function template

/** * @codeName Call Center Callback Function Template */ Fx.log.info(“Received eventType: “ + eventType); Fx.log.info(“Received parameters: “ + externalDataMap); Map resultMap = [:];

/** * Implement logic according to eventType. Use the unified call template to invoke platform APIs; differentiate by methodName and args */

// (1) To get tenant binding and current agent info, call: String methodName = “queryBindInfo”; // seatId: if provided, query binding by seatId; otherwise the system uses current userId Map args = [“seatId”: “2002”]; def ret = Fx.proxy.callAPI(“eservice.proxy”, [“x-fs-methodname”: methodName,”Content-Type”: “application/json;charset=UTF-8”], [“args”: args]); HttpResult result = ret.data as HttpResult; Map map = result.content as Map;

// (2) To trigger a screen-pop in a third-party system, return the pop URL: // String methodName = “getPopWindowUrl”; // args example: [“seatId”:”2002”, “customerNum”:”18390940098”] // Build resultMap from the called API result: // resultMap = [“url”: (map.data as Map).url]; // To force a direct redirect add action flag newCallCenterAction: // resultMap = [“url”: (map.data as Map).url, “newCallCenterAction”:”redirect”];

// (3) To pop the ShareCRM Workbench (or show floating window) — typically called on ringing: // String methodName = “popWorkbench”; // args example: [“seatId”:”2002”, “customerNum”:”18390940098”, “callId”:”medias_3-1671505262.109912”, “callType”:”in”];

// (4) After step (3), always hide the floating window (typically on hangup): // String methodName = “hangupHandle”; // args example: [“callId”:”medias_3-1671505262.109912”, “isDealing”: true]; // Return resultMap at the end return resultMap;

5. Provided Platform APIs

Query tenant and agent binding information

// Method name String methodName = “queryBindInfo” Map args = [“seatId”: “2002”]; // seatId: if provided, query by seatId; otherwise query by current userId def ret = Fx.proxy.callAPI(“eservice.proxy”, [“x-fs-methodname”: methodName,”Content-Type”: “application/json;charset=UTF-8”], [“args”: args]); HttpResult result = ret.data as HttpResult; Map map = result.content as Map; Fx.log.info(“Tenant and current agent binding info: “ + map);

Return format: tenantInfo and paramMappings are tenant-level data (always returned). userInfo is per-user and returned conditionally. { “errorCode”: 0, “errorMessage”: “Success”, “data”: { “tenantInfo”: { “name”: “New Provider Name” }, “paramMappings”: [ { “name”: “account”, “apiName”: “account”, “value”: “N000000004037” } ], “userInfo”: { “seatId”: “2002”, “userId”: 1000 } } }

Pop ShareCRM Workbench and show floating window (call on ringing)

String methodName = “popWorkbench”; // args: [“seatId”:”2002”, “customerNum”:”18390940098”, “callId”:”medias_3-1671505262.109912”, “callType”:”in”] Map args = [“seatId”: “2002”, “customerNum”:”18390940098”, “callId”:”medias_3-1671505262.109912”, “callType”:”in”]; def ret = Fx.proxy.callAPI(“eservice.proxy”, [“x-fs-methodname”: methodName,”Content-Type”: “application/json;charset=UTF-8”], [“args”: args]); HttpResult result = ret.data as HttpResult; Fx.log.info(“Pop result: “ + result); return resultMap;

Clear floating window and update agent answering state

(After calling “popWorkbench” you must call this to clear the floating window; usually triggered on hangup)

String methodName = “hangupHandle”; // args: [“callId”:”medias_3-1671505262.109912”, “isDealing”: true] Map args = [“callId”: “medias_3-1671505262.109912”, “isDealing”: true]; def ret = Fx.proxy.callAPI(“eservice.proxy”, [“x-fs-methodname”: methodName,”Content-Type”: “application/json;charset=UTF-8”], [“args”: args]); HttpResult result = ret.data as HttpResult; Fx.log.info(“Clear floating window: “ + result); return resultMap;

Upload recording file (typically on hangup)

String methodName = “uploadRecordFile”; // args: [“fileUrl”: “"] Map args = ["fileUrl": "https://api-sh.clink.cn/download_record_file?AccessKeyId=..."]; def ret = Fx.proxy.callAPI("eservice.proxy", ["x-fs-methodname": methodName,"Content-Type": "application/json;charset=UTF-8"], ["args": args]); HttpResult result = ret.data as HttpResult; Map map = result.content as Map; // fileUrl is the recording URL after upload to ShareCRM servers Fx.log.info("File URL: " + (map.data as Map).fileUrl);

Third‑party system screen-pop

String methodName = “getPopWindowUrl”; // args: [“seatId”:”2002”, “customerNum”:”18390940098”] Map args = [“seatId”: “2002”, “customerNum”:”18390940098”]; def ret = Fx.proxy.callAPI(“eservice.proxy”, [“x-fs-methodname”: methodName,”Content-Type”: “application/json;charset=UTF-8”], [“args”: args]); HttpResult result = ret.data as HttpResult; Map map = result.content as Map; Map resultMap = [“url”: (map.data as Map).url]; Fx.log.info(“Pop URL: “ + resultMap); return resultMap;

Phone bar component template

System Settings → Custom Development Platform → Custom Components → New

picture coming soon:

picture coming soon:

picture coming soon:

6. Account Binding

User integration primarily binds ShareCRM users to call center users. After binding, the user will have both call center and CRM capabilities. Binding steps:

① Select a ShareCRM employee (the selected employee must have the Call Center Agent Role assigned)
② Enter the third-party agent/staff number

picture coming soon:

picture coming soon:

7. Business Settings

You can configure call center business settings in the ShareCRM backend. Supported settings include:

① Screen-pop matching list: if a phone number matches multiple Accounts or Contacts, display a list of Accounts or Contacts.
② Custom screen-pop field mapping: choose which fields to use for caller identification; set screen-pop priority as needed.
③ Quick-create options on screen-pop: when an incoming call cannot be matched to existing records, provide a quick-create entry per configuration.
④ Agent answer priority settings: without synchronizing customer data to the call center system, you can return specific parameters to the provider for voice routing.
⑤ Grant temporary data permissions to agents for business operations.

picture coming soon:

picture coming soon:

Outbound settings include:

picture coming soon:

8. One‑Click Outbound

When agents need to place outbound calls directly from the CRM, configure outbound functionality on the ShareCRM side to enable one‑click outbound.

The system presets Account, Leads, and Contact objects as outbound-enabled objects. To enable one-click outbound on these objects, do the following two items:

  • Add a custom button on the object. The button API name must be: button_e_call_out__c.

  • Configure outbound fields under Outbound Settings as shown below.

image

If you need outbound capability on other objects, perform these steps:

  • Add the object as an outbound object under Outbound Settings.

image

image

image

Note: Adding outbound buttons consumes custom button quota. If you run out of quota, initialization may fail. After increasing quota, manually add the custom button with API name: button_e_call_out__c

Submit Feedback