SF Scraper — SuccessFactors Browser Scraping Skill
Scrape employee data from a live, logged-in SAP SuccessFactors session via browser automation.
This skill uses ONLY browser snapshots and actions — zero API calls.
Prerequisites
- User must have SAP SuccessFactors open and logged in on a Chrome tab.
- OpenClaw Browser Relay Chrome extension must be active (badge ON) on that tab.
- Always use
profile="chrome" for all browser calls (we need the authenticated session).
Step-by-Step Workflow
Step 1: Verify Session & Get Base URL
browser(action="snapshot", profile="chrome", compact=true)
Check for these states:
- Login page detected (look for: "Log in", "Username", "Password", "Company ID" fields) → Tell user to log in first and re-attach the relay.
- Session expired ("Session Timeout", "session has expired") → Same, ask user to re-login.
- SF Home/Dashboard → Good. Extract the base URL from the page URL in the snapshot. It will be one of:
https://<company>.successfactors.com
https://<company>.successfactors.eu
https://<company>.sapsf.com
https://pmsalesdemo<N>.successfactors.com (demo instances)
https://hcm<N>preview.sapsf.com (preview instances)
Store the base URL — all subsequent navigation uses it.
Step 2: Navigate to Employee Profile
Try these navigation strategies in order. Move to the next only if the current one fails.
Strategy A: People Profile Deep Link (preferred)
browser(action="navigate", profile="chrome", targetUrl="{base_url}/sf/liveprofile?selected_user={employee_id}")
Wait 2-3 seconds for load, then snapshot. This is the most reliable deep link in modern SF instances.
Success indicators:
- Page contains a heading with a person's name
- You see sections like "Personal Information", "Job Information", "About Me"
- URL contains
liveprofile and the employee ID
Failure indicators:
- Blank page, spinner that never resolves
- "Page not found", "Error", or redirect to home
- Generic dashboard with no employee context
Strategy B: Alternative Deep Links
If Strategy A fails, try these one at a time:
{base_url}/xi/ui/peopleprofile/pages/index.xhtml?selected_user={employee_id}
{base_url}/sf/peopleprofile?selected_user={employee_id}
{base_url}/#/userprofile/{employee_id}
{base_url}/sf/admin/employeefiles?selected_user={employee_id}
Same validation — snapshot after each and check for profile content.
Strategy C: Global Search Bar
If all deep links fail, use the search:
- Snapshot the current page.
- Find the search element. Look for:
- A
searchbox role element (most common)
- A
textbox with placeholder containing "Search", "Search People", "Find Someone"
- An element with aria-label containing "search"
- The magnifying glass icon / search icon button (click it first to expand the search bar)
- Click the search box to focus it.
- Type the employee ID:
browser(action="act", profile="chrome", request={kind: "type", ref: "<search_ref>", text: "{employee_id}"})
- Press Enter or click the search button:
browser(action="act", profile="chrome", request={kind: "press", ref: "<search_ref>", key: "Enter"})
- Wait 2-3 seconds, then snapshot the results.
- Parse the results:
- If one result → click it to open the profile.
- If multiple results → look for the one matching the employee ID. Results typically show as a list with name, ID, and photo. Click the correct one.
- If no results → report to user that employee ID was not found.
Strategy D: Admin Center / Employee Files
Last resort — navigate through menus:
- Navigate to
{base_url}/sf/admin
- Snapshot, look for "Employee Files" or "Manage Employees" link
- Click it, then use the search/filter within that view
- Find and click the employee
Step 3: Handle Page Loading & Iframes
SuccessFactors heavily uses iframes and lazy loading. Critical handling:
Iframe detection:
Lazy loading / SPA transitions:
- SuccessFactors is a Single Page Application. After navigation, content may take 3-5 seconds to render.
- Always snapshot twice if the first snapshot shows loading indicators:
- Loading spinners: look for "Loading", "Please wait", spinner icons, progress bars
- Wait 3 seconds between snapshots
- If still loading after 2 retries (total ~9 seconds), inform user of slow load
Popup/Modal handling:
- SF sometimes shows popups ("What's New", cookie consent, tour prompts)
- If a modal/dialog appears, look for "Close", "X", "Dismiss", "Got it", "Skip" buttons
- Click to dismiss, then re-snapshot
Step 4: Scrape the Profile Page
Once on the employee profile, take a detailed snapshot:
browser(action="snapshot", profile="chrome")
SuccessFactors People Profile has these typical sections/cards:
Header / Banner Area
Contains the most important info, always visible at top:
- Full Name — Large heading text, usually
heading level 1 or 2
- Job Title — Text directly below the name
- Photo — Avatar image (not scrapable as data, but confirms you're on the right profile)
- Employee ID — Sometimes shown near name, sometimes in a subtitle like "ID: 12345"
- Quick action buttons — Email, phone icons (these contain contact data)
Info Cards / Sections (varies by company config)
Each card has a header and key-value pairs. Common patterns:
"Personal Information" / "About" card:
- First Name, Last Name, Middle Name
- Preferred Name / Display Name
- Date of Birth (may be restricted)
- Gender
- Nationality
- Marital Status
"Job Information" card:
- Job Title / Position Title
- Job Code
- Department / Division / Business Unit
- Cost Center
- Employment Type (Full-time, Part-time, etc.)
- Employee Class / Employee Type
- Regular/Temporary
- Standard Hours
- FTE (Full-Time Equivalent)
- Pay Grade
- Worker's Compensation Code
"Employment Details" / "Employment Information" card:
- Hire Date / Original Start Date
- Seniority Date
- Service Date
- Last Date Worked
- Termination Date (if applicable)
- Employment Status (Active, Terminated, Leave, etc.)
"Compensation Information" card (may be restricted):
- Annual Salary / Base Pay
- Pay Component
- Currency
- Compa-Ratio
- Range Penetration
"Contact Information" card:
- Business Email
- Personal Email
- Business Phone
- Mobile Phone
- Home Phone
- Business Address (Street, City, State, Zip, Country)
- Home Address
"Organizational" / "Position" card:
- Manager Name (usually a clickable link)
- Manager ID
- Position
- Direct Reports count
- Legal Entity
- Company Code
"Spot Profile" / "About Me" card:
- Bio / About Me text
- Skills
- Interests
- Social accounts
How to Extract Key-Value Pairs
In the accessibility tree snapshot, profile data appears as:
- Labels —
text or label nodes with the field name (e.g., "Department")
- Values — Adjacent
text, link, or statictext nodes with the value (e.g., "Engineering")
- Pattern: label followed by its value, often in a grid/table or definition list structure
Example snapshot patterns:
text "Department"
text "Engineering"
text "Manager"
link "Jane Smith"
text "Location"
text "Bangalore, India"
text "Email"
link "john.doe@company.com"
Scan sequentially and pair each label with its following value.
Step 5: Navigate Tabs for More Data
SuccessFactors profiles often organize data into tabs or collapsible sections.
Common tab names:
- "Personal Information" / "Personal Info"
- "Job Information" / "Job Info"
- "Employment Information" / "Employment Details"
- "Compensation Information" / "Compensation"
- "Pay Components" / "Pay Details"
- "Organizational Information" / "Organization"
- "Contact Information"
- "Documents"
- "Performance History"
- "Goal Plan"
- "Time Off" / "Leave"
To navigate tabs:
- Snapshot and identify tab elements (role:
tab, tablist, or clickable links with these names)
- Click the tab you need:
browser(action="act", profile="chrome", request={kind: "click", ref: "<tab_ref>"})
- Wait 1-2 seconds for content to load
- Snapshot again and extract the new section's data
Collapsible sections:
- Some profiles use expandable/collapsible sections instead of tabs
- Look for
button elements with section names and expand/collapse indicators
- Click to expand if collapsed, then snapshot
Step 6: Handle "Show More" / Pagination
- Some sections show limited data with a "Show More", "View All", or "See More" link
- Click it if present to reveal full data, then re-snapshot
- Employment history or compensation history may have multiple records — scrape all visible
Step 7: Return Results
Format results clearly, grouped by section:
═══ Employee Profile ═══
👤 Basic Info
Name: John Doe
Employee ID: 12345
Job Title: Senior Developer
Department: Engineering
📧 Contact
Email: john.doe@company.com
Phone: +91-9876543210
Location: Bangalore, India
🏢 Organization
Manager: Jane Smith
Division: Technology
Business Unit: Product Development
Legal Entity: Company India Pvt Ltd
📋 Employment
Hire Date: 2020-03-15
Status: Active
Type: Full-Time Regular
Rules:
- Only include fields actually found on the page — NEVER fabricate data
- If a field's value is empty or hidden ("*****", "Restricted"), report it as restricted
- If the user only asked for a name, don't scrape every tab — just return what's visible in the header
Batch Mode
For multiple employee IDs:
- Process one at a time sequentially
- After each profile, navigate to the next using Strategy A
- Collect all results
- Present as a formatted table at the end
- Note any IDs that failed
Configuration (Optional)
User can add to TOOLS.md:
### SuccessFactors
- Base URL: https://yourcompany.successfactors.com
- Default fields: name, email, department, manager
If configured, use the base URL directly (skip discovery). If default fields are specified, only scrape those.
Error Handling
| Scenario |
Detection |
Action |
| Not logged in |
Login form visible |
Tell user to log in and re-attach relay |
| Session expired |
"Session Timeout" text |
Same as above |
| Employee not found |
Search returns 0 results |
Report clearly, suggest checking ID |
| Access denied |
"Unauthorized", "No access", "Insufficient privileges" |
Report — user may lack permissions |
| Profile restricted |
Fields show "*****" or "Restricted" |
Report which fields are restricted |
| Page won't load |
Loading spinner after 3 retries |
Report timeout, suggest refreshing SF |
| Multiple matches |
Search returns >1 result |
List matches with names/IDs, ask user to pick |
| Wrong instance |
URL doesn't match expected SF domain |
Warn user, ask to confirm |
Important Notes
- NEVER use OData, REST API, or any programmatic endpoint. Pure browser scraping only.
- Always use
profile="chrome" — never profile="openclaw" (need the user's auth session).
- Be patient — SF can be slow. Always verify page state with snapshots before extracting.
- Don't navigate away from SF without warning the user.
- Respect permissions — if data is restricted/hidden in the UI, it's restricted for a reason. Don't try to circumvent.
- Screenshot fallback — if snapshot (accessibility tree) doesn't capture visible text, use
browser(action="screenshot", profile="chrome") to see the rendered page visually and extract from the image.
1---2name: sf-scraper3description: Scrape employee data from a logged-in SAP SuccessFactors browser session using browser automation. Use when: user provides an employee ID and wants employee details (name, email, department, manager, etc.) scraped directly from the SuccessFactors UI — NOT via OData/API. Requires the user to have SuccessFactors open and logged in via Chrome with the OpenClaw Browser Relay extension attached. Triggers on: "get employee name", "look up employee", "scrape SF", "find employee in SuccessFactors", or any request combining an employee ID with SuccessFactors data lookup.4---5
6# SF Scraper — SuccessFactors Browser Scraping Skill
7
8Scrape employee data from a live, logged-in SAP SuccessFactors session via browser automation.
9This skill uses ONLY browser snapshots and actions — zero API calls.
10
11## Prerequisites
12
13- User must have SAP SuccessFactors open and logged in on a Chrome tab.
14- OpenClaw Browser Relay Chrome extension must be active (badge ON) on that tab.
15- **Always** use `profile="chrome"` for all browser calls (we need the authenticated session).
16
17## Step-by-Step Workflow
18
19### Step 1: Verify Session & Get Base URL
20
21```
22browser(action="snapshot", profile="chrome", compact=true)
23```
24
25**Check for these states:**
26
27- **Login page detected** (look for: "Log in", "Username", "Password", "Company ID" fields) → Tell user to log in first and re-attach the relay.
28- **Session expired** ("Session Timeout", "session has expired") → Same, ask user to re-login.
29- **SF Home/Dashboard** → Good. Extract the base URL from the page URL in the snapshot. It will be one of:
30 - `https://<company>.successfactors.com`
31 - `https://<company>.successfactors.eu`
32 - `https://<company>.sapsf.com`
33 - `https://pmsalesdemo<N>.successfactors.com` (demo instances)
34 - `https://hcm<N>preview.sapsf.com` (preview instances)
35
36Store the base URL — all subsequent navigation uses it.
37
38### Step 2: Navigate to Employee Profile
39
40Try these navigation strategies **in order**. Move to the next only if the current one fails.
41
42#### Strategy A: People Profile Deep Link (preferred)
43
44```
45browser(action="navigate", profile="chrome", targetUrl="{base_url}/sf/liveprofile?selected_user={employee_id}")
46```
47
48Wait 2-3 seconds for load, then snapshot. This is the most reliable deep link in modern SF instances.
49
50**Success indicators:**
51- Page contains a heading with a person's name
52- You see sections like "Personal Information", "Job Information", "About Me"
53- URL contains `liveprofile` and the employee ID
54
55**Failure indicators:**
56- Blank page, spinner that never resolves
57- "Page not found", "Error", or redirect to home
58- Generic dashboard with no employee context
59
60#### Strategy B: Alternative Deep Links
61
62If Strategy A fails, try these one at a time:
63
64```
65{base_url}/xi/ui/peopleprofile/pages/index.xhtml?selected_user={employee_id}
66{base_url}/sf/peopleprofile?selected_user={employee_id}
67{base_url}/#/userprofile/{employee_id}
68{base_url}/sf/admin/employeefiles?selected_user={employee_id}
69```
70
71Same validation — snapshot after each and check for profile content.
72
73#### Strategy C: Global Search Bar
74
75If all deep links fail, use the search:
76
771. **Snapshot** the current page.
782. **Find the search element.** Look for:
79 - A `searchbox` role element (most common)
80 - A `textbox` with placeholder containing "Search", "Search People", "Find Someone"
81 - An element with aria-label containing "search"
82 - The magnifying glass icon / search icon button (click it first to expand the search bar)
833. **Click** the search box to focus it.
844. **Type** the employee ID:
85 ```
86 browser(action="act", profile="chrome", request={kind: "type", ref: "<search_ref>", text: "{employee_id}"})
87 ```
885. **Press Enter** or click the search button:
89 ```
90 browser(action="act", profile="chrome", request={kind: "press", ref: "<search_ref>", key: "Enter"})
91 ```
926. **Wait 2-3 seconds**, then snapshot the results.
937. **Parse the results:**
94 - If one result → click it to open the profile.
95 - If multiple results → look for the one matching the employee ID. Results typically show as a list with name, ID, and photo. Click the correct one.
96 - If no results → report to user that employee ID was not found.
97
98#### Strategy D: Admin Center / Employee Files
99
100Last resort — navigate through menus:
101
1021. Navigate to `{base_url}/sf/admin`
1032. Snapshot, look for "Employee Files" or "Manage Employees" link
1043. Click it, then use the search/filter within that view
1054. Find and click the employee
106
107### Step 3: Handle Page Loading & Iframes
108
109SuccessFactors heavily uses iframes and lazy loading. Critical handling:
110
111**Iframe detection:**
112- After navigating, if the snapshot shows minimal content or an iframe structure, try:
113 ```
114 browser(action="snapshot", profile="chrome", compact=true, frame="main")
115 ```
116- Common iframe names/ids in SF: `"main"`, `"contentFrame"`, `"bizmuleApp"`, `"xCalApp"`
117- If `frame` doesn't work, take a full (non-compact) snapshot to see the full DOM tree
118
119**Lazy loading / SPA transitions:**
120- SuccessFactors is a Single Page Application. After navigation, content may take 3-5 seconds to render.
121- **Always snapshot twice** if the first snapshot shows loading indicators:
122 - Loading spinners: look for "Loading", "Please wait", spinner icons, progress bars
123 - Wait 3 seconds between snapshots
124 - If still loading after 2 retries (total ~9 seconds), inform user of slow load
125
126**Popup/Modal handling:**
127- SF sometimes shows popups ("What's New", cookie consent, tour prompts)
128- If a modal/dialog appears, look for "Close", "X", "Dismiss", "Got it", "Skip" buttons
129- Click to dismiss, then re-snapshot
130
131### Step 4: Scrape the Profile Page
132
133Once on the employee profile, take a detailed snapshot:
134
135```
136browser(action="snapshot", profile="chrome")
137```
138
139**SuccessFactors People Profile has these typical sections/cards:**
140
141#### Header / Banner Area
142Contains the most important info, always visible at top:
143- **Full Name** — Large heading text, usually `heading` level 1 or 2
144- **Job Title** — Text directly below the name
145- **Photo** — Avatar image (not scrapable as data, but confirms you're on the right profile)
146- **Employee ID** — Sometimes shown near name, sometimes in a subtitle like "ID: 12345"
147- **Quick action buttons** — Email, phone icons (these contain contact data)
148
149#### Info Cards / Sections (varies by company config)
150Each card has a header and key-value pairs. Common patterns:
151
152**"Personal Information" / "About" card:**
153- First Name, Last Name, Middle Name
154- Preferred Name / Display Name
155- Date of Birth (may be restricted)
156- Gender
157- Nationality
158- Marital Status
159
160**"Job Information" card:**
161- Job Title / Position Title
162- Job Code
163- Department / Division / Business Unit
164- Cost Center
165- Employment Type (Full-time, Part-time, etc.)
166- Employee Class / Employee Type
167- Regular/Temporary
168- Standard Hours
169- FTE (Full-Time Equivalent)
170- Pay Grade
171- Worker's Compensation Code
172
173**"Employment Details" / "Employment Information" card:**
174- Hire Date / Original Start Date
175- Seniority Date
176- Service Date
177- Last Date Worked
178- Termination Date (if applicable)
179- Employment Status (Active, Terminated, Leave, etc.)
180
181**"Compensation Information" card (may be restricted):**
182- Annual Salary / Base Pay
183- Pay Component
184- Currency
185- Compa-Ratio
186- Range Penetration
187
188**"Contact Information" card:**
189- Business Email
190- Personal Email
191- Business Phone
192- Mobile Phone
193- Home Phone
194- Business Address (Street, City, State, Zip, Country)
195- Home Address
196
197**"Organizational" / "Position" card:**
198- Manager Name (usually a clickable link)
199- Manager ID
200- Position
201- Direct Reports count
202- Legal Entity
203- Company Code
204
205**"Spot Profile" / "About Me" card:**
206- Bio / About Me text
207- Skills
208- Interests
209- Social accounts
210
211#### How to Extract Key-Value Pairs
212
213In the accessibility tree snapshot, profile data appears as:
214- **Labels** — `text` or `label` nodes with the field name (e.g., "Department")
215- **Values** — Adjacent `text`, `link`, or `statictext` nodes with the value (e.g., "Engineering")
216- Pattern: label followed by its value, often in a grid/table or definition list structure
217
218Example snapshot patterns:
219```
220text "Department"
221text "Engineering"
222text "Manager"
223link "Jane Smith"
224text "Location"
225text "Bangalore, India"
226text "Email"
227link "john.doe@company.com"
228```
229
230Scan sequentially and pair each label with its following value.
231
232### Step 5: Navigate Tabs for More Data
233
234SuccessFactors profiles often organize data into tabs or collapsible sections.
235
236**Common tab names:**
237- "Personal Information" / "Personal Info"
238- "Job Information" / "Job Info"
239- "Employment Information" / "Employment Details"
240- "Compensation Information" / "Compensation"
241- "Pay Components" / "Pay Details"
242- "Organizational Information" / "Organization"
243- "Contact Information"
244- "Documents"
245- "Performance History"
246- "Goal Plan"
247- "Time Off" / "Leave"
248
249**To navigate tabs:**
2501. Snapshot and identify tab elements (role: `tab`, `tablist`, or clickable links with these names)
2512. Click the tab you need:
252 ```
253 browser(action="act", profile="chrome", request={kind: "click", ref: "<tab_ref>"})
254 ```
2553. Wait 1-2 seconds for content to load
2564. Snapshot again and extract the new section's data
257
258**Collapsible sections:**
259- Some profiles use expandable/collapsible sections instead of tabs
260- Look for `button` elements with section names and expand/collapse indicators
261- Click to expand if collapsed, then snapshot
262
263### Step 6: Handle "Show More" / Pagination
264
265- Some sections show limited data with a "Show More", "View All", or "See More" link
266- Click it if present to reveal full data, then re-snapshot
267- Employment history or compensation history may have multiple records — scrape all visible
268
269### Step 7: Return Results
270
271Format results clearly, grouped by section:
272
273```
274═══ Employee Profile ═══
275
276👤 Basic Info
277 Name: John Doe
278 Employee ID: 12345
279 Job Title: Senior Developer
280 Department: Engineering
281
282📧 Contact
283 Email: john.doe@company.com
284 Phone: +91-9876543210
285 Location: Bangalore, India
286
287🏢 Organization
288 Manager: Jane Smith
289 Division: Technology
290 Business Unit: Product Development
291 Legal Entity: Company India Pvt Ltd
292
293📋 Employment
294 Hire Date: 2020-03-15
295 Status: Active
296 Type: Full-Time Regular
297```
298
299**Rules:**
300- Only include fields actually found on the page — NEVER fabricate data
301- If a field's value is empty or hidden ("*****", "Restricted"), report it as restricted
302- If the user only asked for a name, don't scrape every tab — just return what's visible in the header
303
304## Batch Mode
305
306For multiple employee IDs:
3071. Process one at a time sequentially
3082. After each profile, navigate to the next using Strategy A
3093. Collect all results
3104. Present as a formatted table at the end
3115. Note any IDs that failed
312
313## Configuration (Optional)
314
315User can add to `TOOLS.md`:
316```markdown
317### SuccessFactors
318- Base URL: https://yourcompany.successfactors.com
319- Default fields: name, email, department, manager
320```
321
322If configured, use the base URL directly (skip discovery). If default fields are specified, only scrape those.
323
324## Error Handling
325
326| Scenario | Detection | Action |
327|----------|-----------|--------|
328| Not logged in | Login form visible | Tell user to log in and re-attach relay |
329| Session expired | "Session Timeout" text | Same as above |
330| Employee not found | Search returns 0 results | Report clearly, suggest checking ID |
331| Access denied | "Unauthorized", "No access", "Insufficient privileges" | Report — user may lack permissions |
332| Profile restricted | Fields show "*****" or "Restricted" | Report which fields are restricted |
333| Page won't load | Loading spinner after 3 retries | Report timeout, suggest refreshing SF |
334| Multiple matches | Search returns >1 result | List matches with names/IDs, ask user to pick |
335| Wrong instance | URL doesn't match expected SF domain | Warn user, ask to confirm |
336
337## Important Notes
338
339- **NEVER use OData, REST API, or any programmatic endpoint.** Pure browser scraping only.
340- **Always use `profile="chrome"`** — never `profile="openclaw"` (need the user's auth session).
341- **Be patient** — SF can be slow. Always verify page state with snapshots before extracting.
342- **Don't navigate away** from SF without warning the user.
343- **Respect permissions** — if data is restricted/hidden in the UI, it's restricted for a reason. Don't try to circumvent.
344- **Screenshot fallback** — if snapshot (accessibility tree) doesn't capture visible text, use `browser(action="screenshot", profile="chrome")` to see the rendered page visually and extract from the image.