How to Include an Administrator-Defined Attribute in the Decision Model

If you have an administrator-defined attribute in your service request and you want to include it in your decision model follow the steps in this topic. This example uses service requests as the object.

For example, you may have created an administrator-defined attribute to capture the level of service based on the Account on the service request such as, Gold, Silver, and Bronze. Let's say you want to include that field to help identify only the Gold Accounts that have a closed SR and send them a different survey than Silver and Bronze. In order to do this, you must to expose the administrator-defined attribute in your decision model.

Add the Administrator-Defined Attribute to Your Decision Model

Once you add your administrator-defined attribute to your service request object using Application Composer, here's how you can add the attribute to your decision model.

  1. Navigate to Oracle Integration > Processes > Decision Models.

  2. Select the Decision Model you want to edit.

  3. Expand Service Request in the Type Definition region.

  4. Edit the Type Definition to include the new fields by clicking the menu and selecting Edit.

  5. In the Edit Type Definition dialog box, click the Add icon in the Define Type Attributes section.

  6. In the Add Component dialog box, enter the Name of the administrator-defined attribute.

  7. Use the drop-down list to select the Mode.

  8. Click Close.

    You can now include the attribute in the decision model.

  9. Click Activate.

  10. On the Create Snapshot and activate dialog window, click Activate.

    Note: There may be characters that were appended to the decision model Name. Make sure the Name is an exact match to the name of your decision model in the Manage Survey Configurations task in Functional Setup Manager.

Don't forget to test the decision model to make sure it works.

Change the Integration to Include the Administrator-Defined Field

Now that you have added the attribute to the decision model, you must change the integration so that the new field can be used in the decision model.

  1. Navigate to Oracle Integration > Integrations.

  2. Find the integration you want to edit.

    If the job is scheduled, you must pause or stop the job before you continue.

  3. Now, deactivate the job by clicking the Deactivate icon.

  4. Click the job name to edit.

    First, you update the initial query of SRs to pull the new attribute from Fusion Service.

  5. On the Scheduled Orchestration page, navigate to Invoke GetSRPage using Survey Integration Engagement Cloud Connection connection of type Oracle Engagement Cloud.

    Invoke GetSRPage... is where the fields of the SR are being picked up.

  6. Click the Invoke GetSRPage... Three buttons appear and then click the Regenerate link.

    This regenerates the SR fields to include the administrator-defined field.

  7. Click Regenerate on the Regenerate Artifacts dialog box.

    Next, you update the mapping to include the administrator-defined field in the decision model.

    Tip: In between actions, it's a good idea to click Save.
  8. On the Scheduled Orchestration page, navigate to the Invoke TestQualifySR using Survey Integration OIC Connection connection of type REST.

    Invoke TestQualifySR... is the actual call to the decision model.

  9. Click the icon and select Edit.

  10. On the Configure REST Endpoint dialog window, select the Request tab.

  11. In the Select the request payload format section, click the <<<inline>>> link.

  12. Scroll to the end.

  13. Use valid JSON script. Add a comma and press enter on your keyboard.

  14. Add the name of the administrator-defined field in quotes.

  15. Add a colon after the quotes.

  16. After the colon, enter an example value.

    • If the value is true or false, type either true or false.

    • If the value is a number, you can type any number.

    • If the value is text or date time, you can type any value in quotes. It doesn't matter what you type inside the quotes.

    The following table shows examples of the last few lines of the sample JSON payload.

    JSON Syntax

    Sample (last few lines of the sample JSON payload)

    Original:

        "CaseNumber" : "ABCDEFGHI",
        "CaseId" : "ABCDEFGHIJK",
        "PrimaryContactPersonId" : "ABCDEFGHIJKLMNOPQRSTUVW"
      }
    }

    Adding a true/false field:

        "CaseNumber" : "ABCDEFGHI",
        "CaseId" : "ABCDEFGHIJK",
        "PrimaryContactPersonId" : "ABCDEFGHIJKLMNOPQRSTUVW",
        "MyBooleanField": true
      }
    }

    Adding a text field:

        "CaseNumber" : "ABCDEFGHI",
        "CaseId" : "ABCDEFGHIJK",
        "PrimaryContactPersonId" : "ABCDEFGHIJKLMNOPQRSTUVW",
        "MyTextField": "blahblahblah"
      }
    }

    Adding a date/time field:

        "CaseNumber" : "ABCDEFGHI",
        "CaseId" : "ABCDEFGHIJK",
        "PrimaryContactPersonId" : "ABCDEFGHIJKLMNOPQRSTUVW",
        "MyDateField": "2020-06-01"
      }
    }
    

    Adding a number field:

        "CaseNumber" : "ABCDEFGHI",
        "CaseId" : "ABCDEFGHIJK",
        "PrimaryContactPersonId" : "ABCDEFGHIJKLMNOPQRSTUVW",
        "MyNumberField": 1234
      }
    }
  17. If you're adding multiple fields, repeat the last steps. Add a comma after the last field, press enter, and so on.

  18. Click OK.

  19. Click the Summary tab.

  20. Click Done.

  21. Click Update on the Update Configuration dialog box.

    Tip: Remember to save between actions.

    Now, you can edit the mapping.

  22. On the Scheduled Orchestration page, navigate to Map from Schedule to TestQualifySR.

    The icon for Map from Schedule to TestQualifySR is the mapping from the SR to the decision model.

  23. Click the icon and select Edit.

    The Map page opens.

  24. In the Target panel, expand the items until you see Service Request.

    The Target panel represents the decision model.

  25. Scroll through the Target list to find the new administrator-defined field.

  26. In the Sources panel, expand $CurrentSR.

  27. Scroll down the $CurrentSR list until you find the same administrator-defined field.

  28. Click the administrator-defined field in the Sources panel and drag it to the same field in the Target panel.

    This action creates a line linking the field.

  29. After mapping the new field from Source to Target, expand the field (on the Target side of the page) to expose a nil row.

  30. Right click on the word nil and select Create Target Node.

    An Expression for: nil dialog window opens.

  31. Click the Switch to Developer View icon on the Expression for: nil dialog window.

  32. In the Expression for: nil dialog window, enter true().

  33. To save your changes, click the Check mark icon on the Expression for: nil dialog window.

    An icon is now displayed in the Mapping Canvas panel that shows a mapping to the word nil.

  34. Click Validate.

  35. You see a message saying that mapping is valid and ready to use.

  36. Click Close.

  37. Click Save on the Scheduled Orchestration page.

  38. Click Close.

    The final step is to reactivate the integration.

  39. Click the Activate icon in the Status column of the integration row.

  40. On the Activate Integration dialog window, make sure Enable Tracing is deselected and click Activate and Schedule.