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.

Create the custom field (PreviousAccountType)

Perform the following steps to create the required custom field:
  1. Navigate to Setup > Customize > Account > Fields in Salesforce.

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

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

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

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

  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.

  1. Navigate to Administration > Operations > Rules Engine.
  2. Create a rule by clicking the +RULE button.
  3. Select the rule type as Bionic.
  4. Select the rule for Account. Enter the required rule name and description.
  5. Click NEXT.

  1. Select DATASET TASK.
  2. Select the Id, Account Type, and Previous AccountType (custom field) fields from the Account object, and add them in the Show section as displayed in the following screenshot.

  1. Click SAVE. Navigate to the Setup Action section.
  2. Click +ACTION.
  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

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

  1. Click +ACTION again. Select the Call to Action action type.
  2. 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?