Genesys Cloud - Developer Community!

Β View Only

Sign Up

  • 1.  External Contact

    Posted 7 days ago

    I'm looking for a way to load customer data so that the IVR can use it during inbound calls to identify customers with a high propensity to file complaints.

    My initial idea was to perform a daily data load via API into a Data Table. However, the Data Table limit is 5,000 records per table, and I have approximately 20,000 records. The table is not expected to grow beyond that.

    What would be the best alternative?

    1. Use a daily load distributed across 4 indexed Data Tables, allowing the IVR to search the 20,000 records?
    2. Use External Contacts. However, since this functionality is primarily designed for outbound use and indexed by ANI, while my inbound IVR lookup needs to be indexed by ClientID, I do not consider this a good option.
    3. Request an increase in the Data Table record limit to support my requirement of 20,000 records and perform the lookup against a single Data Table.
    4. Does anyone see another alternative? Have you solved a similar challenge in your projects?

    Any recommendations or lessons learned would be greatly appreciated.


    #Integrations

    ------------------------------
    Marcelo Breda
    SOLUTION ARCHITECT SR
    ------------------------------


  • 2.  RE: External Contact

    Posted 7 days ago

    Hi Marcelo,

    One question-are these 20,000 records already stored in a CRM or another backend system that can be queried by ClientID? If so, a real-time lookup using a Data Action (or a Function if additional processing is required) could avoid the need to maintain multiple Data Tables.



    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------



  • 3.  RE: External Contact

    Posted 5 days ago

    Thanks, Phaneedra.

    Since I need to perform this lookup on 100% of inbound calls, the consumption of Data Actions becomes a concern due to rate limiting. Therefore, we're trying to avoid using Data Actions.

    Even if we use a Function, the source database contains millions of records, and the data would still need to be filtered during the call. This would significantly increase the response time.

    I appreciate your help and suggestions. Thank you for taking the time to discuss this scenario with me.



    ------------------------------
    Marcelo Breda
    SOLUTION ARCHITECT SR
    ------------------------------



  • 4.  RE: External Contact

    Posted 7 days ago

    Hi Marcelo,

    If the records are in external DB, then you may use DB2Rest method along with Data Action in Genesys Cloud CX, so you can query your records in customer data.

    Thanks



    ------------------------------
    Serkan Kaya
    Communication Systems Engineer
    ------------------------------



  • 5.  RE: External Contact

    Posted 5 days ago

    Thanks Serkan. Unfortunately, since I need to perform this lookup on 100% of inbound calls, the consumption of Data Actions becomes a concern due to rate limiting. We're trying to avoid to use data actions.
    I appreciate your help and suggestion.



    ------------------------------
    Marcelo Breda
    SOLUTION ARCHITECT SR
    ------------------------------



  • 6.  RE: External Contact

    Posted 6 days ago

    Marcelo,

    We have a similar scenario in that we want our Agents to be aware of attributes of the customers before the conversation starts.  WE do this within a iFrame and do a data pull using rest APIs to the backend systems.   

    It sounds like you could avoid the Data Table limitations, for your situation, by doing real time REST APIS, either through a data action or a separate iFrame application that would notify the agent/manager/whomever of a potential for complaints based on historical trends.  If you're able to attach this to the customers phone number, then you could automate this within a flow I believe.  For us we have customers enter a unique identifier, thus our system triggers off of that.

    Hope this helps.


    Graham



    ------------------------------
    Graham Pearce
    Senior Technology Specialist, Client Care Technologies
    ------------------------------



  • 7.  RE: External Contact

    Posted 6 days ago

    Hi Graham, thank you for your response. Two points here:

    1. Since I need to perform this lookup on 100% of inbound calls, the consumption of Data Actions becomes a concern due to rate limiting.

    2. Looking up customers based on ANI is not 100% reliable, because customers do not necessarily call the IVR from the phone number registered in our system. That is why we use the clientId as the primary identifier.

    That said, I appreciate your help and suggestions.



    ------------------------------
    Marcelo Breda
    SOLUTION ARCHITECT SR
    ------------------------------



  • 8.  RE: External Contact

    Posted 6 days ago

    Marcelo,

    My apologies for not considering call volumes, at a max of 2500 requests a minute our company hasn't hit that limitation yet.  However further investigation taught me about the 50 concurrent and I can see that being an issue.

    I'd be very interested in how you solve this going forward.


    Graham



    ------------------------------
    Graham Pearce
    Technology Manager, Client Care Technologies
    ------------------------------



  • 9.  RE: External Contact

    Posted 6 days ago

    Exactly, Graham.

    Due to these limits, our intention to keep the data in Data Tables not only avoids Data Action consumption, but also provides a much faster response time than making calls from AWS to Azure and querying a backend database.

    In our environment, access to sensitive data requires secure authentication processes, including the generation and validation of tokens (JWT, JWS, and JWE) . While these security controls are necessary, they also increase response times.

    The most critical challenge for us remains the Data Table record limit.

    In theory, for 20,000 records, I would need two Data Tables, or alternatively obtain a limit increase that would allow us to use a single Data Table.

    At this point, however, we are leaning toward the Data Table approach.



    ------------------------------
    Marcelo Breda
    SOLUTION ARCHITECT SR
    ------------------------------



  • 10.  RE: External Contact

    Posted 4 days ago
    Edited by Luiz Rosa 2 days ago

    Hi Marcelo,

    As you mentioned, the simplest option is to contact Genesys Cloud Customer Care and request an increase to the Data Table row limit.

    The current limit is 10,000 rows per table, and Genesys allows customers to request a higher limit.

    If a limit of at least 20,000 rows is approved, you can keep a single Data Table using "ClientID" as the key and perform the lookup directly from Architect.

    Official limits:

    https://developer.genesys.cloud/organization/organization/limits#architect-datatables

    Another option is to use External Contacts (Create a repository of customer data ).

    First, you would need to create the contacts in an organized way using:

    POST /api/v2/externalcontacts/contacts

    During the interaction, search for the contact using (You do not necessarily need to use all these APIs to search for a contact. You can also use the native features Get External Contact action):

    GET /api/v2/externalcontacts/contacts?q={searchTerm}

    If the contact is found, retain the "contactId". If no contact is found, create a new one using:

    POST /api/v2/externalcontacts/contacts

    If necessary, retrieve the complete contact details using:

    GET /api/v2/externalcontacts/contacts/{contactId}

    Then retrieve the conversation participants and communication IDs using:

    GET /api/v2/conversations/{conversationId}

    Finally, associate the external contact with the conversation using:

    PUT /api/v2/externalcontacts/conversations/{conversationId}

    For this specific scenario, increasing the Data Table limit would probably be the simplest solution. External Contacts would require more API calls and additional logic to create, search, and associate the contact with the conversation.

    ------------------------------
    Luiz Rosa
    Full stack developer
    ------------------------------



  • 11.  RE: External Contact

    Posted 4 days ago

    OlΓ‘, Marcelo.

    Para esse cenΓ‘rio, eu avaliaria utilizar o External Contacts como uma camada de armazenamento operacional das informaΓ§Γ΅es dos clientes, em vez de distribuir os aproximadamente 20 mil registros entre vΓ‘rias Data Tables.

    Em fluxos de chamadas inbound, o Genesys Cloud disponibiliza a variΓ‘vel nativa:

    Call.ExternalContactId

    Quando a interaΓ§Γ£o jΓ‘ estΓ‘ associada a um External Contact, essa variΓ‘vel contΓ©m o identificador interno do contato. Nesse caso, nΓ£o vejo necessidade de criar uma Data Action customizada apenas para pesquisar o registro.

    O fluxo poderia utilizar diretamente a aΓ§Γ£o nativa Get External Contact, passando:

    Call.ExternalContactId

    A lΓ³gica seria semelhante a:

    Chamada inbound
          ↓
    Call.ExternalContactId estΓ‘ preenchido?
          β”œβ”€β”€ Sim
          β”‚    ↓
          β”‚ Get External Contact
          β”‚    ↓
          β”‚ InformaΓ§Γ΅es necessΓ‘rias estΓ£o preenchidas?
          β”‚    β”œβ”€β”€ Sim β†’ continuar o atendimento
          β”‚    └── NΓ£o β†’ consultar a API do cliente
          β”‚
          └── NΓ£o
               ↓
           Consultar a API do cliente pelo ClientID
               ↓
           Utilizar as informaΓ§Γ΅es retornadas
               ↓
           Criar ou atualizar o External Contact

    Na implementaΓ§Γ£o que utilizo atualmente, o comportamento Γ© parecido:

    1. O fluxo verifica se existe um External Contact associado Γ  interaΓ§Γ£o.
    2. Quando existe, recupera as informaΓ§Γ΅es jΓ‘ armazenadas.
    3. Se os campos necessΓ‘rios estiverem preenchidos, o fluxo continua sem consultar o backend do cliente.
    4. Se o contato nΓ£o existir ou estiver sem as informaΓ§Γ΅es necessΓ‘rias, o fluxo consulta a API do cliente.
    5. A resposta da API pode ser utilizada para criar ou enriquecer o External Contact, permitindo que interaΓ§Γ΅es futuras utilizem as informaΓ§Γ΅es jΓ‘ armazenadas.

    Esse modelo reduz a dependΓͺncia de consultas em tempo real ao sistema do cliente e utiliza o External Contacts como uma espΓ©cie de cache operacional.

    Um ponto importante Γ© que Call.ExternalContactId depende de a interaΓ§Γ£o jΓ‘ ter sido associada a um contato.

    Como vocΓͺ comentou que o ANI nem sempre Γ© confiΓ‘vel, podem existir chamadas em que a variΓ‘vel esteja vazia ou NOT_SET. Nesse cenΓ‘rio, o fallback por ClientID ainda seria necessΓ‘rio.

    Mesmo assim, isso nΓ£o significa que todas as chamadas precisariam consultar o backend. A consulta seria realizada apenas quando:

    • O External Contact nΓ£o estivesse identificado.
    • O contato ainda nΓ£o tivesse sido criado.
    • As informaΓ§Γ΅es necessΓ‘rias nΓ£o estivessem preenchidas.
    • Os dados estivessem vencidos ou precisassem ser recalculados.

    Para os dados adicionais, como propensΓ£o de reclamaΓ§Γ£o ou classificaΓ§Γ£o do cliente, poderiam ser utilizados custom fields do External Contact.

    AtualizaΓ§Γ£o das informaΓ§Γ΅es

    No meu caso atual, nΓ£o tenho necessidade de atualizar constantemente os dados jΓ‘ armazenados.

    Entretanto, se as informaΓ§Γ΅es precisassem permanecer sincronizadas com o sistema de origem, vejo duas alternativas principais.

    A primeira, e que considero mais eficiente, seria o sistema do cliente enviar um webhook para o backend de integraΓ§Γ£o quando alguma informaΓ§Γ£o fosse modificada:

    AlteraΓ§Γ£o no sistema do cliente
              ↓
    Webhook para o backend
              ↓
    AtualizaΓ§Γ£o do External Contact

    Dessa forma, somente os registros alterados seriam atualizados.

    A segunda alternativa seria utilizar uma trigger programada para iniciar um Workflow ou chamar um backend responsΓ‘vel por consultar os registros modificados desde a ΓΊltima sincronizaΓ§Γ£o:

    Scheduled Trigger
           ↓
    Workflow ou backend
           ↓
    Consulta por registros modificados
           ↓
    AtualizaΓ§Γ£o dos External Contacts

    Eu evitaria varrer os 20 mil registros a cada execuΓ§Γ£o. O ideal seria utilizar algum campo como:

    updatedAt
    lastModifiedDate
    lastSyncDate

    para executar uma sincronizaΓ§Γ£o incremental.

    Volume e limites

    Se o volume de chamadas simultΓ’neas ou de atualizaΓ§Γ΅es fosse muito alto, eu tambΓ©m recomendaria abrir um ticket com o suporte da Genesys.

    O objetivo do ticket seria solicitar uma avaliaΓ§Γ£o de capacidade e dos limites aplicΓ‘veis ao caso de uso, apresentando informaΓ§Γ΅es como:

    • Chamadas por minuto no horΓ‘rio de pico.
    • Quantidade de consultas por interaΓ§Γ£o.
    • NΓΊmero esperado de atualizaΓ§Γ΅es.
    • ConcorrΓͺncia mΓ‘xima.
    • Crescimento projetado.
    • Endpoints utilizados.

    A partir desses dados, a Genesys poderia avaliar se os limites atuais atendem ao cenΓ‘rio ou se existe alguma possibilidade de ajuste.

    Minha proposta arquitetural seria:

    External Contacts
        = cache operacional no Genesys Cloud
    
    API do cliente
        = fonte oficial das informaΓ§Γ΅es
    
    Call.ExternalContactId + Get External Contact
        = consulta nativa dentro do fluxo
    
    Webhook ou sincronizaΓ§Γ£o incremental
        = atualizaΓ§Γ£o dos dados
    
    API em tempo real
        = fallback

    Esse modelo nΓ£o elimina completamente a API do cliente, mas evita chamΓ‘-la em todas as interaΓ§Γ΅es.

    A consulta ao backend acontece apenas quando o Genesys Cloud ainda nΓ£o possui um contato identificado ou quando os dados armazenados nΓ£o sΓ£o suficientes.

    VocΓͺ jΓ‘ avaliou utilizar Call.ExternalContactId com a aΓ§Γ£o nativa Get External Contact dessa forma?


    Hi Marcelo,

    For this scenario, I would consider using External Contacts as an operational storage layer for customer information instead of distributing approximately 20,000 records across multiple Data Tables.

    In inbound call flows, Genesys Cloud provides the following built-in variable:

    Call.ExternalContactId

    When the interaction is already associated with an External Contact, this variable contains the contact's internal identifier. In that situation, I do not see a need to create a custom Data Action only to search for the record.

    The flow could directly use the native Get External Contact action and pass:

    Call.ExternalContactId

    The logic could be structured as follows:

    Inbound call
          ↓
    Is Call.ExternalContactId populated?
          β”œβ”€β”€ Yes
          β”‚    ↓
          β”‚ Get External Contact
          β”‚    ↓
          β”‚ Are the required fields populated?
          β”‚    β”œβ”€β”€ Yes β†’ continue the customer journey
          β”‚    └── No β†’ query the customer API
          β”‚
          └── No
               ↓
           Query the customer API using ClientID
               ↓
           Use the returned information
               ↓
           Create or update the External Contact

    The implementation I currently use follows a similar pattern:

    1. The flow verifies whether an External Contact is associated with the interaction.
    2. When a contact exists, the flow retrieves the information already stored in Genesys Cloud.
    3. If the required fields are populated, the flow continues without querying the customer's backend.
    4. If the contact does not exist or does not contain the required information, the flow calls the customer API.
    5. The API response can be used to create or enrich the External Contact so that future interactions can use the stored information.

    This approach reduces the dependency on real-time calls to the customer's system and uses External Contacts as an operational cache.

    One important consideration is that Call.ExternalContactId depends on the interaction already being associated with a contact.

    Since you mentioned that ANI is not always reliable, there may be calls where this variable is empty or NOT_SET. In that situation, the fallback lookup using ClientID would still be required.

    However, this does not mean that every interaction must query the backend. The API call would only be necessary when:

    • The External Contact was not identified.
    • The contact has not yet been created.
    • The required information is missing.
    • The stored data has expired or must be recalculated.

    Additional information, such as complaint propensity or customer classification, could be stored in External Contact custom fields.

    Keeping the information updated

    In my current implementation, I do not need to continuously refresh information that has already been stored.

    However, if the information had to remain synchronized with the source system, I would consider two main approaches.

    The first, and in my opinion the most efficient, would be for the customer's system to send a webhook to the integration backend whenever a record changes:

    Change in the customer system
              ↓
    Webhook to the backend
              ↓
    Update the External Contact

    This way, only changed records would be updated.

    The second option would be to use a scheduled trigger to start a Workflow or call a backend service responsible for retrieving records modified since the last synchronization:

    Scheduled Trigger
           ↓
    Workflow or backend
           ↓
    Retrieve modified records
           ↓
    Update External Contacts

    I would avoid scanning all 20,000 records during every execution. An incremental synchronization should preferably use a field such as:

    updatedAt
    lastModifiedDate
    lastSyncDate

    Volume and platform limits

    If the expected volume of concurrent calls or contact updates were high, I would also recommend opening a support ticket with Genesys.

    The objective would be to request a capacity and rate-limit assessment for the use case, including information such as:

    • Peak calls per minute.
    • Number of lookups per interaction.
    • Expected number of updates.
    • Maximum concurrency.
    • Projected growth.
    • APIs and endpoints involved.

    Based on these details, Genesys could evaluate whether the existing limits support the scenario or whether any adjustment is possible.

    My proposed architecture would be:

    External Contacts
        = operational cache in Genesys Cloud
    
    Customer API
        = source of truth
    
    Call.ExternalContactId + Get External Contact
        = native lookup inside Architect
    
    Webhook or incremental synchronization
        = data-update mechanism
    
    Real-time API lookup
        = fallback

    This model does not completely eliminate the customer API, but it avoids calling it during every interaction.

    The backend is queried only when Genesys Cloud does not yet have an identified contact or when the stored information is insufficient.

    Have you considered using Call.ExternalContactId together with the native Get External Contact action in this way?



    ------------------------------
    Matheus Mendonca
    ------------------------------