Tutorial: Requesting subscription feedback after two weeks

You can configure Rules in the Developer Portal to request feedback from Developer Organization Owners two weeks after subscribing to a Product.

Before you begin

You must have administrator access to complete this task.

About this task

By configuring a Rule in the Developer Portal, you can schedule an email to be sent two weeks after a subscription to a Product is made. The contents of the email can be configured to contain information such as links to forums, support ticket systems, and contact details to social media sites.

Requesting feedback two weeks after subscribing to a Product can be used to solicit feedback on APIs, and inquire about whether their needs are met with the Plans that they have, and establish communication channels with API consumers.

Procedure

  1. To create a reusable Rules component to send an email:
    1. On the administrator dashboard, click Conifguration > Workflow > Rules > Components > Add new component.
    2. From the Component plugin drop-down list, select Action set, then click Continue.
    3. In the Name text field, enter Email devorg for feedback.
    4. In the Variables table, enter the following values in the appropriate fields:
      Then, click Continue.
    5. Click Add action.
    6. From the Select the action to add drop-down list, select Send mail from the System section.
    7. In the To section, enter [devorg-owner-email:value] in the Value text box.
    8. In the Subject section, enter Please provide feedback on our APIs and Plans in the Value text box.
    9. In the Message section, enter the following into the Value text box:
      <p>It has been 2 weeks since you subscribed to the [product-name:value] product.</p>
      <p>We hope you have been enjoying using our APIs and Plans.</p>
      <p>If you have any feedback on them we would love to hear from you.</p>
      <p></p>
      <p>Please post in our forums or raise a support ticket if you need any assistance:<br/>
      [site:url]support</p>
      <p></p>
      <p>Thanks!</p>
      Then, click Save.
  2. To create a Rule to trigger the component two weeks after the Product is subscribed:
    1. On the administrator dashboard, click Configuration > Workflow > Rules.
    2. Click Add new rule.
    3. In the Name text field, enter plan_feedback.
    4. From the React on event drop-down list, select After subscribing to a plan, then click Save.
    5. Click Add action
    6. From the Select the action to add drop-down list, click Schedule component evaluation.
    7. In the Component section, select the component that you created in step 1 from the Value drop-down list.
    8. Click Continue.
    9. In the Scheduled evaluation date section, enter + 2 weeks in the Value text box.
    10. In the Identifier section, enter get subscription feedback after 2 weeks in the Value text box.
    11. In the devorg owner section, enter [application-devorg-owner:value] into the Value text box.
    12. In the product name section, enter [product-name:value] in the Value text box, then click Save.

Results

You have created and configured a Rule that sends an email that requests feedback, two weeks after a subscription to a Product is made.

What to do next

If you do not want to follow the steps that are involved in creating the Rule, you can import the following component:
{ "rules_email_devorg_owner_for_feedback" : {
    "LABEL" : "email devorg owner for feedback",
    "PLUGIN" : "action set",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules", "rules_i18n" ],
    "USES VARIABLES" : {
      "devorg_owner_email" : { "label" : "devorg owner", "type" : "text" },
      "product_name" : { "label" : "product name", "type" : "text" }
    },
    "ACTION SET" : [
      { "mail" : {
          "to" : "[devorg-owner-email:value]",
          "subject" : "Please provide feedback on our APIs",
          "message" : "\u003Cp\u003EIt has been 2 weeks since you subscribed to the [product-name:value] product.\u003C\/p\u003E\r\n\u003Cp\u003EWe hope you have been enjoying using our APIs.\u003C\/p\u003E\r\n\u003Cp\u003EIf you have any feedback on them we would love to hear from you.\u003C\/p\u003E\r\n\u003Cp\u003E\u003C\/p\u003E\r\n\u003Cp\u003EPlease post in our forums or raise a support ticket if you need any assistance:\u003Cbr\/\u003E\r\n[site:url]support\u003C\/p\u003E\r\n\u003Cp\u003E\u003C\/p\u003E\r\n\u003Cp\u003EThanks!\u003C\/p\u003E",
          "language" : [ "" ]
        }
      }
    ]
  }
}
Then, import the following Rule:
{ "rules_plan_feedback" : {   
    "LABEL" : "plan_feedback",
    "PLUGIN" : "reaction rule",    
    "OWNER" : "rules",    
    "REQUIRES" : [ "rules", "rules_scheduler", "application" ],    
    "ON" : { "application_subscribe" : [] },    
    "DO" : [     
        { "schedule" : { 
              "component" :
              "rules_email_devorg_owner_for_feedback",          "date" : "+ 2 weeks",
              "identifier" : "get subscription feedback after 2 weeks",
              "param_devorg_owner_email" : "[application-devorg-owner:value]",
              "param_product_name" : "[product-name:value]" 
           }      
         }    
       ]
     }
   }            
into the Developer Portal and configure it.

For more information on importing Rules, see Importing and exporting Rules.