Update Blueprint Script

Update Blueprint Script

You may wish to create a Workflow Rule that runs when something changes on the Portal Record (for example, when the Portal Record is marked as "Completed") that updates another record's stage. This is simple when the record is not within a blueprint, however, when the record is within a blueprint, you need quite complicated code to move the blueprint to the next stage. 

The below script will use a ZE Portal built-in function to move your chosen Record to a new stage in the blueprint.

  1. // CHANGE THE VALUES BELOW DENOTED BY "#" 
  2. arguments_map = map();
  3. arguments_map.put("Record_ID", ##YOUR-CHOSEN-RECORD-ID-HERE##); // for example 1234567891011121314
  4. arguments_map.put("Record_Module", "##YOUR-CHOSEN-MODULE-HERE##"); // for example "Deals"
  5. arguments_map.put("New_Stage", "##YOUR-CHOSEN-NEXT-STAGE-HERE##"); // for example "Awaiting Deployment Team"
  6. arguments_map.put("Selected_Transition_Name", "##YOUR-CHOSEN-TRANSITION-NAME-HERE##"); // OR NULL - for example "Client Portal Complete" 
  7. arguments_map.put("Source","##THE-NAME-OF-THE-SCRIPT-WHERE-YOU-ARE-PLACING-THIS-CODE-HERE##"); // for example "On_Client_Portal_Complete_Workflow" 
  8. //
  9. params_map = map();
  10. params_map.put("arguments", arguments_map);
  11. //
  12. crmAPIRequest = map();
  13. crmAPIRequest.put("params", params_map);
  14. //
  15. Response = zep.ZE_SA_Update_Blueprint(crmAPIRequest);
  16. //
  17. // YOU CAN DO SOMETHING WITH THE "Response" below if you want to.

Note, this only works when the Blueprint transition does not have any steps in the "During" part of the transition.

    • Related Articles

    • Create Portal Script

      You may wish to create a Workflow Rule or run code in the After section of a Blueprint transition that creates a Client Portal Record (with all the Client Portal Items from your chosen Template). The below script will use a ZE Portal built-in ...
    • Create Additional Portal Item

      You may wish to create a Workflow Rule or run code in the After section of a Blueprint transition that automatically creates a Client Portal Item (and links it to an existing Client Portal). For example, you can use this when you receive a form ...
    • Where to Start

      Once you have a valid ZE Portal Subscription set up (this includes signing up for a free trial), go ahead and install the CRM Extension: Step 1 - Install the ZE Portal Zoho CRM Extension via the Zoho Marketplace using this link (click here) After ...