Create Additional Portal Item

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 response from a client to create additional items based on their response to their form.

The below script will use a ZE Portal built-in function to create an Additional Portal Item Record:

  1. // CHANGE THE VALUES DENOTED BY ##:
  2. Portal_Record_ID = ##PORTAL-RECORD-ID##; // Change this to the Portal_Record_ID you want the new Portal Item Record to be added to - This is an integer, so must NOT be surrounded by inverted commas
  3. Item_Name = "##Item-Name-Here##"; // You can use Merge Tags here, for example ${Contacts.Full_Name} - MUST be surrounded by inverted commas
  4. Item_Type = "##Item-Type-Here##"; // This can be either "Document", "Question", or "Form" - MUST be surrounded by inverted commas
  5. Item_Details = "##Item-Question-Guidance-or-URL-Here##"; // You can use Merge Tags here, for example ${Deals.Deal_Name} - Must be surrounded by inverted commas
  6. //
  7. Args_Map = map();
  8. Args_Map.put("Portal_ID", Portal_Record_ID);
  9. Args_Map.put("Item_Name", Item_Name);
  10. Args_Map.put("Item_Type", Item_Type);
  11. Args_Map.put("Item_Details", Item_Details);
  12. //
  13. Params_Map = map();
  14. Params_Map.put("arguments", Args_Map);
  15. //
  16. crmAPIRequest = map();
  17. crmAPIRequest.put("params", Params_Map);
  18. //
  19. Response = zep.Create_Portal_Item(crmAPIRequest);