Flow - Create new Salesforce Accounts from Xero Contacts
Below is an example of a flow that will allow you to automatically create Salesforce Accounts when a new Xero Contact is created.
The example below, albeit simple, can be enhanced and applied to other TwixRiva source tables to keep salesforce in sync with Xero - I.e. Xero Invoices, Xero Purchase Orders, etc.
The scenarios below is the following:
Your website receives orders directly into Xero. You however want to synchronise the information to ensure you kept them engaged with Salesforce Marketing Engagement Studio.
Step 1: Prepare a After Record-Triggered flow.
Step 2: Configure the Start of the Flow
Select the Xero Contact object
Use A record is created or updated
The Xero Contact is not linked to a Salesforce Account
Step 3: Select the Create Records action
Step 4: Configure the action
Set the Label
Select 'One' on number of records to create. 1 Xero contact needs to match to 1 Salesforce account.
Select ‘Use separate resources, and literal values’ as I do not want to assign values separately in this example.
Select ‘Account’ as the object to create the record for.
Edit the field update mapping ( Name, Billing City, Acitve__C custom field, Phone ) and map to the Xero Contact fields ( $Record > Account Name, $Record > City, ‘True’, $Record > Phone)
Step 5: Tick Manually assign variables on the Create Records action
Create a variable and assign it
This is very important to ensure that we can link the new account back with the Xero Contact so we don’t duplicate it on the next Xero Contact update.
Step 6: Update the Xero Contact record that has triggered the flow
Select ‘Update Triggering Record’
Update the mapping as below
Step 5: Save the flow, activate it & Voila, a Salesforce Account will be created from a Xero Contact automatially.