Create Your Own Workflows for Channel Sales
You can create your own approval workflow so that all partner opportunities can be registered and submitted for approval by channel managers, to avoid channel conflict.
You can use the registration status of an opportunity to keep track of where the partner opportunity is in the overall registration process.
Use case: The channel manager is notified (by email or notifications) when a partner user submits an opportunity for registration approval. The partner user (who is the opportunity owner) is notified when the channel manager takes approval action (approve/reject/return) on the opportunity.
Use the following procedure.
-
Sign in as a user with setup privileges, such as Sales Administrator or Application Implementation Consultant.
-
Ensure you are not in your sandbox.
-
From the Navigator, click More and from the Tools menu, select Application Composer.
-
Under Common Setup, click E-Mail Templates.
-
On the E-Mail Templates page, click the Create icon.
-
On the Create E-Mail Template page, do the following:
-
Select Opportunity from the Objects list.
-
Type a name for your template.
-
In the E-Mail Subject region, select the Name field from the Select Fields list and click Insert. This populates [$Name$] into the subject line. Add "submitted for approval" after the [$Name$] syntax.
-
In the E-Mail Body region, select the Name field from the Select Fields list and click Insert. This populates [$Name$] into the body. Add "submitted for approval" after the [$Name$] syntax.
-
Click Save and Close.
-
-
From the Settings and Actions menu, click Manage Sandboxes and select and activate the sandbox you created earlier.
-
When you are back in your sandbox, from the Navigator, click More and from the Tools menu, click Application Composer.
-
Under the Common Setup region in the tree, click Object Workflows.
-
From the Actions menu, click Create.
-
In the Create Object Workflow page:
-
Select Opportunity as the object.
-
Enter a name for the workflow.
-
Under Event Point and Condition, select the radio button for When record is updated.
-
-
Under conditions, click the Create icon for the Groovy editor/builder.
-
In the Expression Builder window, in the free-form text area at the bottom of the window, enter the following Groovy condition:
def secCtx = adf.context.getSecurityContext()if (secCtx.isUserInRole("ZPM_PARTNER_SALES_MANAGER_JOB") || secCtx.isUserInRole("ZPM_PARTNER_SALES_REPRESENTATIVE_JOB") || secCtx.isUserInRole("ZPM_PARTNER_ADMINISTRATOR_JOB")){if (isAttributeChanged('RegistrationStatus') && RegistrationStatus=='OPTY_SUBMITTED') return true;} -
Click OK to save your changes.
-
In the Create Object Workflow page, in the Actions region, click the Create icon for E-mail Notification.
-
In the Create Action: E-Mail Notification page, type a name for your notification.
-
In the Create Action: E-Mail Notification page, in the E-Mail Details region, select the template you created at the beginning of this procedure.
-
In the Create E-Mail Template page:
-
Enter a name for the email template.
-
In the E-Mail Subject region, select the Name field from the Select Fields list of values and click Insert. This populates [$Name$] into the subject line. Add "submitted for approval" after the [$Name$] syntax.
-
In the E-Mail Body region, select the Name field from the Select Fields list of values and click Insert. This populates [$Name$] into the body. Add "submitted for approval" after the [$Name$] syntax.
-
Click Save and Close.
-
-
Back in the Create Action: E-Mail Notification page: Under Recipient Type, select Specific users to retrieve the Add More Recipients page. Remove the following: Manager of Owner, Opty Team Member - Function: Channel Manager.
-
Click OK.
-
Save changes in the Create Action: E-Mail Notification page.
-
In the Create Object Workflow page, in the Actions region click the create icon for Business Process Flow.
-
In the Create Action: Business Process Flow page:
-
Enter a name for the flow.
-
Click the search icon next to the Project Name field. Search for and select the project ExtnBusinessProcessComposite.
-
Under Inputs, provide the following within single quotes:
-
Approver: provide the ID of the Channel Sales Manager
-
Held EntityStatus field: provide the registration status
-
E-mail Address: provide the e-mail address for the partner user to receive notification once it is approved or rejected.
-
-
Save your changes.
-
-
To verify that the approval workflow has been configured correctly, sign in to the Partners UI with your partner user credentials and edit an opportunity.
-
Create and update the opportunity partner registration status to Submit.
-
Click Save and Close.
-
Search for the same opportunity to refresh. Verify you receive an e-mail notification.
-
Sign out. Sign back in with your Channel Sales Manager credentials.
You see the opportunity waiting for approval in the work list area of your dashboard.
-
Select the opportunity and click Approve or click Reject.
-
Sign out. Sign back in with your partner user credentials and navigate to same opportunity. Drill-down to see if the Registration field shows a status of Approved. Check for an email notification.
-
Close the opportunity, updating status and related fields.