Using Module Data

How to use a module data / configuration for your own use?

To be able to integrate or pull any module data (E.g. Insites CRM data) and use it across the instance, you need to know the data type, field/properties and the field type.

Where do I use these configurations and fields?

There are two ways to do CRUD on platformOS. First is forms and second is GraphQL (or a combination of both). Below are examples forms & graphQL on how you can use these module data.

Form Configuration

name: <my_sample_crm_form>
resource: User
resource_owner: anyone
fields:
    email:
    password:
    name:
    profiles:
			modules/insites_core/insites_customer:
	properties:
        	is_enabled:
        	company_id:
					contact_type:
       	 notes:
     	      custom_images:
        		profile_image:
          		     image:
     	      custom_addresses:    
    	home_address:
        address:
        city:
        state:
        street:
        country:
        postcode:>
	. . . 
               < other fields  here >

GraphQL

query insites_get_crm_profile ($page: Int = 1, $size: Int = 10, $id: ID) { 
  people( 
      page: $page,
      per_page: $size,
       user: {
           id: $id,
           is_deleted: false
       }
   ) {
total_entries
	total_pages
    	per_page
    	current_page
        	results {          
           id     
           email
           created_at
           updated_at
           crm_details: profile(profile_type: "modules/insites_core/insites_customer") 
{
    is_enabled: property(name: "is_enabled")
    properties 
         	 }
     	 }
       }
}