Skip to main content
Managing support requests efficiently is crucial for maintaining smooth operations and delivering excellent customer support. In this tutorial, we’ll explore how you can streamline your workflow by using a trigger or a Task menu item to automatically close a Request tab after certain action in your system. With this automation, you can reduce manual steps, improve productivity, and enforce specific business rules. By the end, you’ll be able to:
  • Automatically mark a request as closed.
  • Instantly close the Request tab after processing.
  • Improve efficiency for handling repetitive tasks, such as spam requests.
This functionality requires SuperOffice version 10.5.2 or newer.

Scenario: Automating spam request handling

A company receives a high volume of spam requests and wants an automation that allows agents to close these requests with minimal manual effort.

Proposed solution

We will add a button to the Request screen that:
  1. Automatically sets the request status to “Closed”.
  2. Closes the active Request tab in the SuperOffice interface.

Step 1: Creating the CRMScript

We start by creating a CRMScript, which will be triggered via a Task menu item in SuperOffice.
  1. Click on the top bar and select Settings and maintenance.
  2. In the navigator, click CRMScript and go to the Macros and scripts tab.
  3. Click the New script button.
  4. Fill in the following details in the Information tab: script-information -screenshot
  5. Go to the Script tab. This is where we will add our CRMScript code.
  6. Click OK or Apply to save.

Step 2: Adding CRMScript code

Copy and paste the following code into the Script tab:

Code explanation

  • Retrieve the active request ID.
  • Find the default “Closed” status in SuperOffice.
  • Update the request status to “Closed”.
  • Close the Request tab in the user interface.
Click OK to save your script.

Step 3: Creating a Task menu item

Now that our script is ready, we need to add a Task menu item to trigger it.
  1. In Settings and maintenance, go to Lists.
  2. Find Task menu and click Add to create a new item.
  3. Fill in the following details: Task menu settings -screenshot
  4. Click Save to confirm.

Step 4: Activating the changes

To ensure the new menu item appears, refresh the SuperOffice client:
  1. Open SuperOffice CRM in a web browser.
  2. Append ?flush to the URL and press Enter.

Step 5: Testing the automation

  1. Open a Request in SuperOffice.
  2. Click the Task menu button () and select Mark as Spam.
  3. The request should:
    • Be marked as Closed.
    • The Request tab should close automatically.
Task menu item -screenshot

Summary

  • We created a CRMScript to automate request closures.
  • We added a Task menu item to trigger the script.
  • We refreshed the system and tested the automation.

Troubleshooting

  • If the option does not appear in the Task menu, ensure you performed a flush (?flush).
  • If the request does not close, verify the script is assigned correctly in the Task menu.
Now you can easily automate request management and enhance productivity!