Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Salesforceのツールの作り方

tzmfreedom
September 26, 2019

 Salesforceのツールの作り方

Salesforce World Tour Tokyo 2019で登壇したときの資料です

tzmfreedom

September 26, 2019
Tweet

More Decks by tzmfreedom

Other Decks in Technology

Transcript

  1. ࣗݾ঺հ • Twitter: @tzm_freedom • GitHub: tzmfreedom • Blog: https://blog.freedom-man.com

    • ࣄۀ։ൃձࣾͷαʔόʔαΠυΤϯδχΞ • Ruby/Rails, PHP/Symfony, ... • ࠷ۙ͸ϨΨγʔΞϓϦվળۀ • Ϟϊͮ͘Γେ޷͖ܥΤϯδχΞ • Salesforceͷܦݧ͸લ৬Ͱ5೥൒͘Β͍ • Salesforceͷࢿ֨͸શࣦͯޮʘ(^o^)ʗ • ࠓ͸ۀ຿ͰSalesforceΛશ͘৮͍ͬͯͳ͍
  2. ࠓ·Ͱ࡞͖ͬͯͨπʔϧ • go-soapforce: Go੡ͷSalesforce SOAP APIΫϥΠΞϯτ • hsforce: Haskell੡ͷSalesforce APIΫϥΠΞϯτ

    • fluent-plugin-sforce: fluentdͷSalesforceϓϥάΠϯ • embulk-output-salesforce: embulkͷSalesforceϓϥάΠϯ • hubot-chatter: hubotͷSalesforceΞμϓλ • spm: SalesforceͷύοέʔδϚωʔδϟʔ • land: ApexͷϩʔΧϧ࣮ߦ؀ڥ • alt-apex: ApexΛKotlinͰॻ͚ΔΑ͏ʹ͢ΔτϥϯεύΠϥ
  3. Salesforce։ൃΛࢧ͑Δπʔϧ͸ͨ͘͞Μ͋Δ • Apex։ൃʢGUIɾEditorʣ • ݹ͘͸ force.com IDEɺݱࡏ͸VS Codeʴplugin • Salesforceૢ࡞؆қԽʢChrome

    Extension) • Salesforce Devtools • σʔλ౤ೖʢGUIʣ • Salesforce Dataloader • σϓϩΠͷࣗಈԽʢCUIʣ • ant, sfdx, jsforce • APIΛୟ͘ϥΠϒϥϦ • jsforce(JavaScript), restforce(Ruby), go-soapforce(Go), ...
  4. Salesforceʹ͍ͭͯ஌Δ • SalesforceͰग़དྷΔ͜ͱग़དྷͳ͍͜ͱ • ։ൃͤͣʹͰ͖ΔྖҬͱͰ͖ͳ͍ྖҬͷཧղ • SalesforceΛΧελϚΠζɾ։ൃ্͍ͯ͘͠ͰͲ͏͍͏ۀ ຿͕සൃ͢Δͷ͔ • SalesforceϓϥοτϑΥʔϜ͸Կ͕ۤखͳͷ͔

    • ۤखͳྖҬʹରͯ͠ผͷΞϓϩʔνͰิ͑Δ΋ͷͳͷ͔ • Salesforce͕ެࣜʹఏڙ͍ͯ͠Δπʔϧ • Dataloader, SFDX, VS Code Plugin... • ෆศͰ͸ͳ͍͔ʁࣗࣾυϝΠϯʹϑΟοτ͍ͯ͠Δ͔ʁ
  5. ՝୊Λղܾ͢ΔͨΊͷٕज़Λ஌Δ • Salesforceͷը໘ΛΑΓ࢖͍΍͍ͨ͘͢͠
 => Chrome֦ுɾϒοΫϚʔΫϨοτɾϢʔβʔεΫϦϓτ • CLIͰSalesforceΛૢ࡞͍ͨ͠
 => CLIπʔϧʢCLIϑϨʔϜϫʔΫ oclifͱ͔Thorͱ͔ʣ

    • WebΞϓϦͰSalesforceͷAPIΛୟ͘
 => APIΫϥΠΞϯτʢRESTɾSOAPɾMetadataɾToolingʣ • σʔλΛ͍͍ײ͡ʹ͢ΔGUIΛ࡞Γ͍ͨ
 => WebΞϓϦɾσεΫτοϓΞϓϦɾεϚϗΞϓϦ • ੌ͍OSS͕ग़͚ͨͲSalesforce༻ͷϓϥάΠϯ͕ແ͍ʂ
 => OSSͷϓϥάΠϯ
  6. ՝୊Λղܾ͢ΔͨΊͷٕज़Λ஌Δ • ެ։ɾΠϯετʔϧํ๏ • GitHub • ֤छύοέʔδ؅ཧγεςϜ • WebΞϓϦ •

    Heroku Button • Salesforce Button • bashϫϯϥΠφʔ • Πϯετʔϥʔ • ·͊Ͱ΋ͿͬͪΌ͚ٕज़ͳΜͯޙ෇Ͱ͓̺ʢޙड़
  7. ԿΛ࡞ͬͯྑ͍ͷ͔Θ͔Βͳ͍ • ෆศʹؾͮ͘ɻ౰ͨΓલΛٙ͏ɻ • ৗʹ٬؍తʹݟͯΈΔɻ • Salesforce͸˓˓ͳ࢓༷͔ͩΒ͠ΐ͏͕ͳ͍ɺఘΊΔ… Ͱ͸ͳ͘ɺ։ൃͰϑΥϩʔͰ͖ͳ͍΋ͷͳͷ͔ɺͲ͏ͳ Ε͹΋ͬͱศརʹ࢖͑Δͷ͔Λߟ͑Δɻ •

    Salesforce͸API͕ॆ࣮͍ͯ͠ΔͷͰ։ൃͰϑΥϩʔͰ ͖Δൣғ͸޿͍ • ӡ༻ऀɾ։ൃऀʹෆศͳ఺͕ແ͍͔ฉ͍ͯΈΔ • ໨త͸SalesforceΛΑΓศརʹ࢖͑ΔΑ͏ʹ͢Δ͜ͱ
  8. ៉ྷͳίʔυॻ͚ͳ͍͠ɺίʔυΛެ։͢Δͷஏ͔͍ͣ͠… • ͦ΋ͦ΋࠷ॳ͔Β៉ྷͳίʔυͳΜͯॻ͚ΔΘ͚͕ͳ͍ • ແཧʹެ։͠ͳͯ͘΋ྑ͍͠ɺ࠷ॳ͸ࣾ಺πʔϧͰશ͘໰ ୊ͳ͍ • ͕ɺίʔυΛެ։͢ΔϝϦοτ͸͔ͳΓ͋ΔͷͰ͓͢͢Ί • ঝೝཉٻΛຬͨ͢

    • ιʔγϟϧίʔσΟϯάΛମݧͰ͖Δ • ެ։͢Δͱ͍͏ϓϨογϟʔͰ඼্࣭͕͕Δ • ҙ֎ͱଞͷਓʹͱͬͯ΋༗༻ͳπʔϧͰ͋Δ͜ͱ͕ଟ͍ • ެ։ͯ͠΋ҙ֎ͱ୭΋ݟ͍ͯͳ͍ͷͰؾʹ͢Δඞཁ͕ͳ͍ • ެ։ʹଛͰ͸ͳ͍ɻ
  9. πʔϧΛ࡞Δ্Ͱେࣄʹ͍ͯ͠Δ͜ͱ • ͍͔ͭ΍ΔɺͰ͸ͳ͘ࠓ΍ΔɻίʔυΛॻ͘ɻ • ΍Γͨ͘ͳͬͨͱ͖͕νϟϯεɻ৸͔͢ͱϞνϕʔγϣϯԼ ͕ͬͯ΍Βͳ͘ͳΔɻνϟϯεΛಀ͞ͳ͍ • Ϟνϕʔγϣϯ͸Լ͕Δ΋ͷɻਖ਼ৗܥ͚ͩͰ΋Ұؾʹ࡞Γ੾Δ • ධ࿦ՈʹͳΒͳ͍ɺ·ͣखΛಈ͔͢ɻ

    • ΞΠσΞΛΞΠσΞͰऴΘΒͤͳ͍ɻ
 ࣮૷ͯ͠۩ݱԽͰ͖Δͷ͕ΤϯδχΞͷڧΈ • ۩ݱԽͰ͖Δ΋ͷΛ૿΍͍͚ͯ͠Δͷ͕ΤϯδχΞͷָ͠Έ Ͱ͋ΓՁ஋ʹͳΔ • ԿΑΓɺϓϩάϥϛϯάΛָ͠ΉɻϞϊͮ͘Γ͸ָ͍͠ɻ
 ϓϩάϥϛϯά͕໨తʹͳͬͯ΋ྑ͍ɻ