Configure Smart Action Functions
Salespeople can define a smart action to take them directly to Microsoft Teams by entering a smart action in the Action Bar from their Opportunity page. This action will only be applicable if a team already exists for the selected opportunity record.
Define the Create Team in Microsoft Teams Smart Action
- Navigate to to create and enter a sandbox with Application Composer.
- From the sandbox, open Application Composer from the Tools menu.
- Click Smart Actions, available from Common Setup.
- Fromn the Kind of Actions page, choose REST-based action, and then click Continue.
- Create the smart action with the following Basic
Details:
- Name: Create Team in Microsoft Teams
- Object: Opportunity
- Enabled: On
- Mass Action: Off
- For Availability, enter the following: Application: Sales
- For Condition, enter
microsoftTeamCreated equals “NO”
in the Include all the following groups field.
Here's an example of what the page looks like for the Opportunity object.
- On the Action Details page, enter the REST metadata
in the Path field of the selected smart action.
/crmRestApi/resources/11.13.18.05/collaborations
. - From the Method drop-down list, select POST.
- Click Add and enter the following Request Body
Parameters for the Create Team in Microsoft Teams
smart acttion:
Object Name Type Value Mandatory Opportunity ObjectName Static Opportunities True ObjectId Attribute Opportunity ID (OptyId True Name Attribute Name(Name) True Description Attribute Account(TargetPartyName) False TeamRelationshipName
Static To get the value, follow these steps:The TeamRelationshipName parameter value is used to retrieve the team members on the record. It is only required if you're using a custom relationship for the standard objects or if you're setting up this integration for a custom object.- In a sandbox, go to Application Composer.
- Click Relationships.
- Copy the name of the relationship for the Source Object = Object of interest and Target Object = Resource
False Custom ObjectName Static Use API name of custom object. To get the value, follow these steps:- In a sandbox, go to Application Composer.
- Expand node, then Custom Objects node. Objects node, then Custom Objects node.
- Click the custiom object you want.
- On the Overview page for the Custom Object, copy the API Name value to use as the ObjectName
True ObjectId Attribute Custom object ID (ID field for the object) True Name Attribute Name(Name) True Description Attribute Account(TargetPartyName) False TeamRelationshipName
Static To get the value, follow these steps:- In a sandbox, go to Application Composer.
- Click Relationships.
- Copy the name of the relationship for the Source Object = Object of interest and Target Object = Resource
False Here's a sample screenshot of what the Create Smart Action UI looks like:
- On the Confirmation Message page, you can define
primary, secondary, and confirmation messages. Enter the following:
- Primary Message: Your team will be created in Microsoft Teams in a few seconds.
- Secondary Message: You can continue to use the application while it's being created. Please don't submit the action again.
- Continue Button Label: OK
- Cancel Button Label: Cancel
- Confirmation Message: Your team OPPTY-{ATTRIBUTE_VALUE_NAME} in Microsoft Teams is created. Use the Go to Microsoft Teams action to go to the team .
- Check the details on the Review and Submit page.
- Click Submit.
Define the Go to Microsoft Teams Smart Action
- Navigate to to create and enter a sandbox with Application Composer.
- From the sandbox, open Application Composer from the Tools menu.
- Click Smart Actions, available from Common Setup.
- Create the smart action with the following Basic
Details:
- Name: Go To Microsoft Teams
- Object: Opportunity
- For Availability, enter the following: Application: Sales
- For Condition, enter
microsoftTeamCreated equals “YES”
in the Include all the following groups field.
- On the Action Details page, for Object function action field, select GoToTeams which you previously defined in the Create an Object Function Server Script topic.
- Select the Object function returns a URL toggle.
- In the Browser Window Target field, select
New Tab from the drop-down list as shown in this
sample screenshot of what the Create Smart Action UI looks like.
- Click Continue.
- Check the details on the Review and Submit page as
shown:
- Click Submit.
Salespeople can now add all existing members of their opportunity to a team in Microsoft Teams and start the collaboration directly from the Opportunities UI. This allows users of Microsoft Teams to interact with opportunity team members from their Sales application and add any required external resources with expertise to help win the deal. Using the Create Team in Microsoft Teams action in the opportunity, a dedicated opportunity team is created in Microsoft Teams for the opportunity team members. Once the team is created, users can use the Go to Microsoft Teams action to begin collaboration with the team.