Overview
This guide explains how to connect RingCentral’s RingCX web service integrations to Pure CallerID (Aegis) Record Sets.
The goal is to capture live call events such as dispositions, call completions, and agent activity, directly into your Pure CallerID data environment for advanced routing logic.
A Record Set in Pure CallerID is a flexible data silo that can store any structured or unstructured information. Each record can include identifiers, attributes, timestamps, and metadata for use in Aegis workflows, enrichment, and decisioning.
Step 1: Create a Record Set in Aegis
Navigate to Aegis → Record Sets → Create Record Set
-
Complete the configuration fields:
Record Set Name: Freeform; used in the API endpoint.
-
TTL (Time to Live): Controls when records expire.
Enable or disable.
Configure duration and unit (minutes, hours, days, etc.).
-
Strict Phone Validation:
If enabled, ensures the
phonefield contains a valid phone number (used as the record key).If disabled,
phonecan be any unique value such as an account ID or UII.
Attributes: Define data fields to store any call or lead data. No field count limit.
Once created:
Download the CSV Template for field mapping (useful for manual data management).
Review the Record Set Management documentation.
Step 2: Understand RingCX Web Service Options
Within RingCX campaigns and queues, six web services are available:
| Web Service | Description | Typical Use |
|---|---|---|
| Agent Connect Web Service | Fires when an agent connects to a call. | Use for “call start” events. |
| Agent Termination Web Service | Fires when an agent leg ends. | Capture call summaries or recording links. |
| Transfer Termination Web Service | Fires when a transfer leg ends. | Rarely used for simple logging. |
| Post Disposition Web Service | Fires when a disposition (manual or system) is submitted. | Ideal for call outcomes. |
| Post Call Web Service | Fires when the lead or agent disconnects. | Used for “call completed” events. |
| Auto Result File Disposition | Batch CDR export (legacy, daily). | Historical use only. |
Reference:
Step 3: Configure Web Services in RingCX
Go to Admin → Developer Tools → Voice → Web Services.
Create a Web Service Group.
-
Click Add New Web Service and define:
URL: The Pure CallerID API endpoint (see example below).
Headers: Include your API key and content type.
Body: JSON payload mapping RCX variables to Record Set attributes.
Save the configuration and assign it to your campaigns or queues.
Example endpoint for Post Call web service:
POST https://aegis.purecallerid.app/api/public/aegis/recordSet/add?name=YOUR_RECORDSET_NAME
Headers:
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Sample payload:
[
{
"phone": "#uii#",
"attributes": {
"event": "post_call",
"accountId": "#account_id#",
"campaignId": "#campaign_id#",
"campaignName": "#campaign_name#",
"queueId": "#queue_id#",
"queueName": "#queue_name#",
"skillName": "#skill_name#",
"listId": "#list_id#",
"listDesc": "#list_desc#",
"uii": "#uii#",
"sessionId": "#sess_session_id#",
"agentSessionId": "#sess_agent_id#",
"passUii": "#pass_uii#",
"leadId": "#lead_id#",
"externId": "#extern_id#",
"leadPhone": "#lead_phone#",
"ani": "#ani#",
"dnis": "#dnis#",
"origDnis": "#orig_dnis#",
"leadState": "#lead_state#",
"leadTimezone": "#lead_timezone#",
"address1": "#address1#",
"address2": "#address2#",
"city": "#city#",
"state": "#state#",
"zip": "#zip#",
"email": "#email#",
"firstName": "#first_name#",
"midName": "#mid_name#",
"lastName": "#last_name#",
"agentId": "#agent_id#",
"agentExternId": "#agent_externid#",
"agentUsername": "#agent_username#",
"agentFirstname": "#agent_firstname#",
"agentLastname": "#agent_lastname#",
"agentTeam": "#agent_team#",
"agentNotes": "#agent_notes#",
"callStart": "#call_start#",
"callEnd": "#call_end#",
"callResult": "#call_result#",
"termParty": "#sess_term_party#",
"termReason": "#sess_term_reason#",
"ivrDurationSec": "#ivr_duration#",
"ivrTermParty": "#ivr_term_party#",
"ivrTermReason": "#ivr_term_reason#",
"ringTimeSec": "#ring_time#",
"queueDurationSec": "#queue_duration#",
"dialDurationSec": "#sess_dial_duration#",
"durationSec": "#duration#",
"wrapTimeSec": "#wrap_time#",
"dialerType": "#type#",
"amdResult": "#amd_result#",
"systemDisposition": "#sess_dial_disposition#",
"outboundDisposition": "#outbound_disposition#",
"agentDisposition": "#agent_disposition#",
"passDisposition": "#pass_disposition#",
"passNumber": "#pass_number#",
"finalPass": "#final_pass#",
"passDts": "#pass_dts#",
"sessDialDts": "#sess_dial_dts#",
"auxData1": "#aux_data1#",
"auxData2": "#aux_data2#",
"auxData3": "#aux_data3#",
"auxData4": "#aux_data4#",
"auxData5": "#aux_data5#",
"auxPhone": "#aux_phone#",
"dispositionCode": "#disposition#",
"dispositionLabel": "#disposition_name#",
"recordingUrl": "#recording_url#",
"recordingId": "#recording_id#",
"recordingDurationSec": "#recording_duration#",
"transferIndicator": "#transfer_indicator#"
}
}
]Tip: Use the
#uii#field as your unique identifier in thephonefield to avoid overwriting duplicate records, allowing you to count and decision against all passes and outcomes.
Step 4: Attach Web Services to Campaigns or Queues
Outbound Campaigns
Go to Dialing → Campaigns.
Select the desired Campaign Group → Campaign.
Scroll to General Campaign Settings.
Under Campaign Integrations, select your web service(s).
Save changes.
Use the Post Disposition and Post Call web services for most outbound scenarios.
Inbound Queues
Navigate to Routing → Voice Queues and Skills.
Select a Queue Group → Queue.
In General Queue Settings, attach the web service(s).
Save changes.
Step 5: Verify and Monitor
After configuration:
Allow live calls or test data to post to your connected Record Set.
Validate in Aegis that records appear correctly with all mapped attributes.
Optional: Create separate Record Sets per web service type for clarity and isolation.
Step 6: Advanced Decisioning
Use Record Sets to enforce guardrails and branch logic in real time. Add Decision or JavaScript nodes to:
Count passes and block retries after a threshold.
Branch on systemResult / AMD / disposition.
Parse agent notes for keywords and escalate.
Cool-off a or phone or account with many phones for a period (TTL) after a bad outcome by account ID or other unique triggers that are not phone specific.
Fail safe if data is missing or delayed.
Quick Decision node rules to consider
Block after N passes in 24h
Condition:attributes.attemptCount >= 3andattributes.last24h=true→ goTo “DoNotDial”AMD human vs machine
Ifattributes.amdResult == "HUMAN"→ goTo “LiveFlow”
Else ifattributes.amdResult == "MACHINE"→ goTo “VMFlow”System failure retry backoff
Ifattributes.systemResult IN ["BUSY","NO_ANSWER","ABANDON"]andattemptCount < 3→ goTo “RetryLater”Hard stop outcomes
Ifattributes.dispositionCode IN ["DNC","WRONG_NUMBER","CEASE"]→ goTo “BlockAndTag”Agent note keyword
Ifattributes.agentNotes CONTAINS "lawyer" OR "complaint"→ goTo “EscalateCompliance”
Minimal schema tips
-
For example, the following are some suggested minimal attributes in the Post-Dispo set to simplify branching:
#call_result#→ overall system result (Post Call)#amd_result#→ AMD classification when enabled#disposition#→ disposition code (Post Disposition)#disposition_name#→ disposition label (Post Disposition)#agent_notes#→ agent-entered notes, if enabled#agent_id#→ unique agent ID#campaign_id#→ campaign identifier#call_start#→ call start timestamp
-
Maintain counters:
attemptCount— derived in Aegis by counting records for a specific key (e.g.,#uii#or#lead_phone#) within a defined time window, such as the last 24 hours.
Use UII as key when you want per-attempt granularity.
Use phone as key when you want lead-level throttling.
Safety and idempotency
Make JavaScript nodes idempotent. Re-runs should not inflate counts.
Prefer read-then-decide. Write guards with TTL for cool-offs.
Add a default route for missing or delayed fields.
Appendix: Common Fields from RingCX Webhooks
RingCX provides the following fields out of the box (plus any custom fields):
Session Data |
General ACD |
Dialer Fields |
|---|---|---|
| sess_session_id | uii | pass_uii |
agent_externid |
agent_externid |
|
sess_agent_id |
agent_id |
agent_id |
sess_agent_username |
agent_username |
agent_username |
sess_agent_firstname |
agent_firstname |
|
| sess_agent_lastname | agent_lastname | |
| call_start | ||
| sess_duration | duration | duration |
sess_dial_disposition |
outbound_disposition | agent_disposition |
pass_disposition |
||
sess_dial_dts |
pass_dts |
|
pass_number |
||
final_pass |
||
| sess_dial_duration | ivr_duration | |
sess_term_party |
ivr_term_party | |
| sess_term_reason | ivr_term_reason | call_result |
| agent_team | ||
agent_wait_time |
||
agent_wrap_time |
||
| call_start | ||
queue_duration |
||
ring_time |
||
campaign_id |
||
campaign_name |
||
dial |
||
type |
||
ani |
lead_phone | |
dnis |
||
orig_dnis |
||
| agent_notes | ||
lead_id |
lead_id |
|
list_id |
||
list_desc |
||
| extern_id | ||
first_name |
||
mid_name |
||
last_name |
||
lead_state |
||
lead_timezone |
||
address1 |
||
address2 |
||
city |
||
state |
||
zip |
||
email |
||
aux_datal |
||
aux_datal2 |
||
aux_data3 |
||
aux_data4 |
||
aux_data5 |
||
aux_phone |