website logo
Product Overview
NetSuite
Payments
QuickBooks
Xero
Navigate through spaces
⌘K
General Concepts
What is Breadwinner
Getting Started
App Installation
Initial Configuration
Person Accounts
Company Matching
Product Matching
NetSuite Items and Item Groups
Download PDF button
Weekly Sync Timeframe
Security and Permissions
NetSuite Permissions
Custom Guided Wizard
Quick Create Sales Order
Button URL Structure
NetSuite Company Creation
Button URL Generator
Support
Custom Fields
Custom Objects
Global API
Quick Start Guide
API Overview
Requests
Response
Apex Generator
Code Examples
Advanced Topics
Formula Fields
NetSuite Discounts
NetSuite Payment Terms
Memorized Transactions
Sync Data Filtering
Technical Resources
Deploy Plan
Requirements
ERD / Object Structure
Getting Help
Version History
Direct Installation Link
Docs powered by
Archbee
Global API
...
Code Examples
Invokable Class for Flow

Flow (Meta)

1min
XML
|
<?xml version="1.0" encoding="UTF-8"?>
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
    <actionCalls>
        <name>Create_NetSuite_Company</name>
        <label>Create NetSuite Company</label>
        <locationX>176</locationX>
        <locationY>398</locationY>
        <actionName>BW_CreateNetSuiteCompany_Invokable</actionName>
        <actionType>apex</actionType>
        <connector>
            <targetReference>NetSuite_Result</targetReference>
        </connector>
        <flowTransactionModel>Automatic</flowTransactionModel>
        <inputParameters>
            <name>AccountNumber</name>
            <value>
                <elementReference>Get_Salesforce_Account.Id</elementReference>
            </value>
        </inputParameters>
        <inputParameters>
            <name>BillingCity</name>
            <value>
                <elementReference>Billing_Address.city</elementReference>
            </value>
        </inputParameters>
        <inputParameters>
            <name>BillingPostalCode</name>
            <value>
                <elementReference>Billing_Address.postalCode</elementReference>
            </value>
        </inputParameters>
        <inputParameters>
            <name>BillingState</name>
            <value>
                <elementReference>Billing_Address.province</elementReference>
            </value>
        </inputParameters>
        <inputParameters>
            <name>BillingStreet</name>
            <value>
                <elementReference>Billing_Address.street</elementReference>
            </value>
        </inputParameters>
        <inputParameters>
            <name>companyName</name>
            <value>
                <elementReference>Company_Name</elementReference>
            </value>
        </inputParameters>
        <inputParameters>
            <name>firstName</name>
            <value>
                <elementReference>Name.firstName</elementReference>
            </value>
        </inputParameters>
        <inputParameters>
            <name>lastName</name>
            <value>
                <elementReference>Name.lastName</elementReference>
            </value>
        </inputParameters>
        <inputParameters>
            <name>Phone</name>
            <value>
                <elementReference>Phone</elementReference>
            </value>
        </inputParameters>
        <inputParameters>
            <name>ShippingCity</name>
            <value>
                <elementReference>Shipping_Address.city</elementReference>
            </value>
        </inputParameters>
        <inputParameters>
            <name>ShippingPostalCode</name>
            <value>
                <elementReference>Shipping_Address.postalCode</elementReference>
            </value>
        </inputParameters>
        <inputParameters>
            <name>ShippingState</name>
            <value>
                <elementReference>Shipping_Address.province</elementReference>
            </value>
        </inputParameters>
        <inputParameters>
            <name>ShippingStreet</name>
            <value>
                <elementReference>Shipping_Address.street</elementReference>
            </value>
        </inputParameters>
        <inputParameters>
            <name>SubsidiaryId</name>
            <value>
                <stringValue>8</stringValue>
            </value>
        </inputParameters>
        <inputParameters>
            <name>taxNumber</name>
            <value>
                <elementReference>Tax_Number</elementReference>
            </value>
        </inputParameters>
        <inputParameters>
            <name>testMode</name>
            <value>
                <stringValue>sendtonetsuite</stringValue>
            </value>
        </inputParameters>
        <inputParameters>
            <name>Website</name>
            <value>
                <elementReference>Website</elementReference>
            </value>
        </inputParameters>
        <outputParameters>
            <assignToReference>companyInternalIdapex</assignToReference>
            <name>companyInternalId</name>
        </outputParameters>
        <outputParameters>
            <assignToReference>companyNameApex</assignToReference>
            <name>companyName</name>
        </outputParameters>
        <outputParameters>
            <assignToReference>firstNameApex</assignToReference>
            <name>firstName</name>
        </outputParameters>
        <outputParameters>
            <assignToReference>lastNameApex</assignToReference>
            <name>lastName</name>
        </outputParameters>
        <outputParameters>
            <assignToReference>netSuiteResponseapex</assignToReference>
            <name>netSuiteResponse</name>
        </outputParameters>
        <outputParameters>
            <assignToReference>testModeapex</assignToReference>
            <name>testMode</name>
        </outputParameters>
    </actionCalls>
    <apiVersion>53.0</apiVersion>
    <choices>
        <name>Customer</name>
        <choiceText>Customer</choiceText>
        <dataType>String</dataType>
    </choices>
    <choices>
        <name>CUSTOMER_Closed_Won</name>
        <choiceText>CUSTOMER-Closed Won</choiceText>
        <dataType>String</dataType>
    </choices>
    <choices>
        <name>PROSPECT_Proposal</name>
        <choiceText>&lt;span style=&quot;background-color: rgb(255, 255, 255); color: rgb(62, 62, 60);&quot;&gt;PROSPECT-Proposal&lt;/span&gt;</choiceText>
        <dataType>String</dataType>
    </choices>
    <choices>
        <name>Vendor</name>
        <choiceText>Vendor</choiceText>
        <dataType>String</dataType>
    </choices>
    <interviewLabel>Create NetSuite Company from Salesforce Account Invokable {!$Flow.CurrentDateTime}</interviewLabel>
    <label>Create NetSuite Company from Salesforce Account Invokable</label>
    <processMetadataValues>
        <name>BuilderType</name>
        <value>
            <stringValue>LightningFlowBuilder</stringValue>
        </value>
    </processMetadataValues>
    <processMetadataValues>
        <name>CanvasMode</name>
        <value>
            <stringValue>AUTO_LAYOUT_CANVAS</stringValue>
        </value>
    </processMetadataValues>
    <processMetadataValues>
        <name>OriginBuilderType</name>
        <value>
            <stringValue>LightningFlowBuilder</stringValue>
        </value>
    </processMetadataValues>
    <processType>Flow</processType>
    <recordLookups>
        <name>Get_Salesforce_Account</name>
        <label>Get Salesforce Account</label>
        <locationX>176</locationX>
        <locationY>158</locationY>
        <assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
        <connector>
            <targetReference>NS_Company_Create</targetReference>
        </connector>
        <filterLogic>and</filterLogic>
        <filters>
            <field>Id</field>
            <operator>EqualTo</operator>
            <value>
                <elementReference>recordId</elementReference>
            </value>
        </filters>
        <getFirstRecordOnly>true</getFirstRecordOnly>
        <object>Account</object>
        <storeOutputAutomatically>true</storeOutputAutomatically>
    </recordLookups>
    <screens>
        <name>NetSuite_Result</name>
        <label>NetSuite Result</label>
        <locationX>176</locationX>
        <locationY>518</locationY>
        <allowBack>false</allowBack>
        <allowFinish>true</allowFinish>
        <allowPause>false</allowPause>
        <fields>
            <name>NetSuiteResponse</name>
            <fieldText>&lt;p&gt;Company Name: {!companyNameApex}&lt;/p&gt;&lt;p&gt;Mode: {!testModeapex}&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: var(--lwc-colorBackgroundInput,rgb(255, 255, 255)); color: var(--lwc-colorTextWeak,rgb(62, 62, 60)); font-size: var(--lwc-fontSize3,0.8125rem); font-family: var(--lwc-fontFamily,-apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;);&quot;&gt;NetSuite InternalID: {!companyInternalIdapex}&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: var(--lwc-colorBackgroundInput,rgb(255, 255, 255)); color: var(--lwc-colorTextWeak,rgb(62, 62, 60)); font-size: var(--lwc-fontSize3,0.8125rem); font-family: var(--lwc-fontFamily,-apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;);&quot;&gt;NetSuite Response: {!netSuiteResponseapex}&lt;/span&gt;&lt;/p&gt;</fieldText>
            <fieldType>DisplayText</fieldType>
        </fields>
        <showFooter>true</showFooter>
        <showHeader>true</showHeader>
    </screens>
    <screens>
        <name>NS_Company_Create</name>
        <label>Create NetSuite Company from Salesforce Account</label>
        <locationX>176</locationX>
        <locationY>278</locationY>
        <allowBack>false</allowBack>
        <allowFinish>true</allowFinish>
        <allowPause>false</allowPause>
        <connector>
            <targetReference>Create_NetSuite_Company</targetReference>
        </connector>
        <fields>
            <name>Name</name>
            <extensionName>flowruntime:name</extensionName>
            <fieldType>ComponentInstance</fieldType>
            <inputsOnNextNavToAssocScrn>UseStoredValues</inputsOnNextNavToAssocScrn>
            <isRequired>true</isRequired>
            <storeOutputAutomatically>true</storeOutputAutomatically>
        </fields>
        <fields>
            <name>Company_Name</name>
            <dataType>String</dataType>
            <defaultValue>
                <elementReference>Get_Salesforce_Account.Name</elementReference>
            </defaultValue>
            <fieldText>Company Name</fieldText>
            <fieldType>InputField</fieldType>
            <isRequired>false</isRequired>
        </fields>
        <fields>
            <name>Parent_Company</name>
            <dataType>String</dataType>
            <defaultValue>
                <elementReference>Get_Salesforce_Account.Parent.Name</elementReference>
            </defaultValue>
            <fieldText>Parent Company</fieldText>
            <fieldType>InputField</fieldType>
            <isRequired>false</isRequired>
        </fields>
        <fields>
            <name>Entity_Type</name>
            <choiceReferences>Customer</choiceReferences>
            <choiceReferences>Vendor</choiceReferences>
            <dataType>String</dataType>
            <defaultSelectedChoiceReference>Customer</defaultSelectedChoiceReference>
            <fieldText>Company Type</fieldText>
            <fieldType>RadioButtons</fieldType>
            <isRequired>false</isRequired>
        </fields>
        <fields>
            <name>Status</name>
            <choiceReferences>CUSTOMER_Closed_Won</choiceReferences>
            <choiceReferences>PROSPECT_Proposal</choiceReferences>
            <dataType>String</dataType>
            <defaultSelectedChoiceReference>CUSTOMER_Closed_Won</defaultSelectedChoiceReference>
            <fieldText>Status</fieldText>
            <fieldType>DropdownBox</fieldType>
            <isRequired>false</isRequired>
        </fields>
        <fields>
            <name>Email</name>
            <dataType>String</dataType>
            <fieldText>Email</fieldText>
            <fieldType>InputField</fieldType>
            <isRequired>false</isRequired>
        </fields>
        <fields>
            <name>Phone</name>
            <dataType>String</dataType>
            <defaultValue>
                <elementReference>Get_Salesforce_Account.Phone</elementReference>
            </defaultValue>
            <fieldText>Phone</fieldText>
            <fieldType>InputField</fieldType>
            <isRequired>false</isRequired>
        </fields>
        <fields>
            <name>Billing_Address</name>
            <extensionName>flowruntime:address</extensionName>
            <fieldType>ComponentInstance</fieldType>
            <inputParameters>
                <name>city</name>
                <value>
                    <elementReference>Get_Salesforce_Account.BillingCity</elementReference>
                </value>
            </inputParameters>
            <inputParameters>
                <name>country</name>
                <value>
                    <elementReference>Get_Salesforce_Account.BillingCountry</elementReference>
                </value>
            </inputParameters>
            <inputParameters>
                <name>addressLabel</name>
                <value>
                    <stringValue>Billing Address</stringValue>
                </value>
            </inputParameters>
            <inputParameters>
                <name>postalCode</name>
                <value>
                    <elementReference>Get_Salesforce_Account.BillingPostalCode</elementReference>
                </value>
            </inputParameters>
            <inputParameters>
                <name>province</name>
                <value>
                    <elementReference>Get_Salesforce_Account.BillingState</elementReference>
                </value>
            </inputParameters>
            <inputParameters>
                <name>street</name>
                <value>
                    <elementReference>Get_Salesforce_Account.BillingStreet</elementReference>
                </value>
            </inputParameters>
            <inputsOnNextNavToAssocScrn>UseStoredValues</inputsOnNextNavToAssocScrn>
            <isRequired>true</isRequired>
            <storeOutputAutomatically>true</storeOutputAutomatically>
        </fields>
        <fields>
            <name>Shipping_Address</name>
            <extensionName>flowruntime:address</extensionName>
            <fieldType>ComponentInstance</fieldType>
            <inputParameters>
                <name>addressLabel</name>
                <value>
                    <stringValue>Shipping Address</stringValue>
                </value>
            </inputParameters>
            <inputParameters>
                <name>city</name>
                <value>
                    <elementReference>Get_Salesforce_Account.ShippingCity</elementReference>
                </value>
            </inputParameters>
            <inputParameters>
                <name>country</name>
                <value>
                    <elementReference>Get_Salesforce_Account.ShippingCountry</elementReference>
                </value>
            </inputParameters>
            <inputParameters>
                <name>postalCode</name>
                <value>
                    <elementReference>Get_Salesforce_Account.ShippingPostalCode</elementReference>
                </value>
            </inputParameters>
            <inputParameters>
                <name>province</name>
                <value>
                    <elementReference>Get_Salesforce_Account.ShippingState</elementReference>
                </value>
            </inputParameters>
            <inputParameters>
                <name>street</name>
                <value>
                    <elementReference>Get_Salesforce_Account.ShippingStreet</elementReference>
                </value>
            </inputParameters>
            <inputsOnNextNavToAssocScrn>UseStoredValues</inputsOnNextNavToAssocScrn>
            <isRequired>true</isRequired>
            <storeOutputAutomatically>true</storeOutputAutomatically>
        </fields>
        <fields>
            <name>Tax_Number</name>
            <dataType>String</dataType>
            <defaultValue>
                <elementReference>Get_Salesforce_Account.Tax_Number__c</elementReference>
            </defaultValue>
            <fieldText>Tax Number</fieldText>
            <fieldType>InputField</fieldType>
            <isRequired>false</isRequired>
        </fields>
        <fields>
            <name>Website</name>
            <dataType>String</dataType>
            <defaultValue>
                <elementReference>Get_Salesforce_Account.Website</elementReference>
            </defaultValue>
            <fieldText>Website</fieldText>
            <fieldType>InputField</fieldType>
            <isRequired>false</isRequired>
        </fields>
        <nextOrFinishButtonLabel>Create Company in NetSuite</nextOrFinishButtonLabel>
        <showFooter>true</showFooter>
        <showHeader>true</showHeader>
    </screens>
    <start>
        <locationX>50</locationX>
        <locationY>0</locationY>
        <connector>
            <targetReference>Get_Salesforce_Account</targetReference>
        </connector>
    </start>
    <status>Active</status>
    <variables>
        <name>companyInternalIdapex</name>
        <dataType>String</dataType>
        <isCollection>false</isCollection>
        <isInput>true</isInput>
        <isOutput>true</isOutput>
    </variables>
    <variables>
        <name>companyNameApex</name>
        <dataType>String</dataType>
        <isCollection>false</isCollection>
        <isInput>true</isInput>
        <isOutput>true</isOutput>
    </variables>
    <variables>
        <name>firstNameApex</name>
        <dataType>String</dataType>
        <isCollection>false</isCollection>
        <isInput>true</isInput>
        <isOutput>true</isOutput>
    </variables>
    <variables>
        <name>lastNameApex</name>
        <dataType>String</dataType>
        <isCollection>false</isCollection>
        <isInput>true</isInput>
        <isOutput>true</isOutput>
    </variables>
    <variables>
        <name>netSuiteResponseapex</name>
        <dataType>String</dataType>
        <isCollection>false</isCollection>
        <isInput>true</isInput>
        <isOutput>true</isOutput>
    </variables>
    <variables>
        <description>Salesforce Account Id</description>
        <name>recordId</name>
        <dataType>String</dataType>
        <isCollection>false</isCollection>
        <isInput>true</isInput>
        <isOutput>false</isOutput>
        <value>
            <elementReference>$Flow.CurrentRecord</elementReference>
        </value>
    </variables>
    <variables>
        <name>testModeapex</name>
        <dataType>String</dataType>
        <isCollection>false</isCollection>
        <isInput>true</isInput>
        <isOutput>true</isOutput>
    </variables>
</Flow>






Updated 03 Mar 2023
Did this page help you?
PREVIOUS
Class (Apex)
NEXT
Future vs Immediate
Docs powered by
Archbee
Docs powered by
Archbee