CreateCustomer

This method creates customer data on BPM. This method creates customer only.

The system searches for a unique key in customer datas. The system return exception when finds a customer record. Otherwise creates new one.

The customer datas must have a unique key. You can select a unique key from the customer data fields. The default unique key is customer’s email address, when you don’t select a unique customer data field.

Name Value
Service Type RESTFUL / POST
Request Data Type XML
Response Data Type XML
Content Type UTF-8
Authentication Types Basic Authentication, Custom Header Authenticaton
Sample Request Endpoint http://company.bpm.next4biz.com/RES/RESTfulCustomerService.svc/CreateCustomer
  • XML
ENDPOINT DEFINITION
POST
REQUEST BODY
                                    
                                        <CreateCustomer>
	<businessChannelID>{businessChannelID}</businessChannelID>
	<langID>{langID}</langID>
	<AutoPassword>true</AutoPassword>
	<selectedfields>
	<DataFieldWithSelectedvalue>
           <CompositeDataFieldReferenceValueID>0</CompositeDataFieldReferenceValueID>
           <FieldCode>{FieldCode1}</FieldCode>
           <FieldID>0</FieldID>
           <Name></Name>
           <ParentFieldCode></ParentFieldCode>
           <ParentFieldID>0</ParentFieldID>
           <SelectedValue>
           	  <Key>0</Key>
              <Value>{Value1}</Value>
           </SelectedValue>
        </DataFieldWithSelectedvalue>
	<DataFieldWithSelectedvalue>
           <CompositeDataFieldReferenceValueID>0</CompositeDataFieldReferenceValueID>
           <FieldCode>{FieldCode2}</FieldCode>
           <FieldID>0</FieldID>
           <Name></Name>
           <ParentFieldCode></ParentFieldCode>
           <ParentFieldID>0</ParentFieldID>
           <SelectedValue>
           	  <Key>0</Key>
              <Value>{Value2}</Value>
           </SelectedValue>
        </DataFieldWithSelectedvalue>
		.....
	</selectedfields>
</CreateCustomer>


Sample Request

<CreateCustomer>
	<businessChannelID>9</businessChannelID>
	<langID>1</langID>
	<AutoPassword>true</AutoPassword>
	<selectedfields>
		 <DataFieldWithSelectedvalue>
           <CompositeDataFieldReferenceValueID>0</CompositeDataFieldReferenceValueID>
           <FieldCode>CustomerName</FieldCode>
           <FieldID>0</FieldID>
           <Name></Name>
           <ParentFieldCode></ParentFieldCode>
           <ParentFieldID>0</ParentFieldID>
           <SelectedValue>
           	  <Key>0</Key>
              <Value>Engin</Value>
           </SelectedValue>
        </DataFieldWithSelectedvalue>
		<DataFieldWithSelectedvalue>
           <CompositeDataFieldReferenceValueID>0</CompositeDataFieldReferenceValueID>
           <FieldCode>CustomerSurname</FieldCode>
           <FieldID>0</FieldID>
           <Name></Name>
           <ParentFieldCode></ParentFieldCode>
           <ParentFieldID>0</ParentFieldID>
           <SelectedValue>
           	  <Key>0</Key>
              <Value>Atalay</Value>
           </SelectedValue>
        </DataFieldWithSelectedvalue>
		<DataFieldWithSelectedvalue>
           <CompositeDataFieldReferenceValueID>0</CompositeDataFieldReferenceValueID>
           <FieldCode>CustomerEmail</FieldCode>
           <FieldID>0</FieldID>
           <Name></Name>
           <ParentFieldCode></ParentFieldCode>
           <ParentFieldID>0</ParentFieldID>
           <SelectedValue>
           	  <Key>0</Key>
              <Value>[email protected]</Value>
           </SelectedValue>
        </DataFieldWithSelectedvalue>
	</selectedfields>
</CreateCustomer>

<CreateCustomerResponse xmlns="http://tempuri.org/">                                    
                                
RESPONSE BODY
                                    
                                           <CreateCustomerResult xmlns:a="http://schemas.datacontract.org/2004/07/Formalis.RES.Environment" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <Message xmlns="">Success</Message>
        <Result xmlns="">true</Result>
        <a:CreatedId>4392</a:CreatedId>
    </CreateCustomerResult>
</CreateCustomerResponse>


CreatedId : Created Customer Opheleia ID
Message: String message (Description)
Result : Boolean (Process Status)