> For the complete documentation index, see [llms.txt](https://create.cloud4wi.ai/dev-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://create.cloud4wi.ai/dev-hub/wifi-sdk/integrating-the-sdk/ios/objects/customer.md).

# Customer

```objectivec
NSString *username;
NSString *password;
NSString *firstName;
NSString *lastName;
NSString *phoneNumber;
NSString *email;
NSString *gender;
NSString *birthDate;
NSString *language;
NSString *country;
NSString *zipCode;
NSString *companyName;
NSString *civilStatus;
BOOL phoneVerified;
BOOL emailVerified;
NSNumber *ppd;
NSNumber *profiling;
NSDictionary *custom;
NSDictionary *policies;
CustomerDocument *document;
BOOL lock;
NSString *extId;
NSString *extProp1;
NSString *extProp2;
```

**Note:**

The attributes:

`username`, `password`, `lock`

are not available in the update customer function

```
- (void) updateCustomer: (Customer*) customer
              onSuccess: (void (^)(BOOL)) onSuccess
                onError: (void (^)(NSError *error)) onError;
```

## Format

<table><thead><tr><th>Param</th><th width="246.33333333333331">Format</th><th>Example</th></tr></thead><tbody><tr><td>language</td><td>ISO 639-1</td><td>"it"</td></tr><tr><td>country</td><td>ISO 3166-1 alpha2</td><td>"IT"</td></tr><tr><td>birthdate</td><td>YYYY-MM-DD</td><td>"2000-12-01"</td></tr><tr><td>gender</td><td>{M,F,O}</td><td>"M"</td></tr><tr><td>phoneNumber</td><td>international prefix + number</td><td>"+39123456789"</td></tr></tbody></table>

## Policies

They represent the list of the policy to apply to the customer.  You can retrieve them using the function&#x20;

```swift
cloud4WiSDKWiFi.getListOfPolicies
```

It is mandatory that the policies returned by the function `getListOfPolicies` in position 0 and 1 (named "`termsOfUse`" and "`privacy`") are set to `true`.

## Profiling and PPD

In order to be able to process and profiling the customer it is necessary that the attributes `profiling` and `ppd` are set to `true`.

## Init example

{% tabs %}
{% tab title="Swift" %}

```swift
let customer = Customer()
				
let approvedPolicies = ["termsOfUse":"true", "privacy":"true"]
customer?.policies = approvedPolicies

customer?.firstName = "Michele"
customer?.lastName = "Rossi"
customer?.email = email
customer?.language = "it"
customer?.extId="extId-12345677810"
customer?.extProp1="extP1-1234567789"
customer?.extProp2="extIdP2 -1234567789"
customer?.ppd = true
customer?.profiling = true

let document = CustomerDocument()
document.passportNumber="PN-123456"
document.personalId="personalId-123"
document.memberId="memberId-123"
customer?.document = document

customer?.emailVerified=true

customer?.country = "IT"
customer?.birthDate = "2000-12-01"
customer?.gender = "F"
customer?.phoneNumber = "+39111111122222"
customer?.phoneVerified=true

customer?.lock = false

let customFields = ["doYouLikeBeer":"no"]
customer?.custom = customFields
```

{% endtab %}

{% tab title="Objective-C" %}

```objectivec
NSDictionary *termsAndPrivacy = @{@"termsOfUse": @"true", @"privacy" : @"true"};
Customer* customer;
[customer setPolicies:termsAndPrivacy];
	
[customer setFirstName:@"Michele"];
[customer setLastName:@"Rossi"];
[customer setEmail: @"email"];
[customer setLanguage:@"en"];
[customer setExtId: @"extId-12345677810"];
[customer setExtProp1:@"extP1-1234567789"];
[customer setExtProp2:@"extIdP2 -1234567789"];
[customer setPpd: [NSNumber numberWithBool:false]];
[customer setProfiling:[NSNumber numberWithBool:false]];	
CustomerDocument* document;
[document setPassportNumber:@""];
[document setPersonalId:@""];
[document setMemberId:@""];
	
[customer setDocument:document];

[customer setEmailVerified:true];
	
[customer setCountry:@"US"];
[customer setBirthDate:@"2018-12-01"];
[customer setGender:@"M"];
[customer setPhoneNumber:@"+391111111110000"];
[customer setPhoneVerified:false];
	
NSDictionary *customFields = @{@"doYouLikeBeer": @"yes", @"doYouLikeWine" : @"yes"};
	
[customer setCustom:customFields];
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://create.cloud4wi.ai/dev-hub/wifi-sdk/integrating-the-sdk/ios/objects/customer.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
