Event types
Use these exact values in a subscription's events array. The same value appears in the event property of each delivery. Matching is exact, so use the full name shown.
| Event type | Raised when | data |
|---|---|---|
AgencyMax.AgencyManagement.Events.AgentCreated | An agent is registered. | Agent snapshot |
AgencyMax.AgencyManagement.Events.AgentUpdated | An agent or its related data changes. | Agent snapshot |
AgencyMax.AgencyManagement.Events.AgentDeleted | An agent is deleted. | agency, agentCode, eventTimestamp |
AgencyMax.AgencyManagement.Events.HierarchyBuildCompleted | A hierarchy rebuild for the agency finishes. | agency, eventTimestamp |
For every Agency Management event, the payload source is /agencymanagement/eventpublisher. For background on these events, see Agency Management events.
New event types can be added at any time, so ignore any event value you don't recognize.
Agent snapshot
For AgentCreated and AgentUpdated, data holds the agent's current state, read when the delivery is prepared:
{
"agency": "3f2c8a8e-5b7d-4b8e-9d9a-0f6c1e2a4b11",
"agentCode": "A1051",
"firstName": "Jordan",
"middleName": null,
"lastName": "Rivera",
"commonName": "Jordan",
"email": "jordan.rivera@example.com",
"status": "Active",
"payStatus": "Active",
"directUplineCode": "A1001",
"level": 70,
"addresses": [
{
"type": "Mailing",
"line1": "100 Main St",
"line2": null,
"city": "Austin",
"stateOrProvince": "TX",
"postalCode": "78701",
"country": "US"
}
],
"phones": [
{ "type": "Mobile", "countryCode": 1, "phoneNumber": "5125550100" }
]
}
| Property | Description |
|---|---|
status | Active or Deactivated, taken from the current pay status. |
payStatus | The pay status in effect today. |
directUplineCode | The direct upline in effect today. |
level | The agent level value in effect today. |
The snapshot shows the agent's state when the delivery was prepared, not when the event happened. If you need the full agent record, including fields that aren't in the snapshot, call GET /agents/{agentCode}.
Other events
| Property | Type | Description |
|---|---|---|
agency | GUID | The internal identifier of the agency. |
agentCode | string | The affected agent (AgentDeleted only). |
eventTimestamp | ISO 8601 | When the change happened. |