README.md in embulk-output-zendesk_users-0.0.4 vs README.md in embulk-output-zendesk_users-0.0.5
- old
+ new
@@ -16,14 +16,22 @@
- **login_url**: Login URL for Zendesk (string, required)
- **auth_method**: Zendesk auth method (string, default: `token`)
- **username**: Zendesk Username (string, required)
- **token**: Zendesk API Token (string, required if auth_method is token)
- **method**: control whether to update the existing user or create new user(not supported) (string, default: `update`)
-- **id_column**: column name for user's email (long, default: `id`)
+- **id_column**: column name for user's id (long, default: `id`)
- **tags_column**: column name for tags. Each tag is separated by comma (`string`, optional, default: `null`, overwrote)
- **user_fields_column**: column name for Values of custom fields in the user's profile. (json, optional, default: `null`)
+The following fields are supported at only `upsert` method
+
+- **name_column**: column name for user's name (`string`, default: `""`)
+- **phone_column**: column name for user's phone number (string, default: `null`)
+- **email_column**: column name for user's email (`string`, default: `null`)
+- **external_id_column**: column name for external_id (`long`, default: `null`)
+- **role_column**: column name for user's role (`long`, default: `null`)
+
## Example
### Config
```yaml
@@ -38,15 +46,47 @@
- [ 9811482788, ["tag3"], { "field0": "Support description" } ]
out:
type: zendesk_users
login_url: https://obscura.zendesk.com
auth_method: token
- username: test@test.com
+ username: test@example.com
token: xxxxxxxxxx
method: update
id_column: id
tags_column: tags
user_fields_column: user_fields
+```
+
+``` yaml
+in:
+ type: config
+ columns:
+ - {name: id, type: long}
+ - {name: tags, type: json}
+ - {name: user_fields, type: json}
+ - {name: name, type: string}
+ - {name: phone, type: string}
+ - {name: email, type: string }
+ - {name: external_id, type: long}
+ - {name: role, type: long}
+ values:
+ - - [ 9811482788, ["tag1", "tag2"], { "xxxx": "Support description", "date": "2013-02-27T20:35:55Z" }, 'name testing', '000-000-000', 'toru+3@xxxxx-data.com', 111, 2859697]
+ - [ 0001010, ["tag3"], { "xxxx": "Support description" }, 'name testing2', '000-0000001', 'toru+4@xxxxx-data.com', 113, 2859707]
+out:
+ type: zendesk_users
+ login_url: https://xxxx.zendesk.com
+ auth_method: token
+ username: xxxx
+ token: xxxxx
+ method: upsert
+ id_column: id
+ tags_column: tags
+ user_fields_column: user_fields
+ name_column: name
+ phone_column: phone
+ email_column: email
+ external_id_column: external_id
+ role_column: role
```
### Data
- tags_column requires string data containing terms which separated by comma; Ex. `attention,attack,test`