需求:使用nodejs代码在SAP Cloud for Customer里创建Individual customer实例。

代码:

var createAndBind = require('../jerryapp/service/createAccountinC4C.js');

createAndBind("o0KlM1i2_4-zHRmDk-IWGRlA1Cjc");

上述代码基于微信open IDo0KlM1i2_4-zHRmDk-IWGRlA1Cjc在系统里创建一个Individual customer。

createAccountinC4C.js的具体实现在Jerry的github上:

https://github.com/i042416/wechat/blob/master/jerryapp/service/createAccountInC4C.js

在命令提示行里输入命令node createAccountAndSocialProfile.js:

上述代码会自动在系统里创建Individual customer,并打印出ID:

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

01-15 21:26