web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 general forum

Help with customizing "recommendations" for our contacts

(0) ShareShare
ReportReport
Posted on by 803

Here's the situation (fictionalized, but it's essentially what we need to do):

We always ask our clients all the fruit they've ever tried, and whether they liked the fruit, can't recall, or didn't like it. Then we'll send them some fruit that we hope they'll like based on their responses (first we'd send something they said they liked, but if that's not an option then we'd decide to send them a fruit they haven't tried, or if one of the "can't recalls" was leaning towards they liked it, we might send them that fruit). 

We'd like to automate this process in Dynamics. First, we'll need to store all the data about the fruits they've tried. Then, I think we'll need to use a custom workflow or plugin to query the old information and then create a list of "recommended fruits." 

Here are my thoughts so far:

0)Create an "All fruits" entity which lists all known fruits 

1)Create a "Past Fruit" entity, and then create a single record for each past fruit and whether they liked it or not (look up fields to contact and all fruits entities)

2) Create a "Fruit Recommendations" entity 

3) Create a plugin that runs off a ribbon button in the Contact entity. Whenever the button is pressed, the plugin will create a new record in the Fruit Recommendations entity for that contact.

4) The plug in looks at all past fruit associated with the client, and map over all fruits that were liked onto a single record in the Fruit Recommendations entity. Also, the plugin will look into the "all fruits" entity to generate additional recommendations, or the main recommendations if the contact hadn't tried fruit or found one they liked. 

Any thoughts or insights on a better way to do this? Any thoughts or comments would be greatly appreciated. 

I have the same question (0)
  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi Ben,

    You approach is correct however I would suggest some different entity structure i.e.

    1) "Fruits": A reference entity which contains the list of all the fruits.

    2) "Client Fruits": This is an intersect entity which associates the Client with multiple Fruits. This entity basically has "Client" lookup, "Fruit" lookup and a Status with values "Liked It", "Didn't Like It", "Can't recall, Would like to try".

    Now on a client record, I will have a subgrid of "Client Fruits" where Client can add the "Client Fruit" entity record with the selected Fruit and the status.

    Now, on create, I will have a plugin which looks for the "Can't Recall," status and send those fruits. Within the same plugin you can add the logic to retrieve other foods as well.

    It is basically same as yours but with just 2 entities.

    Hope this helps.

  • Ben T Profile Picture
    803 on at

    Ravi,

    Very helpful. Thanks a ton. I have a couple questions just to help me understand you fully.

    "Now, on create, I will have a plugin which looks for the "Can't Recall," status and send those fruits. Within the same plugin you can add the logic to retrieve other foods as well."

    First: Creation of what record? The Client record or the "Client Fruits" record? Because I'm imaging the basic workflow to be (using your method): 1)Create client record 2)use subgrid of "Client Fruits" to add past fruit 3)then generate recommended fruits. Were you imagining running the plugin each time a "Client Fruits" record is created?

    Second: You say the plugin will "send those fruits," but I'm wondering where? That was  why  I thought we needed a third entity - to save the recommendation records separate from the past fruit records.  

    Appreciate your help.

  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    1) I initialy though create of client record but that means this can run only once. Triggering plugin on "Client Fruit" will not help as it is anot an eent where we can say that client has done selecting fruits. We may need another even where we can trigger a plugin, may a field on the client record say "Send Client recommendation" OR instead of a plugin we can have a custom workflow activity and call it from a workflow. We can then make that workflow on demand? Its basically about finding ane event/time where we want to execute our logic.

    2) "sedn those fruits" will be determine within the plugin logic i.e. Recommended Fruits = All Fruits - [Liked It + Din't Like It]

    Hope this helps.

  • Ben T Profile Picture
    803 on at

    Ravi,

    Super helpful - thanks. I am just wondering after number 2, once we generate our list of recommended fruits - how will we present that to the user? That's why I was thinking of having the recommendation created as a record in a different entity. Are you thinking we'll just create another record in the "client fruits" table? And use fields within those records to differentiate between "past fruits" and "recommended fruits?"

    That seems like it could be a good approach.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Dynamics 365 general

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans