locked
goal setting for each account RRS feed

  • Question

  • Hi All,

    I need to create goals (sales target) for each account for each quarter and year, there are few hundreds of accounts for which I need to track goals. Is there any simpler way to achieve this?

    In addition I also need to update  the goals with the actuals whan an Invoice is created against the accounts.

    Kindly suggest...

    Thanks in advance,

    Naresh.

    Wednesday, November 6, 2013 5:14 AM

Answers

  • Ok. Try the below logic:

    1- A loop is needed to create the goals as many as the accounts.

    2- Inside the loop take the created goal (manually created goal). You need to create goal metrics, rollup queries and rollup fields based on the existing goal.

    3- First create rollup fields and rollup queries as many as they exist in the created goal. For example if you have 3 rollup fields and 2 rollup queries you need to create an inner loop to create them. Obviously save these records! You need to use them at the later stages.

    4- Then create goal metrics. In this step you need to relate the goal metric to the created rollup fields and queries. A save is needed also here.

    5- Finally create the goal and use the created rollup queries and fields and goal metrics.

    Once, the outer loop executed you have created a goal for one of your accounts. Hence, it is needed to be executed multiple times.

    One last hint: to trigger such as plugin you could create a fake field on the goal. For example place a two option field such as (Copy) and then trigger the plugin on the change of this field. This helps you to copy a goal using this fields change. And finally, remember to register your plugin in Async mode to prevent a heavy load on the server.

    Wednesday, November 6, 2013 9:11 AM
    Moderator

All replies

  • Hi,

    About creating a goal for each account you could narrow the goal to an account by the rollup queries at the bottom of the goal form. Because you have lots of accounts it is not possible to create the goals manually. Hence, try to use a plugin to copy the fields of the goal. You last question has some kind of ambiguity. You want to update the goal? For example, the goal for account A is 100000$, then you want to update this amount to 100100$, when an invoice (100$) created? If so, use a workflow to update the goal (if you could access it from the invoice > account > goal). If you want to track the goal by the creation of the invoice, you could do it by the definition of the rollup field. As you said create a new rollup field for the actual based on the invoice creation.

    Wednesday, November 6, 2013 7:12 AM
    Moderator
  • Hi Payman,

    Thank for your reply.

    Can you eloborate on the plugin design and how to use the plugin to update/create goals?

    I am clear with your answer for the last question.

    Thank you,

    Naresh.

    Wednesday, November 6, 2013 8:38 AM
  • Have a look at this for initial plugin learning and this one for an advanced one.
    Wednesday, November 6, 2013 8:49 AM
    Moderator
  • Hi Payman,

    I am comfortable at writing plugins, kindly suggest me the logic that should be considered while creating the plugin.

    Thank you.

    Wednesday, November 6, 2013 8:54 AM
  • Ok. Try the below logic:

    1- A loop is needed to create the goals as many as the accounts.

    2- Inside the loop take the created goal (manually created goal). You need to create goal metrics, rollup queries and rollup fields based on the existing goal.

    3- First create rollup fields and rollup queries as many as they exist in the created goal. For example if you have 3 rollup fields and 2 rollup queries you need to create an inner loop to create them. Obviously save these records! You need to use them at the later stages.

    4- Then create goal metrics. In this step you need to relate the goal metric to the created rollup fields and queries. A save is needed also here.

    5- Finally create the goal and use the created rollup queries and fields and goal metrics.

    Once, the outer loop executed you have created a goal for one of your accounts. Hence, it is needed to be executed multiple times.

    One last hint: to trigger such as plugin you could create a fake field on the goal. For example place a two option field such as (Copy) and then trigger the plugin on the change of this field. This helps you to copy a goal using this fields change. And finally, remember to register your plugin in Async mode to prevent a heavy load on the server.

    Wednesday, November 6, 2013 9:11 AM
    Moderator