Totango Integration Handling User and Account IDs
Overview
Section titled “Overview”When integrating with Totango’s search users API, we need to ensure we can properly map users and accounts between Totango and our system (cast.app). This document explains how to handle the required identifier fields in your Totango queries.
The Challenge
Section titled “The Challenge”- Customers provide their own Totango queries
- Field names for user and account identifiers may not be consistent
- We need reliable ways to map users and accounts between systems
The Solution
Section titled “The Solution”We automatically add two essential identifier fields to every query:
totango_user_idfor user identificationtotango_account_idfor account identification
How to Implement
Section titled “How to Implement”1. Add User ID Field
Section titled “1. Add User ID Field”Add this to the fields section of your query if not already present:
{ "type": "string", "term": "identifier", "field_display_name": "totango_user_id"}2. Add Account ID Field
Section titled “2. Add Account ID Field”Add this to the parent_account_fields section of your query if not already present:
{ "type": "string", "term": "identifier", "field_display_name": "totango_account_id", "index": 0}Example: Before and After
Section titled “Example: Before and After”Before (Original Query)
Section titled “Before (Original Query)”{ "object": "users", "query": { "terms": [ { "type": "string_attribute", "attribute": "contact_account_role", "in_list": ["Customer"] } ], "fields": [ { "type": "string_attribute", "attribute": "Email", "field_display_name": "Email" } ], "parent_account_fields": [ { "type": "simple_date_attribute", "attribute": "Contract Start Date", "field_display_name": "Contract Start Date" } ] }}After (With Required ID Fields)
Section titled “After (With Required ID Fields)”{ "object": "users", "query": { "terms": [ { "type": "string_attribute", "attribute": "contact_account_role", "in_list": ["Customer"] } ], "fields": [ { "type": "string", "term": "identifier", "field_display_name": "totango_user_id" }, { "type": "string_attribute", "attribute": "Email", "field_display_name": "Email" } ], "parent_account_fields": [ { "type": "string", "term": "identifier", "field_display_name": "totango_account_id", "index": 0 }, { "type": "simple_date_attribute", "attribute": "Contract Start Date", "field_display_name": "Contract Start Date" } ] }}Important Notes
Section titled “Important Notes”- The field names must be exactly as shown:
- Use
totango_user_idfor user identification - Use
totango_account_idfor account identification
- Use
- For account ID, always set
index: 0in the parent_account_fields - These fields are required for proper system integration
Benefits
Section titled “Benefits”- Consistent user and account mapping between systems
- Prevents integration issues due to missing identifiers
- Works regardless of custom fields in customer queries