Skip to main content
Gainsight Inc.

Tutorial: Create CTA when Customer’s Account Type changes

This article explains the procedure to create a CTA when a customer's Account Type changes from one state to another. For example: You can create a CTA when the customer’s Account Type changes from ‘Customer’ to ‘Expired/Terminated’ state. To achieve this, we will create a custom field and run a rule consisting of the following actions.

  1. Create an action to push the Account Type field value to the Previous Account Type (custom) field.
  2. Create a second action to trigger a CTA when the Account Type changes from Customer to Expired/Terminated.

Create the custom field (PreviousAccountType)

Perform the following steps to create the required custom field:

  1. Navigate to Setup > Customize > Account > Fields in Salesforce.

Setup Salesforce.png

  1. Click New.
  2. Select the Field Type as Text.

Field Type.png

  1. Click Next.
  2. Enter the field name/label as Previous AccountType.
  3. Enter the length of the field as 255.

Field Length.png

  1. Select the profiles to which you want to grant edit access to this field via field-level security.

Grant Access.png

  1. Select the required page layouts that should include this field.

Page Layout.png

  1. Click Save.

Create the rule

Note: We will create a rule with two actions. The first action will map the Account Type field value to the Previous Account Type (custom) field. The second action will  trigger a CTA when the Account Type changes from Customer to Expired/Terminated.

  1. Navigate to Administration > Rules Engine.
  2. Create a rule by clicking the Create Rule button.
  3. Select the rule for Account.
  4. Enter the required rule name and description.
  5. Select a folder for the rule.
  6. Click NEXT.


  1. Select DATASET TASK.
  2. Add the following fields to the Show section:
  • Account::Id
  • Account::Account Type
  • Account::Previous AccountType (custom field) 

Setup Rule.png

  1. Click SAVE. Navigate to the Setup Action section.
  2. Click + ACTION and select the task name created in the previous step.
  3. Select the Load to SFDC Object action type.
  4. Select the Object Name as Account, and Operation as Update.
  5. In the Field mappings section, map the fields as specified below:
  • Id →  Id
  • Account Type → Previous AccountType (Custom field)
  1. In the Criteria section, add the following criteria:
  • Account Type = Value = Customer

Setup Action 1.png

This maps the Account Type value to the custom field (Previous AccountType) that we created in the preceding section.

  1. Click +ACTION again and select the task name. 
  2. Select the Call to Action action type.
  3. Select the required fields as specified in the following screenshot.


  1. Add the following criteria:
  • Account Type = Value = Expired/Terminated
  • Previous AccountType = Value = Customer
  1. Click SAVE. Run the rule by clicking the RUN NOW button.

The required CTAs will be created when the Account Type is changed from Customer to Expired/Terminated.

  • Was this article helpful?