Skip to main content

Intro

While ResiFlex does not act as a Customer Relationship Management (CRM) platform, there is still a minimal amount of account management you need to handle.

Accounts in ResiFlex primarily act as a link between a customer's account in your external CRM, and the customer's devices which ResiFlex controls and optimises.

Account creation

To create an account in ResiFlex, call the createFlexShellAccount GraphQL API endpoint:

mutation CreateFlexShellAccount($input: CreateFlexShellAccountInput!) {
createFlexShellAccount(input: $input) {
account {
number
}
}
}

⚠️ We recommend storing the returned Kraken account number in your CRM for ease of reference.

You need to set the variable input values as described in this documentation, for example:

{
input {
"brandCode": "YOU_ORG_CODE",
"email": "customer.email.address@example.com",
"givenName": "John",
"familyName": "Example",
"address": {
"streetAddress": "123 Fake Street",
"locality": "London",
"administrativeArea": "Greater London",
"postalCode": "SW1A 1AA",
"country": "GB"
}
}
}

For more details on how to fill in the address fields, see this documentation.

You also need to call this mutation with your organisation Kraken Token set as the Authorization header, for example:

{
"Authorization": "your-kraken-token"
}

For more details on how to get your organisation Kraken Token, see this guide.