Legacy Dev Forum Posts

 View Only

Sign Up

Microsoft Dynamics 365 Data Actions for multiple records

  • 1.  Microsoft Dynamics 365 Data Actions for multiple records

    Posted 06-05-2025 18:41

    charaf_ed | 2019-05-10 21:26:27 UTC | #1

    Hello,

    I'm using Microsoft Data Actions to get some information from the CRM. Especially, Get Contact By Phone Number returns some specific data of the customer.

    In the case of matching multiple customer records for the same ANI, I need to display for the agent a table or list that shows the different possibilities : Row 1 : First name, Last name, Passeport, Email (for the customer 1) Row 2 : First name, Last name, Passeport, Email (for the customer 2) . . . Row n : First name, Last name, Passeport, Email (for the customer n)

    I couldn't figure out a solution to do so inside a script when the data action failed to find a unique match.

    I'm wondering if it's possible to do that by creating the list or table in a web server (iFrame) and sending those different information whenever we have multiple records.

    So, we display a web page into a script using the web server, and the agent can choose the right customer record based on his conversation with the client in real time.

    if you have encountered the same scenario and you have simpler solutions, I'm interested

    Appreciate your help

    Yours,


    Jason_Mathison | 2019-05-13 17:03:46 UTC | #2

    Hi charaf_ed,

    R.J. Smith wrote up an article about getting multiple results back from a data action here: https://developer.mypurecloud.com/forum/t/process-multiple-array-of-contacts-or-accounts-from-a-salesforce-data-action/2274

    That should get you the data you need to drive an agent UI. Feel free to upload an action export if you run into any issues.

    --Jason


    charaf_ed | 2019-05-17 21:01:52 UTC | #3

    Hello @Jason_Mathison @anon28066628,

    I'va followed your explanations to get multiple array of contacts from Dynamics data action. But I have a problem with using it in architect.

    In fact, when an input phone number matches 2 contacts in CRM, I display the information JSON.

    "contact.firstname": [ "Dan", "Alex", "Bruno" ], "contact.lastname": [ "Baron", "Simmons", "Torres" ], "contact.mobilephone": [ "762001", null, null ], "contact.new_passeport": [ "AFT5REDC", "EXTY76T", null

    In architect, I lost the outputs section when I added the Data Action (I have only the phone number as an input). I don't know how to store those information in a collection of strings, to display them into a script.

    For example : Contact 1 : firstnname : Dan lastname : baron passeport : AFT5REDC Contact 2 : firstnname : alex lastname : Simmons passeport : EXTY76T ...

    Appreciate your help


    Jason_Mathison | 2019-05-20 16:07:23 UTC | #4

    Hi @charaf_ed,

    Please post an export of your data action as well as the output from the execute step (step 8) of test mode so I can reproduce what you are seeing. Feel free to cover up any sensitive data with fake names or ** or whatever.

    --Jason


    charaf_ed | 2019-05-20 16:57:13 UTC | #5

    <a class="attachment" href="/forum/uploads/db6296/original/2X/9/94c2df6130149e272246b1eb07b1cec930c9113a.json">test-13---MCR-20190520185127.custom.json</a> (3.7 KB)

    ![image

    467x440](upload://f4ivoQlCevfSBcx5uOXlhvljboo.png)

    ![image

    690x351](upload://uYe0AJABRyn52cKkM4p7TCzq4Z1.png)

    according to my screenshots, we can see a table of values, but architect side I do not know how to recover them to return to a script as entries ?

    Yours


    Jason_Mathison | 2019-05-20 18:33:42 UTC | #6

    Hey charaf_ed, could you copy and paste the execution output instead of posting it as screenshots? Trying to reenter that manually is error prone.

    --Jason


    system | 2019-06-20 18:33:44 UTC | #7

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 5132